#include <Malena/Graphics/Controls/DragList.h>
|
| std::vector< int > | displayOrder (int count) const |
| int | dragIndex () const |
| int | dropIndex () const |
| float | ghostY () const |
| | Clamped Y for the floating ghost row (owner draws the dragged row here).
|
| bool | isDragging () const |
| void | onReorder (std::function< void(int from, int to)> cb) |
| void | onTap (std::function< void(int index)> cb) |
| void | setGeometry (float hitX0, float hitX1, float rowTop, int count, float rowHeight) |
| bool | update (float localX, float localY, bool down, bool live) |
Definition at line 26 of file DragList.h.
◆ displayOrder()
| std::vector< int > ml::DragList::displayOrder |
( |
int | count | ) |
const |
|
inline |
Row indices in display order: the dragged row sits at its drop slot; identity order otherwise. The owner draws a gap where slot's index == dragIndex().
Definition at line 80 of file DragList.h.
◆ dragIndex()
| int ml::DragList::dragIndex |
( |
| ) |
const |
|
inline |
◆ dropIndex()
| int ml::DragList::dropIndex |
( |
| ) |
const |
|
inline |
◆ ghostY()
| float ml::DragList::ghostY |
( |
| ) |
const |
|
inline |
Clamped Y for the floating ghost row (owner draws the dragged row here).
Definition at line 98 of file DragList.h.
◆ isDragging()
| bool ml::DragList::isDragging |
( |
| ) |
const |
|
inline |
◆ onReorder()
| void ml::DragList::onReorder |
( |
std::function< void(int from, int to)> | cb | ) |
|
|
inline |
◆ onTap()
| void ml::DragList::onTap |
( |
std::function< void(int index)> | cb | ) |
|
|
inline |
◆ setGeometry()
| void ml::DragList::setGeometry |
( |
float | hitX0, |
|
|
float | hitX1, |
|
|
float | rowTop, |
|
|
int | count, |
|
|
float | rowHeight ) |
|
inline |
Set the active list's geometry (all in the owner's local coords). hitX0..hitX1 is the horizontal band that starts a drag (exclude per-row buttons). count==0 disables dragging.
Definition at line 34 of file DragList.h.
◆ update()
| bool ml::DragList::update |
( |
float | localX, |
|
|
float | localY, |
|
|
bool | down, |
|
|
bool | live ) |
|
inline |
Feed once per frame with the cursor in the SAME local coords as setGeometry, the left-button state, and whether the list is currently interactive. Returns true when the visual state changed (owner should re-render).
Definition at line 44 of file DragList.h.
◆ kDragThreshold
| float ml::DragList::kDragThreshold = 6.f |
|
staticconstexpr |
The documentation for this class was generated from the following file: