Blender Git Commit Log
Git Commits -> Revision af2e6c3
Revision af2e6c3 by Damien Plisson (master) November 10, 2009, 12:56 (GMT) |
Drag & drop implementation at GHOST level (only OSX for now) The dragging sequence is performed in four phases: - Start sequence (GHOST_kEventDraggingEntered) that tells a drag'n'drop operation has started. Already gives the object data type, and the entering mouse location - Update mouse position (GHOST_kEventDraggingUpdated) sent upon each mouse move until the drag'n'drop operation stops, to give the updated mouse position. Useful to highlight a potential destination, and update the status (through GHOST_setAcceptDragOperation) telling if the object can be dropped at the current cursor position. - Abort drag'n'drop sequence (GHOST_kEventDraggingExited) sent when the user moved the mouse outside the window. - Send the dropped data (GHOST_kEventDraggingDropDone) - Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder) Note that the event handler is responsible for freeing the received data. And the mouse position is sent directly in blender client coordinates (y=0 at bottom) The GHOST_setAcceptDragOperation(TRUE) call must be placed before the user drops the object for it to be accepted. Current handled data types : - Text string - Array of filenames (full paths) - Bitmap image (not implemented yet) |
Commit Details:
Full Hash: af2e6c38e99024d5055e66e2aea75de61c3280e9
SVN Revision: 24448
Parent Commit: 14f9e68
Lines Changed: +380, -3
1 Added Path:
/intern/ghost/intern/GHOST_EventDragnDrop.h (+91, -0) (View)
10 Modified Paths:
/intern/ghost/GHOST_C-api.h (+11, -0) (Diff)
/intern/ghost/GHOST_ISystem.h (+21, -0) (Diff)
/intern/ghost/GHOST_Types.h (+30, -0) (Diff)
/intern/ghost/intern/GHOST_C-api.cpp (+7, -0) (Diff)
/intern/ghost/intern/GHOST_System.cpp (+10, -0) (Diff)
/intern/ghost/intern/GHOST_System.h (+18, -0) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.h (+15, -1) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.mm (+98, -0) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.h (+3, -1) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.mm (+76, -1) (Diff)
/intern/ghost/GHOST_ISystem.h (+21, -0) (Diff)
/intern/ghost/GHOST_Types.h (+30, -0) (Diff)
/intern/ghost/intern/GHOST_C-api.cpp (+7, -0) (Diff)
/intern/ghost/intern/GHOST_System.cpp (+10, -0) (Diff)
/intern/ghost/intern/GHOST_System.h (+18, -0) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.h (+15, -1) (Diff)
/intern/ghost/intern/GHOST_SystemCocoa.mm (+98, -0) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.h (+3, -1) (Diff)
/intern/ghost/intern/GHOST_WindowCocoa.mm (+76, -1) (Diff)