|
TachyonUI 0.1.0
High-performance UI for building tools.
|
Labels and DragLabels in a label group share a width; dragging any label's right edge resizes them all. More...
#include <gui_controls/subsystems/gui_label_group_subsystem.h>
Classes | |
| struct | State |
| State of one label group, kept across frames by group ID. More... | |
Public Member Functions | |
| LabelGroupSubsystem (FramePipeline &frame, ElementStorage &elementStorage, GUIStateManager &guiStateManager, GUITheme &theme) | |
| void | BeginGroup (tachyon::ID id, int32_t defaultWidth, int32_t minWidth, int32_t maxWidth, bool resizable=true) |
| Opens group id at the current nesting depth; widths are CSS px, and defaultWidth applies only when the group is new. | |
| void | EndGroup () |
| Closes the innermost group. | |
| State * | GetActiveGroup () |
| The innermost group when it was opened at the current nesting depth, else nullptr. | |
| void | AddDragger (tachyon::ElementRef labelRef) |
| Adds a label to the innermost group and draws its resize edge; a group must be open. | |
| bool | IsBalanced () const |
| True iff every BeginGroup was matched by EndGroup. | |
Labels and DragLabels in a label group share a width; dragging any label's right edge resizes them all.
Per-group state persists across frames, keyed by group ID.
OnPreConstruct -> reset transient per-group fields OnPostConstruct -> finalize edge state once all labels have emitted
| tachyon::LabelGroupSubsystem::LabelGroupSubsystem | ( | FramePipeline & | frame, |
| ElementStorage & | elementStorage, | ||
| GUIStateManager & | guiStateManager, | ||
| GUITheme & | theme ) |
| void tachyon::LabelGroupSubsystem::BeginGroup | ( | tachyon::ID | id, |
| int32_t | defaultWidth, | ||
| int32_t | minWidth, | ||
| int32_t | maxWidth, | ||
| bool | resizable = true ) |
Opens group id at the current nesting depth; widths are CSS px, and defaultWidth applies only when the group is new.
Called by GUIApplication's label-group methods.
| void tachyon::LabelGroupSubsystem::EndGroup | ( | ) |
Closes the innermost group.
| State * tachyon::LabelGroupSubsystem::GetActiveGroup | ( | ) |
The innermost group when it was opened at the current nesting depth, else nullptr.
| void tachyon::LabelGroupSubsystem::AddDragger | ( | tachyon::ElementRef | labelRef | ) |
Adds a label to the innermost group and draws its resize edge; a group must be open.
|
inline |
True iff every BeginGroup was matched by EndGroup.