Package limn.scene.layout
@NullMarked
package limn.scene.layout
Layout containers:
Row and Column
over the shared simplified flexbox Flex, with
Expanded taking a weighted share of the leftover main-axis
space; Wrap places children along a line and starts a new
line below when the next one does not fit; Grid places them in
a fixed number of columns, row by row, so that they line up on both axes;
Stack overlays children, Padding wraps
one child in edge insets, SizedBox fixes a dimension or
spaces rigidly, Opacity draws one child as one picture at an
opacity and fades it, and Transform draws one child moved, scaled or
flipped without moving anything layout placed. All of them are plain widgets: a container an
application writes
participates in measure and layout on the same terms.-
ClassDescriptionVertical
Flex: children stack top to bottom.A widget whose children are whatever the application puts in it: the one kind of widget that adds and removes children in public.Simplified flexbox shared byColumnandRow: children flow along the main axis with an optionalgap;Expandedchildren split the leftover main-axis space by flex weight; alignment controls the distribution of leftovers (Flex.MainAlignment) and cross-axis placement (Flex.CrossAlignment, including STRETCH).Cross-axis placement.How leftover space along the layout axis is distributed, on two vocabularies that coexist on purpose.Places children in a fixed number of columns, row by row in the order they were added, so that they line up on both axes: the layout for a form of captions beside fields, a sheet of names beside values, or any set of rows whose cells should share their columns' edges.Draws one child, and everything under it, at an opacity, as one picture: 1, the default, draws the child as it always was; 0 draws nothing; between, the child is drawn into an offscreen layer and laid over what is beneath with the opacity once, so the parts of it that overlap do not show through each other (a row's highlight through its icon, a panel's shadow through the panel).Wraps one child with edge insets.HorizontalFlex: children flow left to right.Forces a fixed width and/or height (unset dimensions pass through to the child, or collapse to zero without one).Overlays children on top of each other (later children on top; the base for overlays and modal dialogs).Where a child sits in the stack's box, on two vocabularies that coexist on purpose.Draws one child moved, scaled, rotated, skewed, flipped or turned in depth, without changing where layout put anything: a render transform.Which wayflipToturns the child over: two about the vertical axis that follow the reading direction, and two about the horizontal axis that do not.Places children one after another along a line in reading order, and starts a new line below when the next child does not fit in what is left of the width: the layout for a set of tags, chips, filters or buttons whose number or length is not known when the window is designed.