A layout container that arranges child widgets along a given axis. More...
Public Member Functions | |
| Container (Axis direction, IWidget[]? children=null, SizeConstraint? width=null, SizeConstraint? height=null, Style? style=null, bool scrollable=false) | |
| Primary constructor matching quickstart usage: | |
| void | Render (IRenderContext ctx) |
| Render this widget into the provided context. | |
Properties | |
| IReadOnlyList< IWidget > | Children = [] [get] |
| Child widgets in declaration order. | |
| Axis | Direction [get] |
| Layout direction for children. | |
| SizeConstraint | Height = SizeConstraint.Flex(1) [get] |
| Height constraint used by the layout engine. | |
| bool | Scrollable [get] |
| When true, children that overflow the container's main axis are clipped and scrollable via ScrollOffset. | |
| int | ScrollOffset [get] |
| Row/column offset for scrollable containers. | |
| Style | Style = Style.Default [get] |
| Visual style applied as background fill before children render. | |
| SizeConstraint | Width = SizeConstraint.Flex(1) [get] |
| Width constraint used by the layout engine. | |
A layout container that arranges child widgets along a given axis.
Participates in two-pass layout via IContainer. Supports optional scrolling along the main axis.
| ConsoleForge.Widgets.Container.Container | ( | Axis | direction, |
| IWidget?[] | children = null, | ||
| SizeConstraint? | width = null, | ||
| SizeConstraint? | height = null, | ||
| Style? | style = null, | ||
| bool | scrollable = false ) |
Primary constructor matching quickstart usage:
| void ConsoleForge.Widgets.Container.Render | ( | IRenderContext | ctx | ) |
Render this widget into the provided context.
The context carries the allocated region, theme, and color profile. Implementations MUST NOT write outside ctx.Region.
Implements ConsoleForge.Layout.IWidget.
|
get |
Row/column offset for scrollable containers.
0-based lines/columns from the start of the children along the main axis.