|
TachyonUI 0.1.0
High-performance UI for building tools.
|
Drag & drop setup for item-based views (tree, list, grid): items drag a payload and accept drops of the same payloadType. More...
#include <gui_controls/gui_widget_state_types.h>
Public Attributes | |
| uint32_t | payloadType = 0 |
| 0 = disabled | |
| std::function< uintptr_t(tachyon::ID)> | getPayload |
| What to drag: the payload value for an item ID. | |
| std::function< bool(uintptr_t payload, tachyon::ID targetID)> | canDrop |
| Optional: returning false refuses the payload at that target (e.g. | |
| std::function< void(uintptr_t, tachyon::ID)> | onDrop |
| Called with the dropped payload and the target ID (in a grid, the view's ID for a drop on the background). | |
| std::function< void(uintptr_t srcPayload, tachyon::ID targetID, TreeDropPosition pos)> | onReorder |
| Tree reorder; when set, rows become drop targets with sibling and child zones. | |
| bool | dropInsideOnly = false |
| Every drop on a row means InsideLast (folder-style targets, no sibling reordering). | |
| tachyon::DragVisualizer | visualizer |
| optional visual feedback | |
Drag & drop setup for item-based views (tree, list, grid): items drag a payload and accept drops of the same payloadType.
| uint32_t tachyon::ItemDragDropConfig::payloadType = 0 |
0 = disabled
| std::function<uintptr_t(tachyon::ID)> tachyon::ItemDragDropConfig::getPayload |
What to drag: the payload value for an item ID.
| std::function<bool(uintptr_t payload, tachyon::ID targetID)> tachyon::ItemDragDropConfig::canDrop |
Optional: returning false refuses the payload at that target (e.g.
a folder rejecting its own parent).
| std::function<void(uintptr_t, tachyon::ID)> tachyon::ItemDragDropConfig::onDrop |
| std::function<void(uintptr_t srcPayload, tachyon::ID targetID, TreeDropPosition pos)> tachyon::ItemDragDropConfig::onReorder |
Tree reorder; when set, rows become drop targets with sibling and child zones.
| bool tachyon::ItemDragDropConfig::dropInsideOnly = false |
Every drop on a row means InsideLast (folder-style targets, no sibling reordering).
| tachyon::DragVisualizer tachyon::ItemDragDropConfig::visualizer |
optional visual feedback