class Layout
package koui.elements.layouts
extends Element
extended by AnchorPane, Expander, GridLayout, ScrollPane
Base class for all layouts.
Static methods
Variables
absorbEvents:Bool = false
If true
, this Layout does receive events and block sub-elements from
receiving them.
See also:
read onlyinvalidLayout:Bool = false
true
if the layout needs to be recalculated before the next frame.
spreadEvents:Bool = false
If true
, all elements of this layout will receive the same events
as the layout itself. Individual events are not received then.
This behaviour takes effect only if Layout.absorbEvents
is true
.
Methods
calcElementSize(element:Element, parentWidth:Int, parentHeight:Int):Bool
Calculates the size of the given element if the size is defined as dynamic by the element's style, taking the dimension of the parent container and the anchor point into account (the container might be a layout or a subsection for example).
Returns:
Bool Whether the element was resized
elemUpdated(element:Element):Void
Callback that layouts can override to get notified when an element changes its position or size. Useful for required recalculations. There is no default implementation.
invalidateLayout():Void
Mark this layout as invalid so that it is recalculated before the next frame is drawn.
inlinesetPadding(left:Int, right:Int, top:Int, bottom:Int):Void
Sets the padding values of this layout.
Parameters:
left | The left padding |
---|---|
right | The right padding |
top | The top padding |
bottom | The bottom padding |