Row
Horizontal flow: children are placed left-to-right, top-aligned, with gap empty cells between siblings.
Value parameters
- children
-
Layout items in render order (first = leftmost).
- gap
-
Number of cells between adjacent children. Negative values are treated as
0.
Attributes
Members list
Value members
Inherited methods
Natural (width, height) of this layout, in cells.
Natural (width, height) of this layout, in cells.
Attributes
- Inherited from:
- Layout
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
Resolve this layout into a flat list of absolute-positioned VNodes starting at at.
Wrap this layout in a RootNode with layout = Some(this), so the renderer resolves it at render time against the frame's full (width, height) budget.
Wrap this layout in a RootNode with layout = Some(this), so the renderer resolves it at render time against the frame's full (width, height) budget.
Prefer this form for full-screen apps and any layout containing Layout.Fill / Layout.Grid / Layout.Border: the resolved positions update with the terminal size, and Fill regions actually fill the available space instead of collapsing.
Equivalent to:
RootNode(width, height, Nil, input, layout = Some(this))
Value parameters
- height
-
Frame height — the resolver's available height budget.
- input
-
Optional focused input to attach to the root.
- width
-
Frame width — the resolver's available width budget.
Attributes
- Inherited from:
- Layout
Eagerly resolve this layout at at and wrap the resulting positioned vnodes in a RootNode.children list.
Eagerly resolve this layout at at and wrap the resulting positioned vnodes in a RootNode.children list.
'''Caveat — no size budget.''' This form calls Layout.resolve, which uses each layout's natural size and ignores the width / height arguments for sizing. As a result:
- Layout.Fill regions collapse to their natural (zero) size.
- The frame does not reflow when the terminal resizes — children are baked at the resolution time.
Use this form for fixed-size sub-regions, dialogs, panels you have already sized by hand, and golden-snapshot tests where you want deterministic positions.
For full-screen / resizable apps that want Fill and reflow, use toBudgetedRootNode instead — it puts the layout into RootNode.layout so the renderer resolves it against the actual frame size at render time.
Value parameters
- at
-
Origin for the layout resolver. Defaults to
(1, 1). - height
-
Terminal height to advertise on the root.
- input
-
Optional focused input to attach to the root.
- width
-
Terminal width to advertise on the root.
Attributes
- Inherited from:
- Layout