summaryrefslogtreecommitdiff
path: root/src/ui/listwidget.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-09-23 22:10:41 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-09-23 22:10:41 +0300
commit48c3553660f4c20fc3bb4fb5df95c058adf9dd87 (patch)
tree7429980e80d3569b96f4f8225213b45a64a778b1 /src/ui/listwidget.h
parent1d4402e7ee9f208232227ded6add865b67e849af (diff)
ListWidget: Dragging items to reorder
Items can be marked as draggable, and additionally as drop targets.
Diffstat (limited to 'src/ui/listwidget.h')
-rw-r--r--src/ui/listwidget.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/listwidget.h b/src/ui/listwidget.h
index 314c183a..e586a003 100644
--- a/src/ui/listwidget.h
+++ b/src/ui/listwidget.h
@@ -39,6 +39,8 @@ struct Impl_ListItem {
39 iObject object; 39 iObject object;
40 iBool isSeparator; 40 iBool isSeparator;
41 iBool isSelected; 41 iBool isSelected;
42 iBool isDraggable;
43 iBool isDropTarget; /* may drag-and-drop another item on this */
42}; 44};
43 45
44iDeclareObjectConstruction(ListItem) 46iDeclareObjectConstruction(ListItem)
@@ -75,6 +77,7 @@ int visCount_ListWidget (const iListWidget *);
75size_t itemIndex_ListWidget (const iListWidget *, iInt2 pos); 77size_t itemIndex_ListWidget (const iListWidget *, iInt2 pos);
76iRect itemRect_ListWidget (const iListWidget *, size_t index); 78iRect itemRect_ListWidget (const iListWidget *, size_t index);
77const iAnyObject * constItem_ListWidget (const iListWidget *, size_t index); 79const iAnyObject * constItem_ListWidget (const iListWidget *, size_t index);
80const iAnyObject * constDragItem_ListWidget (const iListWidget *);
78const iAnyObject * constHoverItem_ListWidget (const iListWidget *); 81const iAnyObject * constHoverItem_ListWidget (const iListWidget *);
79size_t hoverItemIndex_ListWidget (const iListWidget *); 82size_t hoverItemIndex_ListWidget (const iListWidget *);
80 83