|
TachyonUI 0.1.0
High-performance UI for building tools.
|
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. | |
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.
| tachyon::ButtonGroupSubsystem::ButtonGroupSubsystem | ( | FramePipeline & | frame, |
| ElementStorage & | elementStorage, | ||
| StyleManager & | styleManager ) |
| void tachyon::ButtonGroupSubsystem::BeginButtonGroup | ( | ItemState | state | ) |
Opens a button group at the current nesting depth.
| void tachyon::ButtonGroupSubsystem::EndButtonGroup | ( | ) |
Closes the innermost button group, restyling a single item as solo.
| void tachyon::ButtonGroupSubsystem::BeginToggleGroup | ( | ItemState | state | ) |
Opens a toggle group at the current nesting depth.
| void tachyon::ButtonGroupSubsystem::EndToggleGroup | ( | ) |
Closes the innermost toggle group, restyling a single item as solo.
| ItemState * tachyon::ButtonGroupSubsystem::GetActiveButton | ( | ) |
The innermost button group when it was opened at the current nesting depth, else nullptr.
| ItemState * tachyon::ButtonGroupSubsystem::GetActiveToggle | ( | ) |
The innermost toggle group when it was opened at the current nesting depth, else nullptr.
| 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.
|
inline |
True iff every Begin*Group was matched by End*Group.