From 1a2cfc0ff88b32372dcbc1d53d7cd8724853084d Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 14 Jun 2000 13:57:17 +0000 Subject: [PATCH] Makefile.am cursors/gimp-tool-cursors.xcf cursors/anchor.xbm new cursor 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. --- ChangeLog | 10 ++++++++++ Makefile.am | 2 ++ app/cursorutil.c | 11 +++++++++++ app/cursorutil.h | 1 + app/move.c | 6 +++--- app/tools/gimpmovetool.c | 6 +++--- app/tools/move.c | 6 +++--- app/widgets/gimpcursor.c | 11 +++++++++++ app/widgets/gimpcursor.h | 1 + cursors/anchor.xbm | 17 +++++++++++++++++ cursors/anchor_mask.xbm | 17 +++++++++++++++++ cursors/gimp-tool-cursors.xcf | Bin 39512 -> 41160 bytes 12 files changed, 79 insertions(+), 9 deletions(-) create mode 100644 cursors/anchor.xbm create mode 100644 cursors/anchor_mask.xbm 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 8cd35428b6b96ddf5e23e9b576bdf791ef70c155..c2ac68dc0adaeedc83672184dd32bfa7558a9fca 100644 GIT binary patch delta 3836 zcmc&%Yfx3!6<+(?3q&5u;{sQ5CEF2>5U5ziwo)s#36n&v4T%NoBVY|;ph6{aG+?+5 zwG)+C47)A-AfqIcjESAJ=}wzYnn`OWb^KGC&g7n!=}a0Yeb{!Yv2D^Afzxm8eGo6h zkIvYceDLjk*SFT%kF(C%_uSvT12vE$JfqAZ?we z$5{ZRW#$ji>mO!iIcgvyMZY??z$yDZB!&!#wCqbP0MatsN3WLVJg9z=o2FLhRH>(P zUN7x{$dCb%nA^t!AT4tT^^x4$McHpz17tvi=AlRi5-pf_6}{??+@^XWU(h{~1)_8m z3PT1&R{oD!0HkI9FV(T)R`p)NO}et+saYo~oH0?MnW!^*MPG_GiqbFfXn+ieNs4x` z07%QC2X%YVu261n+3wE!AK3XoOINwv-mzm>XP5fga;a`{cEm#~Io_hUH~1jYGcjcG zAbN(hEPjfOe469ulkgo1`w?>d|B#PA@_ovK<-jw}2D>K753Fp+upIVrmrZGY96}hM zLN;zXcrK)C;|QAcX)fk6{^_832of0e3QvYXb9kI6g=iwmD+$9n9)&9(GtGxDm(mgr zr6#gK&YProB5bUW%<=={3YLfeM98?Vx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