diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-23 22:10:41 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-09-23 22:10:41 +0300 |
commit | 48c3553660f4c20fc3bb4fb5df95c058adf9dd87 (patch) | |
tree | 7429980e80d3569b96f4f8225213b45a64a778b1 /src/ui/listwidget.h | |
parent | 1d4402e7ee9f208232227ded6add865b67e849af (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.h | 3 |
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 | ||
44 | iDeclareObjectConstruction(ListItem) | 46 | iDeclareObjectConstruction(ListItem) |
@@ -75,6 +77,7 @@ int visCount_ListWidget (const iListWidget *); | |||
75 | size_t itemIndex_ListWidget (const iListWidget *, iInt2 pos); | 77 | size_t itemIndex_ListWidget (const iListWidget *, iInt2 pos); |
76 | iRect itemRect_ListWidget (const iListWidget *, size_t index); | 78 | iRect itemRect_ListWidget (const iListWidget *, size_t index); |
77 | const iAnyObject * constItem_ListWidget (const iListWidget *, size_t index); | 79 | const iAnyObject * constItem_ListWidget (const iListWidget *, size_t index); |
80 | const iAnyObject * constDragItem_ListWidget (const iListWidget *); | ||
78 | const iAnyObject * constHoverItem_ListWidget (const iListWidget *); | 81 | const iAnyObject * constHoverItem_ListWidget (const iListWidget *); |
79 | size_t hoverItemIndex_ListWidget (const iListWidget *); | 82 | size_t hoverItemIndex_ListWidget (const iListWidget *); |
80 | 83 | ||