PanelLayout$Typings extension
Properties
-
classType
↔ Function
-
(undocumented)
getter/setter pair
-
name
↔ String
-
Gets or sets the name of this instance of a particular panel layout.
getter/setter pair
Methods
-
arrange(Panel panel, Array<GraphObject> elements, Rect union)
→ void
-
After measuring, a Panel must arrange each element, giving the elements a position and size in the Panel's coordinate system.
This must call #arrangeElement with each Panel element, which will set that element's GraphObject#actualBounds.
-
arrangeElement(GraphObject obj, num x, num y, num width, num height, [Rect? clipRect])
→ void
-
Arranges the GraphObject onto its parent Panel.
The passed-in numbers typically account for GraphObject#margin and other offsets.
The
x
and y
coordinates are where GraphObjects will be placed within the Panel's own coordinates
(from the Panel's top-left corner). The width
and height
are the size it will take up within the Panel's coordinates.
-
measure(Panel panel, num width, num height, Array<GraphObject> elements, Rect union, num minw, num minh)
→ void
-
Given the available size, measure the Panel and
determine its expected drawing size.
-
measureElement(GraphObject obj, num width, num height, num minw, num minh)
→ void
-
Given the available size, measure one element of the Panel and
determine its expected drawing size. This sets the GraphObject#measuredBounds of the object,
which can then be used to determine the arrangement of objects in the PanelLayout.
-
remeasureObject(GraphObject obj)
→ void
-
Uncommon: Force a given GraphObject to remeasure in the near future.
If a PanelLayout is not just measuring elements, but must also modify some of its elements,
this must be called on those elements before modifications are made.
This prevents the elements from potentially remeasuring
the entire visual tree, which would cause an infinite loop.