Drag-and-drop state, owned by GUIStateManager.
More...
#include <gui_core/state/gui_drag_drop_state.h>
|
| bool | IsDragging () const |
| ID | GetDraggedID () const |
| ID | GetDragOverID () const |
| uintptr_t | GetPayloadValue () const |
| bool | IsDropTargetFor (ID id, uint32_t acceptedPayloadType=0) const |
| | True when an active drag is over id and its payload type is acceptedPayloadType (0 accepts any type).
|
| ID | GetEnterTargetID () const |
| ID | GetOverTargetID () const |
| ID | GetOutTargetID () const |
| ID | GetDropTargetID () const |
| ID | GetValidatedTargetID () const |
| ID | GetTakerID () const |
| | The element whose handler took the drag under the pointer: the validated target or one of its ancestors.
|
| ID | GetEventSourceID () const |
| uint32_t | GetEventPayloadType () const |
| uintptr_t | GetEventPayloadValue () const |
| const std::any & | GetPayload () const |
| const std::any & | GetEventPayload () const |
| | The payload the drag events of this frame carry: the drag's own, or the one just dropped (the drag itself is over by then).
|
| void | Begin (ID sourceID, uint32_t payloadType, uintptr_t payloadValue, int2 startScreenPos, std::any payload={}, DragVisualizer sourceVisualizer={}) |
| | Arms a pending drag from sourceID; ignored for an Invalid source or payload type 0.
|
| void | SetSourceVisualizer (DragVisualizer sourceVisualizer) |
| void | UpdateFromInput (const InputState &in) |
| void | SetStartDistance (int32_t pixels) |
| | Pointer travel in pixels before a pending drag starts.
|
| void | Cancel () |
| void | SetValidatedTargetID (ID validated, ID taker) |
| | The element under the pointer whose chain took the drag (validated), and the one in that chain that took it (taker).
|
| void | SetValidatedTargetID (ID id) |
| void | SetFrameVisualizerOverride (DragVisualizer visualizer) |
| void | ClearFrameVisualizerOverride () |
| bool | InvokeActiveVisualizer (const DragVisualContext &context) const |
| void | ClearEvents () |
| | Clears per-frame events. GUIStateManager::EndFrame calls it; the input manager may too.
|
| void | BeginFrame () |
| void | EndFrameUpdate (ID hoveredForDrop, bool leftButtonDown) |
Drag-and-drop state, owned by GUIStateManager.
Begin arms a pending source on mouse-down; it becomes the active drag once the pointer passes the start distance. Per-frame events (enter / over / out / drop) are cleared at the top of the next EndFrame.
◆ IsDragging()
| bool tachyon::DragDropState::IsDragging |
( |
| ) |
const |
|
inline |
◆ GetDraggedID()
| ID tachyon::DragDropState::GetDraggedID |
( |
| ) |
const |
|
inline |
◆ GetDragOverID()
| ID tachyon::DragDropState::GetDragOverID |
( |
| ) |
const |
|
inline |
◆ GetPayloadValue()
| uintptr_t tachyon::DragDropState::GetPayloadValue |
( |
| ) |
const |
|
inline |
◆ IsDropTargetFor()
| bool tachyon::DragDropState::IsDropTargetFor |
( |
ID | id, |
|
|
uint32_t | acceptedPayloadType = 0 ) const |
True when an active drag is over id and its payload type is acceptedPayloadType (0 accepts any type).
◆ GetEnterTargetID()
| ID tachyon::DragDropState::GetEnterTargetID |
( |
| ) |
const |
|
inline |
◆ GetOverTargetID()
| ID tachyon::DragDropState::GetOverTargetID |
( |
| ) |
const |
|
inline |
◆ GetOutTargetID()
| ID tachyon::DragDropState::GetOutTargetID |
( |
| ) |
const |
|
inline |
◆ GetDropTargetID()
| ID tachyon::DragDropState::GetDropTargetID |
( |
| ) |
const |
|
inline |
◆ GetValidatedTargetID()
| ID tachyon::DragDropState::GetValidatedTargetID |
( |
| ) |
const |
|
inline |
◆ GetTakerID()
| ID tachyon::DragDropState::GetTakerID |
( |
| ) |
const |
|
inline |
The element whose handler took the drag under the pointer: the validated target or one of its ancestors.
Invalid when nothing there takes it.
◆ GetEventSourceID()
| ID tachyon::DragDropState::GetEventSourceID |
( |
| ) |
const |
|
inline |
◆ GetEventPayloadType()
| uint32_t tachyon::DragDropState::GetEventPayloadType |
( |
| ) |
const |
|
inline |
◆ GetEventPayloadValue()
| uintptr_t tachyon::DragDropState::GetEventPayloadValue |
( |
| ) |
const |
|
inline |
◆ GetPayload()
| const std::any & tachyon::DragDropState::GetPayload |
( |
| ) |
const |
|
inline |
◆ GetEventPayload()
| const std::any & tachyon::DragDropState::GetEventPayload |
( |
| ) |
const |
|
inline |
The payload the drag events of this frame carry: the drag's own, or the one just dropped (the drag itself is over by then).
◆ Begin()
| void tachyon::DragDropState::Begin |
( |
ID | sourceID, |
|
|
uint32_t | payloadType, |
|
|
uintptr_t | payloadValue, |
|
|
int2 | startScreenPos, |
|
|
std::any | payload = {}, |
|
|
DragVisualizer | sourceVisualizer = {} ) |
Arms a pending drag from sourceID; ignored for an Invalid source or payload type 0.
payload defaults to payloadValue.
◆ SetSourceVisualizer()
| void tachyon::DragDropState::SetSourceVisualizer |
( |
DragVisualizer | sourceVisualizer | ) |
|
◆ UpdateFromInput()
| void tachyon::DragDropState::UpdateFromInput |
( |
const InputState & | in | ) |
|
◆ SetStartDistance()
| void tachyon::DragDropState::SetStartDistance |
( |
int32_t | pixels | ) |
|
|
inline |
Pointer travel in pixels before a pending drag starts.
◆ Cancel()
| void tachyon::DragDropState::Cancel |
( |
| ) |
|
◆ SetValidatedTargetID() [1/2]
| void tachyon::DragDropState::SetValidatedTargetID |
( |
ID | validated, |
|
|
ID | taker ) |
|
inline |
The element under the pointer whose chain took the drag (validated), and the one in that chain that took it (taker).
◆ SetValidatedTargetID() [2/2]
| void tachyon::DragDropState::SetValidatedTargetID |
( |
ID | id | ) |
|
|
inline |
◆ SetFrameVisualizerOverride()
| void tachyon::DragDropState::SetFrameVisualizerOverride |
( |
DragVisualizer | visualizer | ) |
|
|
inline |
◆ ClearFrameVisualizerOverride()
| void tachyon::DragDropState::ClearFrameVisualizerOverride |
( |
| ) |
|
◆ InvokeActiveVisualizer()
| bool tachyon::DragDropState::InvokeActiveVisualizer |
( |
const DragVisualContext & | context | ) |
const |
◆ ClearEvents()
| void tachyon::DragDropState::ClearEvents |
( |
| ) |
|
◆ BeginFrame()
| void tachyon::DragDropState::BeginFrame |
( |
| ) |
|
◆ EndFrameUpdate()
| void tachyon::DragDropState::EndFrameUpdate |
( |
ID | hoveredForDrop, |
|
|
bool | leftButtonDown ) |
The documentation for this class was generated from the following file: