diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 13:58:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 14:21:46 +0300 |
commit | 870b4b673511094cf0beaeaf07305407ccdda47a (patch) | |
tree | fb91f7c424f1971c35d537e520c519117e38f9d9 /source/blender/windowmanager/WM_types.h | |
parent | 6d8f63a8343a6c0b44318f0a856dcd0fd0206131 (diff) |
WM: refactor gestures for use as tools
Border and circle select wait for input by default.
This commit uses bool properties on the operators instead of
magic number (called "gesture_mode").
Keymaps that define 'deselect' for border/circle select
begin immediately, exiting when on button release.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index d8ec26f55da..6c47d61c535 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -413,10 +413,13 @@ typedef struct wmGesture { int swinid; /* initial subwindow id where it started */ int points; /* optional, amount of points stored */ int points_alloc; /* optional, maximum amount of points stored */ + int modal_state; /* For modal operators which may be running idle, waiting for an event to activate the gesture. * Typically this is set when the user is click-dragging the gesture (border and circle select for eg). */ uint is_active : 1; + /* Use for gestures that support both immediate or delayed activation. */ + uint wait_for_input : 1; void *customdata; /* customdata for border is a recti */ |