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:
authorJulian Eisel <eiseljulian@gmail.com>2019-10-04 16:11:19 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-10-04 17:46:32 +0300
commitbe2cd4bb5325fa7950a412fdd14448d49b342b57 (patch)
tree17db2242628db893831dd4594601579edcd011b5 /source/blender/windowmanager/WM_api.h
parent0bcada85b362fcc1874a1bf13ece157870c0fea7 (diff)
WM: Utilities for select operators to work with click-dragging items
Based on work by Bastien and Brecht in the Node Editor, this adds more generalized support for selecting items so that click+drag actions on items (nodes, makers, dopesheet keys, etc.) works as wanted. Note that this only adds the barebones to support this in other editors, it's not used yet (will be done in followup commits). The behavior is supposed to work as follows: * Clicking an unselected item immediately selects it, and deselects other items (doesn't wait for release events). * Click+drag on an unselected item immediately selects it, deselects others and drags it in one go (don't require selecting it first!). * Click+drag on a selected item won't change the selection state (and won't send an undo push) and start dragging all selected items as soon as the drag event is recognized. * Clicking on a selected item will still deselect others, but that will only happen on mouse release, when we know the intention is not to drag the item. Included in: https://developer.blender.org/D5979 Reviewed by: Brecht van Lommel, William Reynish
Diffstat (limited to 'source/blender/windowmanager/WM_api.h')
-rw-r--r--source/blender/windowmanager/WM_api.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index df253d619c9..f8b6b5171da 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -335,6 +335,12 @@ void WM_event_timer_sleep(struct wmWindowManager *wm,
/* operator api, default callbacks */
/* invoke callback, uses enum property named "type" */
+int WM_generic_select_modal(struct bContext *C,
+ struct wmOperator *op,
+ const struct wmEvent *event);
+int WM_generic_select_invoke(struct bContext *C,
+ struct wmOperator *op,
+ const struct wmEvent *event);
void WM_operator_view3d_unit_defaults(struct bContext *C, struct wmOperator *op);
int WM_operator_smooth_viewtx_get(const struct wmOperator *op);
int WM_menu_invoke_ex(struct bContext *C, struct wmOperator *op, int opcontext);
@@ -474,6 +480,7 @@ void WM_operator_properties_select_random(struct wmOperatorType *ot);
int WM_operator_properties_select_random_seed_increment_get(wmOperator *op);
void WM_operator_properties_select_operation(struct wmOperatorType *ot);
void WM_operator_properties_select_operation_simple(struct wmOperatorType *ot);
+void WM_operator_properties_generic_select(struct wmOperatorType *ot);
struct CheckerIntervalParams {
int nth; /* bypass when set to zero */
int skip;