TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::LabelGroupSubsystem Class Reference

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.

Detailed Description

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

Constructor & Destructor Documentation

◆ LabelGroupSubsystem()

tachyon::LabelGroupSubsystem::LabelGroupSubsystem ( FramePipeline & frame,
ElementStorage & elementStorage,
GUIStateManager & guiStateManager,
GUITheme & theme )

Member Function Documentation

◆ BeginGroup()

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.

◆ EndGroup()

void tachyon::LabelGroupSubsystem::EndGroup ( )

Closes the innermost group.

◆ GetActiveGroup()

State * tachyon::LabelGroupSubsystem::GetActiveGroup ( )

The innermost group when it was opened at the current nesting depth, else nullptr.

◆ AddDragger()

void tachyon::LabelGroupSubsystem::AddDragger ( tachyon::ElementRef labelRef)

Adds a label to the innermost group and draws its resize edge; a group must be open.

◆ IsBalanced()

bool tachyon::LabelGroupSubsystem::IsBalanced ( ) const
inline

True iff every BeginGroup was matched by EndGroup.


The documentation for this class was generated from the following file: