diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-15 22:26:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-15 23:14:46 +0300 |
commit | 0d267737e23ba7032377a1aa2884d40a14025a39 (patch) | |
tree | c5d910ae1d6e39cf7b8c785dc087ccacfb2cab84 /source/blender/editors/include/UI_interface.h | |
parent | a70357104eb88fec5cabf61f91220a1cb44a7baf (diff) |
UI: support cycling callback for non RNA menus
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index fc824dc58df..108fcdda613 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -361,6 +361,13 @@ typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event); typedef void (*uiMenuCreateFunc)(struct bContext *C, struct uiLayout *layout, void *arg1); typedef void (*uiMenuHandleFunc)(struct bContext *C, void *arg, int event); +/** + * Used for cycling menu values without opening the menu (Ctrl-Wheel). + * \param direction: forward or backwards [1 / -1]. + * \param arg1: uiBut.poin (as with #uiMenuCreateFunc). + * \return true when the button was changed. + */ +typedef bool (*uiMenuStepFunc)(struct bContext *C, int direction, void *arg1); /* Popup Menus * @@ -693,6 +700,8 @@ void UI_but_func_drawextra_set( void (*func)(const struct bContext *C, void *, void *, void *, struct rcti *rect), void *arg1, void *arg2); +void UI_but_func_menu_step_set(uiBut *but, uiMenuStepFunc func); + void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *argN); void UI_but_tooltip_timer_remove(struct bContext *C, uiBut *but); |