Adjustments to continuous grab
authorCampbell Barton <ideasman42@gmail.com>
Sat, 17 Oct 2009 14:08:01 +0000 (14:08 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 17 Oct 2009 14:08:01 +0000 (14:08 +0000)
commit91d89c1ff7c215744e46957a1e7cc40adb7ac066
treea811c95542f7fd40ff13cf592dfff1077a34f7d4
parent53624a53d9054a91688a1a988c6f3515ab601923
Adjustments to continuous grab
- Use an enum for grab modes rather then boolean options.
 -- GHOST_kGrabNormal: continuous grab userpref disabled
 -- GHOST_kGrabWrap: wrap the mouse at the screen bounds *
 -- GHOST_kGrabHide: hide the mouse while grabbing and restore the mouse where it was initially pressed *

GrabWrap is nice for transform and tools where you want some idea where the cursor is, previously I found both restoring the mouse at its original location and restoring at a clamped location was confusing with operators like transform, wrapping is not ideal but IMHO the best of a bad bunch of options.
GrabHide  is for numbuts, where restoring the mouse at the initial location isnt so confusing.
15 files changed:
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_IWindow.h
intern/ghost/GHOST_Rect.h
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_Window.h
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/intern/GHOST_WindowX11.h
source/blender/editors/interface/interface_handlers.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_event_system.c