measure method
Given the available size, measure the Panel and determine its expected drawing size.
This must call #measureElement with each Panel element, which will set the
GraphObject#measuredBounds of those elements. Depending on how the Panel intends to lay out its elements,
the programmer must construction the union
by setting union.width
and union.height
of the supplied argument.
For example PanelLayoutHorizontal measures its elements and sums their widths to set its union.width
,
and takes the maximum of their heights to set its union.height
.
This union must reflect the measured size of the Panel. After measure is called, the Panel class will modify this union Rect, constraining its size by the Panel's GraphObject#desiredSize, GraphObject#minSize, and GraphObject#maxSize, before passing it to #arrange.
@expose @param {Panel} panel Panel which called this layout @param {number} width expected width of the Panel, informed by any containing Panel and by the Panel's own GraphObject#desiredSize, GraphObject#minSize, and GraphObject#maxSize. Often Infinity. @param {number} height expected height of the Panel. @param {Array.
Implementation
void measure(
_i3.Panel panel,
_i2.num width,
_i2.num height,
_i7.Array<_i3.GraphObject> elements,
_i3.Rect union,
_i2.num minw,
_i2.num minh,
) {
_i4.callMethod(
this,
'measure',
[
panel,
width,
height,
elements,
union,
minw,
minh,
],
);
}