Skip to content

wcLayout

Lochemage edited this page Aug 6, 2014 · 20 revisions

wcLayout API

Handles the contents of a panel.


new wcLayout($container, parent)

You should not be constructing these by hand, every panel should
construct their own.

$container
Type: JQuery collection object
The container element for the layout.

parent
Type: wcPanel object
The panel that contains this layout.


addItem(item, x, y, w, h)

Adds a new DOM element into the layout.

item
Type: DOM Element, JQuery collection object, or JQuery selector string
An element to insert into the layout.

x, y
Type: Number
An optional X and Y position to place the item in the layout's table grid. If the parameters are not supplied, (0, 0) is used.

w, h
An optional width and height value that determine the number of table grid cells to merge together for this item. If the parameters are not supplied, only one cell is used.


clear()

Clears the contents of the layout.

showGrid(enabled)

Generally for debugging purposes, this will render dotted lines around
each layout grid cell to help visuallize the current configuration of cells.

enabled
Type: Boolean
Whether the cell grid should be visible.


gridSpacing(size)

Version: Latest Source Only

Gets, or Sets the spacing size between layout grid cells.

size
Type: Integer
If supplied, will assign a new spacing size.


gridAlternate(enabled)

Version: Latest Source Only

Alternates the color of each row in the grid.

enabled
Type: Boolean
If supplied, sets whether each row in the grid should alternate their color.


scene()

Retrieves the main scene DOM element used to contain the layout.

How-To

API Documentation:

wcDocker
wcPanel
wcLayout
wcSplitter

Custom Widgets:

wcTabFrame
wcIFrame

Clone this wiki locally