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

Persistent drag state; one drag at a time application-wide. More...

#include <gui_controls/subsystems/gui_reorderable_subsystem.h>

Public Member Functions

bool IsPressed () const
 An item is pressed (maybe not yet dragged).
bool IsDragging () const
 An item is pressed and has moved the drag distance.
tachyon::int2 Offset () const
 The pointer's travel since the press, layout space.

Public Attributes

PointerDrag press
 the item's press; a drag once it moves the drag distance
tachyon::int2 cursorLocal {}
 latest pointer, layout space (like originalRects, groupRect)
tachyon::int2 cursorScreen {}
 latest pointer, screen pixels
bool isWrapped = false
 the group wraps its items onto several lines
tachyon::ID groupID = tachyon::ID::Invalid()
int draggedIndex = -1
 slot the item was dragged from
int insertionIndex = -1
 slot it would drop into
int itemCount = 0
 the group's items, the slots (other children aren't)
std::vector< tachyon::IntRect > originalRects
 item rects at drag start, layout space
std::vector< tachyon::ID > originalIDs
 Child IDs at drag start, in slot order, so MouseUp can resolve slots by ID (storage is already visually reordered by then).
ReorderDirection direction = ReorderDirection::Vertical
tachyon::IntRect groupRect {}
 group bounds at drag start, layout space

Detailed Description

Persistent drag state; one drag at a time application-wide.

Member Function Documentation

◆ IsPressed()

bool tachyon::ReorderableDragState::IsPressed ( ) const
inline

An item is pressed (maybe not yet dragged).

◆ IsDragging()

bool tachyon::ReorderableDragState::IsDragging ( ) const
inline

An item is pressed and has moved the drag distance.

◆ Offset()

tachyon::int2 tachyon::ReorderableDragState::Offset ( ) const
inline

The pointer's travel since the press, layout space.

Member Data Documentation

◆ press

PointerDrag tachyon::ReorderableDragState::press

the item's press; a drag once it moves the drag distance

◆ cursorLocal

tachyon::int2 tachyon::ReorderableDragState::cursorLocal {}

latest pointer, layout space (like originalRects, groupRect)

◆ cursorScreen

tachyon::int2 tachyon::ReorderableDragState::cursorScreen {}

latest pointer, screen pixels

◆ isWrapped

bool tachyon::ReorderableDragState::isWrapped = false

the group wraps its items onto several lines

◆ groupID

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

◆ draggedIndex

int tachyon::ReorderableDragState::draggedIndex = -1

slot the item was dragged from

◆ insertionIndex

int tachyon::ReorderableDragState::insertionIndex = -1

slot it would drop into

◆ itemCount

int tachyon::ReorderableDragState::itemCount = 0

the group's items, the slots (other children aren't)

◆ originalRects

std::vector<tachyon::IntRect> tachyon::ReorderableDragState::originalRects

item rects at drag start, layout space

◆ originalIDs

std::vector<tachyon::ID> tachyon::ReorderableDragState::originalIDs

Child IDs at drag start, in slot order, so MouseUp can resolve slots by ID (storage is already visually reordered by then).

◆ direction

ReorderDirection tachyon::ReorderableDragState::direction = ReorderDirection::Vertical

◆ groupRect

tachyon::IntRect tachyon::ReorderableDragState::groupRect {}

group bounds at drag start, layout space


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