diff --git a/ChangeLog b/ChangeLog index f48da9608e..939ac19ae2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-06-14 Michael Natterer + + * Makefile.am + * cursors/gimp-tool-cursors.xcf + * cursors/anchor.xbm + * cursors/anchor_mask.xbm: new cursor modifier for the move tool. + + * app/cursorutil.[ch] + * app/move.c: use the new modifier for anchoring floating selections. + 2000-06-14 Michael Natterer * Makefile.am: typo. diff --git a/Makefile.am b/Makefile.am index 2ede497ea8..d639b9deff 100644 --- a/Makefile.am +++ b/Makefile.am @@ -47,6 +47,8 @@ EXTRA_DIST = \ cursors/resize_mask.xbm \ cursors/control.xbm \ cursors/control_mask.xbm \ + cursors/anchor.xbm \ + cursors/anchor_mask.xbm \ cursors/hand.xbm \ cursors/hand_mask.xbm \ \ diff --git a/app/cursorutil.c b/app/cursorutil.c index 550802e53b..7310309a04 100644 --- a/app/cursorutil.c +++ b/app/cursorutil.c @@ -47,6 +47,8 @@ #include "cursors/resize_mask.xbm" #include "cursors/control.xbm" #include "cursors/control_mask.xbm" +#include "cursors/anchor.xbm" +#include "cursors/anchor_mask.xbm" #include "cursors/hand.xbm" #include "cursors/hand_mask.xbm" @@ -97,6 +99,7 @@ enum GIMP_MOVE_CURSOR, GIMP_RESIZE_CURSOR, GIMP_CONTROL_CURSOR, + GIMP_ANCHOR_CURSOR, GIMP_HAND_CURSOR }; @@ -133,6 +136,11 @@ static BitmapCursor modifier_cursors[] = control_width, control_height, control_x_hot, control_y_hot, NULL, NULL, NULL }, + { + anchor_bits, anchor_mask_bits, + anchor_width, anchor_height, + anchor_x_hot, anchor_y_hot, NULL, NULL, NULL + }, { hand_bits, hand_mask_bits, hand_width, hand_height, @@ -255,6 +263,9 @@ gimp_change_win_cursor (GdkWindow *win, case CURSOR_MODIFIER_CONTROL: modtype = GIMP_CONTROL_CURSOR; break; + case CURSOR_MODIFIER_ANCHOR: + modtype = GIMP_ANCHOR_CURSOR; + break; case CURSOR_MODIFIER_HAND: modtype = GIMP_HAND_CURSOR; break; diff --git a/app/cursorutil.h b/app/cursorutil.h index 13f84d3d07..d26ed695ef 100644 --- a/app/cursorutil.h +++ b/app/cursorutil.h @@ -58,6 +58,7 @@ typedef enum CURSOR_MODIFIER_MOVE, CURSOR_MODIFIER_RESIZE, CURSOR_MODIFIER_CONTROL, + CURSOR_MODIFIER_ANCHOR, CURSOR_MODIFIER_HAND } CursorModifier; diff --git a/app/move.c b/app/move.c index d19305f268..c45b53837d 100644 --- a/app/move.c +++ b/app/move.c @@ -367,9 +367,9 @@ move_tool_cursor_update (Tool *tool, /* if there is a floating selection, and this aint it... */ if (gimage_floating_sel (gdisp->gimage) && !layer_is_floating_sel (layer)) - gdisplay_install_tool_cursor (gdisp, GDK_SB_DOWN_ARROW, - TOOL_TYPE_NONE, - CURSOR_MODIFIER_NONE, + gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, + RECT_SELECT, + CURSOR_MODIFIER_ANCHOR, FALSE); else if (layer == gdisp->gimage->active_layer) gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, diff --git a/app/tools/gimpmovetool.c b/app/tools/gimpmovetool.c index d19305f268..c45b53837d 100644 --- a/app/tools/gimpmovetool.c +++ b/app/tools/gimpmovetool.c @@ -367,9 +367,9 @@ move_tool_cursor_update (Tool *tool, /* if there is a floating selection, and this aint it... */ if (gimage_floating_sel (gdisp->gimage) && !layer_is_floating_sel (layer)) - gdisplay_install_tool_cursor (gdisp, GDK_SB_DOWN_ARROW, - TOOL_TYPE_NONE, - CURSOR_MODIFIER_NONE, + gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, + RECT_SELECT, + CURSOR_MODIFIER_ANCHOR, FALSE); else if (layer == gdisp->gimage->active_layer) gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, diff --git a/app/tools/move.c b/app/tools/move.c index d19305f268..c45b53837d 100644 --- a/app/tools/move.c +++ b/app/tools/move.c @@ -367,9 +367,9 @@ move_tool_cursor_update (Tool *tool, /* if there is a floating selection, and this aint it... */ if (gimage_floating_sel (gdisp->gimage) && !layer_is_floating_sel (layer)) - gdisplay_install_tool_cursor (gdisp, GDK_SB_DOWN_ARROW, - TOOL_TYPE_NONE, - CURSOR_MODIFIER_NONE, + gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, + RECT_SELECT, + CURSOR_MODIFIER_ANCHOR, FALSE); else if (layer == gdisp->gimage->active_layer) gdisplay_install_tool_cursor (gdisp, GIMP_MOUSE_CURSOR, diff --git a/app/widgets/gimpcursor.c b/app/widgets/gimpcursor.c index 550802e53b..7310309a04 100644 --- a/app/widgets/gimpcursor.c +++ b/app/widgets/gimpcursor.c @@ -47,6 +47,8 @@ #include "cursors/resize_mask.xbm" #include "cursors/control.xbm" #include "cursors/control_mask.xbm" +#include "cursors/anchor.xbm" +#include "cursors/anchor_mask.xbm" #include "cursors/hand.xbm" #include "cursors/hand_mask.xbm" @@ -97,6 +99,7 @@ enum GIMP_MOVE_CURSOR, GIMP_RESIZE_CURSOR, GIMP_CONTROL_CURSOR, + GIMP_ANCHOR_CURSOR, GIMP_HAND_CURSOR }; @@ -133,6 +136,11 @@ static BitmapCursor modifier_cursors[] = control_width, control_height, control_x_hot, control_y_hot, NULL, NULL, NULL }, + { + anchor_bits, anchor_mask_bits, + anchor_width, anchor_height, + anchor_x_hot, anchor_y_hot, NULL, NULL, NULL + }, { hand_bits, hand_mask_bits, hand_width, hand_height, @@ -255,6 +263,9 @@ gimp_change_win_cursor (GdkWindow *win, case CURSOR_MODIFIER_CONTROL: modtype = GIMP_CONTROL_CURSOR; break; + case CURSOR_MODIFIER_ANCHOR: + modtype = GIMP_ANCHOR_CURSOR; + break; case CURSOR_MODIFIER_HAND: modtype = GIMP_HAND_CURSOR; break; diff --git a/app/widgets/gimpcursor.h b/app/widgets/gimpcursor.h index 13f84d3d07..d26ed695ef 100644 --- a/app/widgets/gimpcursor.h +++ b/app/widgets/gimpcursor.h @@ -58,6 +58,7 @@ typedef enum CURSOR_MODIFIER_MOVE, CURSOR_MODIFIER_RESIZE, CURSOR_MODIFIER_CONTROL, + CURSOR_MODIFIER_ANCHOR, CURSOR_MODIFIER_HAND } CursorModifier; diff --git a/cursors/anchor.xbm b/cursors/anchor.xbm new file mode 100644 index 0000000000..131800f7b5 --- /dev/null +++ b/cursors/anchor.xbm @@ -0,0 +1,17 @@ +/* Created with The GIMP */ +#define anchor_width 32 +#define anchor_height 32 +#define anchor_x_hot 0 +#define anchor_y_hot 0 +static unsigned char anchor_bits[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0x70, 0x72, + 0x00, 0x00, 0x20, 0x22, 0x00, 0x00, 0x60, 0x32, 0x00, 0x00, 0xc0, 0x1f, + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/cursors/anchor_mask.xbm b/cursors/anchor_mask.xbm new file mode 100644 index 0000000000..b567dff2ac --- /dev/null +++ b/cursors/anchor_mask.xbm @@ -0,0 +1,17 @@ +/* Created with The GIMP */ +#define anchor_mask_width 32 +#define anchor_mask_height 32 +#define anchor_mask_x_hot 0 +#define anchor_mask_y_hot 0 +static unsigned char anchor_mask_bits[] = { + 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x0f, + 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, + 0x00, 0x00, 0x20, 0x27, 0x00, 0x00, 0x70, 0x77, 0x00, 0x00, 0xf8, 0xff, + 0x00, 0x00, 0x70, 0x77, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0x00, 0xe0, 0x3f, + 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/cursors/gimp-tool-cursors.xcf b/cursors/gimp-tool-cursors.xcf index 8cd35428b6..c2ac68dc0a 100644 Binary files a/cursors/gimp-tool-cursors.xcf and b/cursors/gimp-tool-cursors.xcf differ