A flow-layout container: stacks its children in a row (vertical = false) or column
(vertical = true), spaced by gap with padding around the group. stretch sizes each
UIComponent child to fill the cross axis; otherwise align places them
(START/CENTER/END). The main axis auto-grows to fit — a vertical stack keeps its given
width and computes its height, a horizontal stack keeps its height and computes its width.
gap/padding are base (unscaled) pixels, scaled by UITheme.scale like the rest of the
library. Relayout happens on render(), so call invalidate() (or relayout()) after
changing a child's size; a theme scale change relayouts automatically. Non-interactive and
pointer-transparent — children keep their own interactivity.
Constructor
new(vertical:Bool, extent:Float, gap:Float = 8, padding:Float = 0)
Parameters:
vertical |
|
|---|---|
extent | the cross-axis size (width for a column, height for a row) |
gap | base spacing between children |
padding | base inset around the group |
Variables
Methods
add(child:DisplayObject):UIStack
Appends a child and relayouts.
Parameters:
child | the display object to add |
|---|
Returns:
this stack (for chaining)
addAll(children:Array<DisplayObject>):UIStack
Appends several children and relayouts.
Parameters:
children | the display objects to add |
|---|
Returns:
this stack (for chaining)
removeItem(child:DisplayObject):Void
Removes a child from the layout (does not dispose it).
Parameters:
child | the child to remove |
|---|