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

Button/toggle groups: every item takes the group's item style (its :first-child and :last-child rules shape the ends), and a single-item group reverts to "solo", a plain button, in EndGroup. More...

#include <gui_controls/subsystems/gui_button_group_subsystem.h>

Classes

struct  ItemState
 One open group: its styles and the items registered so far. More...

Public Member Functions

 ButtonGroupSubsystem (FramePipeline &frame, ElementStorage &elementStorage, StyleManager &styleManager)
void BeginButtonGroup (ItemState state)
 Opens a button group at the current nesting depth.
void EndButtonGroup ()
 Closes the innermost button group, restyling a single item as solo.
void BeginToggleGroup (ItemState state)
 Opens a toggle group at the current nesting depth.
void EndToggleGroup ()
 Closes the innermost toggle group, restyling a single item as solo.
ItemState * GetActiveButton ()
 The innermost button group when it was opened at the current nesting depth, else nullptr.
ItemState * GetActiveToggle ()
 The innermost toggle group when it was opened at the current nesting depth, else nullptr.
tachyon::StyleRef NextItemStyleRef (ItemState &state)
 Style for the next item.
bool IsBalanced () const
 True iff every Begin*Group was matched by End*Group.

Detailed Description

Button/toggle groups: every item takes the group's item style (its :first-child and :last-child rules shape the ends), and a single-item group reverts to "solo", a plain button, in EndGroup.

Owns the group stacks; GUIApplication does the element registration.

Constructor & Destructor Documentation

◆ ButtonGroupSubsystem()

tachyon::ButtonGroupSubsystem::ButtonGroupSubsystem ( FramePipeline & frame,
ElementStorage & elementStorage,
StyleManager & styleManager )

Member Function Documentation

◆ BeginButtonGroup()

void tachyon::ButtonGroupSubsystem::BeginButtonGroup ( ItemState state)

Opens a button group at the current nesting depth.

◆ EndButtonGroup()

void tachyon::ButtonGroupSubsystem::EndButtonGroup ( )

Closes the innermost button group, restyling a single item as solo.

◆ BeginToggleGroup()

void tachyon::ButtonGroupSubsystem::BeginToggleGroup ( ItemState state)

Opens a toggle group at the current nesting depth.

◆ EndToggleGroup()

void tachyon::ButtonGroupSubsystem::EndToggleGroup ( )

Closes the innermost toggle group, restyling a single item as solo.

◆ GetActiveButton()

ItemState * tachyon::ButtonGroupSubsystem::GetActiveButton ( )

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

◆ GetActiveToggle()

ItemState * tachyon::ButtonGroupSubsystem::GetActiveToggle ( )

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

◆ NextItemStyleRef()

tachyon::StyleRef tachyon::ButtonGroupSubsystem::NextItemStyleRef ( ItemState & state)

Style for the next item.

The caller then stores the first item's registered ref in state.firstRef.

◆ IsBalanced()

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

True iff every Begin*Group was matched by End*Group.


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