Class FlowLayout
Object
|
+--GridLayout
|
+--FlowLayout
- class
FlowLayout
- extends GridLayout
Defined in flow_layout.js
HORIZONTAL
<static> var HORIZONTAL
VERTICAL
<static> var VERTICAL
FlowLayout
function FlowLayout(aspect, <Container> container, <Function> sizingFunc)
Parameters:
container
- the container whose children will be governed this layout manager
sizingFunc
- a function taking the following parameters: children
- a WidgetList
of the children being laid out rows
- the number of rows in the grid cols
- the number of columns in the grid availWidth
- the width available to the layout, expressed as an instance of Pixels
availHeight
- the height available to the layout, expressed as an instance of Pixels
pixelsPerEm
- the number of pixels per em for the current container as an int
flushCache
- a boolean
indicating whether or not to flush any cached values that the sizing function is maintaining
sizingFunc
must return an object with the following properties: lefts
- an array of integers. The value lefts[i]
is the number of pixels in from the left edge of container
to place the left edge of cell i
in each row of the grid. tops
- an array of integers. The value tops[i]
is the number of pixels down from the top edge of container
to place the top edge of cell i
in each column of the grid. widths
- an array of integers. The value widths[i]
is the number of pixels wide to make the i
'th cell in each row of the grid. heights
- an array of integers. The value heights[i]
is the number of pixels tall to make the i
'th cell in each column of the grid. nothingChanged
- (Optional) a boolean
indicating whether or not to proceed with the layout algorithm. If nothingChanged
is true
then no further processing will be done for this widget or any of its children. The default is false
, which implies all of this widget's children will be visited.
majority
- one of GridLayout.ROW_MAJOR
or GridLayout.COL_MAJOR
.
count
- the number of rows or columns in the grid.
DefaultSizingFunction
<static> function DefaultSizingFunction(aspect, sizes, hMargin, vMargin, gutter)
checkAspect
<static> function checkAspect(allegedAspect)
getOldSizingFunc
<static> function getOldSizingFunc(aspect)
