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:
authorDalai Felinto <dfelinto@gmail.com>2019-03-01 19:14:16 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-03-01 21:39:04 +0300
commit92182495da881d54310bc6dd53afb91daf00116f (patch)
tree1678252eac993de439603db327f8350db77c3edf /source/blender/editors/include/UI_interface.h
parenta577499c7521c5fcfaefd58ec1d8940886563adc (diff)
Fix T62016: Outliner visibility icons drag behaviour broken
We are mixing bool and fancy 3-in-1 func-set buttons in the outliner. So they would return different pushed state in ui_drag_toggle_but_pushed_state(). We now have a callback function that allows the button to set its own pushed_button_state callback function. Note: This is a bit of overkill since we are planning to change the 3-in-1 outliner buttons. That said, it may be nice to have, since in the future we can mix those buttons for other things. Reviewers: brecht Differential Revision: https://developer.blender.org/D4434
Diffstat (limited to 'source/blender/editors/include/UI_interface.h')
-rw-r--r--source/blender/editors/include/UI_interface.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 9c771994c4b..d9b2b09a117 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -438,6 +438,7 @@ typedef struct ARegion *(*uiButSearchCreateFunc)(struct bContext *C, struct AReg
typedef void (*uiButSearchFunc)(const struct bContext *C, void *arg, const char *str, uiSearchItems *items);
/* Must return allocated string. */
typedef char *(*uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip);
+typedef int (*uiButPushedStateFunc)(struct bContext *C, void *arg);
typedef void (*uiBlockHandleFunc)(struct bContext *C, void *arg, int event);
@@ -880,6 +881,8 @@ void UI_but_focus_on_enter_event(struct wmWindow *win, uiBut *but);
void UI_but_func_hold_set(uiBut *but, uiButHandleHoldFunc func, void *argN);
+void UI_but_func_pushed_state_set(uiBut *but, uiButPushedStateFunc func, void *arg);
+
/* Autocomplete
*
* Tab complete helper functions, for use in uiButCompleteFunc callbacks.