From c8583cac700329659487edd96a1b2f0c6b1af39e Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Wed, 11 Mar 2009 20:22:06 +0000 Subject: 2.5 / Area management * Add Area Swap: hold alt and drag with LMB from either actionzone. Release LMB on area you want to swap with. I added a matching cute cursor for this (and to make it a politically delicate issue, it's white on black). Note, there are still some error totblocks that I haven't been able to track down properly yet, so that's still a bit WIP. --- source/blender/windowmanager/intern/wm_cursors.c | 32 ++++++++++++++++++++++++ source/blender/windowmanager/wm_cursors.h | 1 + source/blender/windowmanager/wm_window.h | 2 -- 3 files changed, 33 insertions(+), 2 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index d1c268a1189..2c7493a51ab 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -935,6 +935,38 @@ BlenderCursor[BC_EYEDROPPER_CURSOR]=&EyedropperCursor; END_CURSOR_BLOCK +/********************** Swap Area Cursor ***********************/ +BEGIN_CURSOR_BLOCK +static char swap_sbm[]={ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, +}; + +static char swap_smsk[]={ + 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, + 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0xff, 0x07, + 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, 0xff, 0x07, +}; + +static BCursor SwapCursor = { + /*small*/ + swap_sbm, swap_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32,32, + 15, 15, + /*color*/ + BC_YELLOW, BC_BLUE +}; + +BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor; + +END_CURSOR_BLOCK /********************** Put the cursors in the array ***********************/ diff --git a/source/blender/windowmanager/wm_cursors.h b/source/blender/windowmanager/wm_cursors.h index 096e1916fa9..1a1a0d0b71d 100644 --- a/source/blender/windowmanager/wm_cursors.h +++ b/source/blender/windowmanager/wm_cursors.h @@ -92,6 +92,7 @@ enum { BC_NS_SCROLLCURSOR, BC_EW_SCROLLCURSOR, BC_EYEDROPPER_CURSOR, + BC_SWAPAREA_CURSOR, /* --- ALWAYS LAST ----- */ BC_NUMCURSORS, }; diff --git a/source/blender/windowmanager/wm_window.h b/source/blender/windowmanager/wm_window.h index f386510a2eb..7bf08617fb6 100644 --- a/source/blender/windowmanager/wm_window.h +++ b/source/blender/windowmanager/wm_window.h @@ -52,13 +52,11 @@ void wm_window_set_title (wmWindow *win, char *title); void wm_window_swap_buffers (wmWindow *win); wmWindow *wm_window_copy (bContext *C, wmWindow *winorig); -wmWindow *wm_window_rip (bContext *C, wmWindow *winorig); void wm_window_testbreak (void); /* *************** window operators ************** */ int wm_window_duplicate_op (bContext *C, wmOperator *op); -int wm_window_rip_op (bContext *C, wmOperator *op, struct wmEvent *event); int wm_window_fullscreen_toggle_op(bContext *C, wmOperator *op); -- cgit v1.2.3