Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-19 20:16:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-19 20:16:47 +0300
commit06737a82584c6be60a25b5f289e3fcd5c26b7aac (patch)
tree4753076b35cbbc36db947fe12a229110a4f92dcb /source/blender/editors/include/UI_interface.h
parente65643b9a3e90866b05f032fec1bc05f7d6ac999 (diff)
UI: popover-once (click-drag for single actions)
Experimental support for using popovers like menus, use this when the user hold the mouse down (previously this did nothing). This means turning frequently accessed menu items into popovers doesn't add more clicks to the existing use case.
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index f0db1782a7e..417aca1210e 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -144,8 +144,9 @@ enum {
#define UI_BLOCK_LIST_ITEM (1 << 19)
#define UI_BLOCK_RADIAL (1 << 20)
#define UI_BLOCK_POPOVER (1 << 21)
+#define UI_BLOCK_POPOVER_ONCE (1 << 22)
/** Always show keymaps, even for non-menus. */
-#define UI_BLOCK_SHOW_SHORTCUT_ALWAYS (1 << 22)
+#define UI_BLOCK_SHOW_SHORTCUT_ALWAYS (1 << 23)
/* uiPopupBlockHandle->menuretval */
#define UI_RETURN_CANCEL (1 << 0) /* cancel all menus cascading */
@@ -429,6 +430,7 @@ typedef struct uiPopover uiPopover;
uiPopover *UI_popover_begin(struct bContext *C) ATTR_NONNULL();
void UI_popover_end(struct bContext *C, struct uiPopover *head);
struct uiLayout *UI_popover_layout(uiPopover *head);
+void UI_popover_once_clear(uiPopover *pup);
/* interface_region_menu_pie.c */
/* Pie menus */
@@ -1234,6 +1236,9 @@ void UI_widgetbase_draw_cache_end(void);
/* Special drawing for toolbar, mainly workarounds for inflexible icon sizing. */
#define USE_TOOLBAR_HACK
+/* Support click-drag motion which presses the button and closes a popover (like a menu). */
+#define USE_POPOVER_ONCE
+
bool UI_but_is_tool(const uiBut *but);
#endif /* __UI_INTERFACE_H__ */