|
Ultralight C++ API 2.0.0
|
#include <AppCore/layout/Options.h>
Configuration options for a row or column container.
You pass ContainerOptions to Container::AddRow() or Container::AddColumn() when adding a container to a window's layout tree. These options configure the container's own size within its parent, alongside spacing and divider behavior for its direct children.
This creates a resizable row with child spacing and outer padding:
Because a container is also a layout child, it shares its sizing, constraints, and visibility options with PanelOptions. These fields govern how the container behaves within its parent container (see PanelOptions).
Settings on the container and its children control interactive divider behavior between panes:
To configure divider thickness and colors, call Container::SetDividerStyle() or Window::SetDividerStyle() (see DividerStyle).
Container options configure empty space around and between direct children:
Both properties accept only logical pixels. Percentage units are ignored with a warning.
Public Attributes | |
| String | key |
| Optional identity for lookup (Find()) and diagnostics. | |
| Size | size |
| The container's size along its parent's axis. | |
| Length | min_size |
| Minimum size constraint. | |
| Length | max_size |
| Maximum size constraint. | |
| bool | fixed = false |
| Whether or not the container is fixed (the user cannot resize it by dragging a divider). | |
| bool | resizable = false |
| Whether or not the user can resize this container's children by dragging the dividers between them. | |
| Length | gap |
| The gap between adjacent children (logical px only; other units are ignored with a warning). | |
| Length | padding |
| Padding between the container's edges and its children, applied on all four sides (logical px only). | |
| bool | hidden = false |
| Whether or not the container is created hidden (its whole subtree is hidden with it). | |
| bool fixed = false |
Whether or not the container is fixed (the user cannot resize it by dragging a divider).
| Length gap |
The gap between adjacent children (logical px only; other units are ignored with a warning).
Unset means no gap.
| bool hidden = false |
Whether or not the container is created hidden (its whole subtree is hidden with it).
| String key |
Optional identity for lookup (Find()) and diagnostics.
Empty means unkeyed.
| Length max_size |
Maximum size constraint.
Percentages are relative to the parent's content box (inside its padding). Unset means no maximum.
| Length min_size |
Minimum size constraint.
Percentages are relative to the parent's content box (inside its padding). Unset means no minimum.
| Length padding |
Padding between the container's edges and its children, applied on all four sides (logical px only).
Unset means no padding.
| bool resizable = false |
Whether or not the user can resize this container's children by dragging the dividers between them.
| Size size |
The container's size along its parent's axis.
Unset means one flex share (1fr).