|
Ultralight C++ API 2.0.0
|
#include <AppCore/layout/Options.h>
Configuration options for a panel in a row or column.
Pass PanelOptions to Container::AddPanel() or Window::AddPanel() when adding a panel to a window layout. It declares how the panel shares space with sibling nodes along its parent container's axis.
The following example creates a resizable row with a sized sidebar and a default content panel:
Every field is optional. Passing an empty {} gives an unkeyed panel that takes one flex share (1fr).
For the supported size units, see Size and Length.
Setting key assigns a string identifier to the panel for diagnostics and retrieval. You can look up the panel later by passing its key to Window::FindPanel() or Container::Find().
Public Attributes | |
| String | key |
| Optional identity for lookup (Find()) and diagnostics. | |
| Size | size |
| The panel's size along its container's axis. | |
| Length | min_size |
| Minimum size constraint. | |
| Length | max_size |
| Maximum size constraint. | |
| bool | fixed = false |
| Whether or not the panel is fixed (the user cannot resize it by dragging a divider). | |
| bool | hidden = false |
| Whether or not the panel is created hidden. | |
| bool fixed = false |
Whether or not the panel is fixed (the user cannot resize it by dragging a divider).
| bool hidden = false |
Whether or not the panel is created hidden.
A hidden panel keeps its declared size and shows later without a layout flash.
| String key |
Optional identity for lookup (Find()) and diagnostics.
Empty means unkeyed, which is fully supported.
| Length max_size |
Maximum size constraint.
Percentages are relative to the container's content box (inside its padding). Unset means no maximum.
| Length min_size |
Minimum size constraint.
Percentages are relative to the container's content box (inside its padding). Unset means no minimum.
| Size size |
The panel's size along its container's axis.
Unset means one flex share (1fr). For what each unit means, see Size.