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

Construction state of the current reorderable group. More...

#include <gui_controls/subsystems/gui_reorderable_subsystem.h>

Public Attributes

tachyon::ID groupID = tachyon::ID::Invalid()
ReorderDirection direction = ReorderDirection::Vertical
bool isWrapped = false
bool reorderApplied = false
 the dragged item was moved in storage this frame
std::function< void(int, int)> onReorder
 from index, to index
std::function< void(int, tachyon::int2)> onDragOut
 Item index and screen cursor when an item is released outside the group.
std::function< void(int, tachyon::int2)> dragVisualizer
 Draws a ghost for the dragged item (index, cursor) while it is outside the group.
int nextItemIndex = 0
tachyon::ElementRef groupRef = tachyon::ElementRef::Invalid()
tachyon::ID dropAreaID = tachyon::ID::Invalid()
 Counts as the group while an item is dragged (a tab bar's TabBarOptions::dropArea); Invalid: the group.
std::vector< tachyon::ElementRef > itemRefs
int keyboardFrom = -1
 Alt + an arrow along the group with the focus in item keyboardFrom: moved by keyboardStep in EndReorderableGroup, after the caller's items are built.
int keyboardStep = 0

Detailed Description

Construction state of the current reorderable group.

Valid only between BeginReorderableGroup and EndReorderableGroup; handlers must capture what they need.

Member Data Documentation

◆ groupID

tachyon::ID tachyon::ReorderableConstructionState::groupID = tachyon::ID::Invalid()

◆ direction

ReorderDirection tachyon::ReorderableConstructionState::direction = ReorderDirection::Vertical

◆ isWrapped

bool tachyon::ReorderableConstructionState::isWrapped = false

◆ reorderApplied

bool tachyon::ReorderableConstructionState::reorderApplied = false

the dragged item was moved in storage this frame

◆ onReorder

std::function<void(int, int)> tachyon::ReorderableConstructionState::onReorder

from index, to index

◆ onDragOut

std::function<void(int, tachyon::int2)> tachyon::ReorderableConstructionState::onDragOut

Item index and screen cursor when an item is released outside the group.

◆ dragVisualizer

std::function<void(int, tachyon::int2)> tachyon::ReorderableConstructionState::dragVisualizer

Draws a ghost for the dragged item (index, cursor) while it is outside the group.

◆ nextItemIndex

int tachyon::ReorderableConstructionState::nextItemIndex = 0

◆ groupRef

tachyon::ElementRef tachyon::ReorderableConstructionState::groupRef = tachyon::ElementRef::Invalid()

◆ dropAreaID

tachyon::ID tachyon::ReorderableConstructionState::dropAreaID = tachyon::ID::Invalid()

Counts as the group while an item is dragged (a tab bar's TabBarOptions::dropArea); Invalid: the group.

◆ itemRefs

std::vector<tachyon::ElementRef> tachyon::ReorderableConstructionState::itemRefs

◆ keyboardFrom

int tachyon::ReorderableConstructionState::keyboardFrom = -1

Alt + an arrow along the group with the focus in item keyboardFrom: moved by keyboardStep in EndReorderableGroup, after the caller's items are built.

◆ keyboardStep

int tachyon::ReorderableConstructionState::keyboardStep = 0

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