Commit 989d80e7 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

added fields for both the tool's toggled and untoggled GdkCursorType,

2002-02-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptool.[ch]: added fields for both the tool's
	toggled and untoggled GdkCursorType, GimpToolCursorType and
	GimpCursorModifier. Added a default implementation of
	gimp_tool_cursor_update() which uses the new fields. Added
	gimp_tool_set_cursor() as simple wrapper around the resp.
	GimpDisplayShell functions so tools don't need to know them.

	Tool implementations can either set the new fields in their
	cursor_update() function and chain up or call the new wrapper.

	* app/tools/gimpbezierselecttool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpbycolorselecttool.c
	* app/tools/gimpclonetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpconvolvetool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpdodgeburntool.c
	* app/tools/gimperasertool.c
	* app/tools/gimpfliptool.c
	* app/tools/gimpinktool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimppainttool.[ch]
	* app/tools/gimppathtool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsmudgetool.c
	* app/tools/gimptexttool.c
	* app/tools/gimptransformtool.c: changed accordingly:

	- set default values in the tools' instance_init functions.
	- changed the cursor_update() stuff.
	- removed inclusion of subclasses in gimppainttool.c
	- the cursor_update() functions are better than before but still evil.
	- i probably broke some of them...
parent 979feb6a
2002-02-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added fields for both the tool's
toggled and untoggled GdkCursorType, GimpToolCursorType and
GimpCursorModifier. Added a default implementation of
gimp_tool_cursor_update() which uses the new fields. Added
gimp_tool_set_cursor() as simple wrapper around the resp.
GimpDisplayShell functions so tools don't need to know them.
Tool implementations can either set the new fields in their
cursor_update() function and chain up or call the new wrapper.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpfliptool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.[ch]
* app/tools/gimppathtool.c
* app/tools/gimpselectiontool.c
* app/tools/gimpsmudgetool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c: changed accordingly:
- set default values in the tools' instance_init functions.
- changed the cursor_update() stuff.
- removed inclusion of subclasses in gimppainttool.c
- the cursor_update() functions are better than before but still evil.
- i probably broke some of them...
2002-02-03 Manish Singh <yosh@gimp.org>
* libgimpwidgets/gimpwidgets.c: ref and sink the adjustment we use
......
......@@ -227,9 +227,8 @@ gimp_clone_tool_init (GimpCloneTool *clone)
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
paint_tool->pick_colors = TRUE;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
paint_tool->flags |= TOOL_TRACES_ON_WINDOW;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
paint_tool->flags |= TOOL_TRACES_ON_WINDOW;
}
static void
......@@ -396,15 +395,12 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp)
{
CloneOptions *options;
GimpDisplayShell *shell;
GimpLayer *layer;
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
CloneOptions *options;
GimpLayer *layer;
GdkCursorType ctype = GIMP_MOUSE_CURSOR;
options = (CloneOptions *) tool->tool_info->tool_options;
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
if ((layer = gimp_image_get_active_layer (gdisp->gimage)))
{
int off_x, off_y;
......@@ -434,12 +430,9 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
ctype = GIMP_BAD_CURSOR;
}
gimp_display_shell_install_tool_cursor (shell,
ctype,
ctype == GIMP_CROSSHAIR_SMALL_CURSOR ?
GIMP_TOOL_CURSOR_NONE :
GIMP_CLONE_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
tool->cursor = ctype;
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
}
static void
......
......@@ -233,7 +233,10 @@ gimp_convolve_tool_init (GimpConvolveTool *convolve)
tool = GIMP_TOOL (convolve);
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
tool->tool_cursor = GIMP_BLUR_TOOL_CURSOR;
tool->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
tool->toggle_tool_cursor = GIMP_BLUR_TOOL_CURSOR;
tool->toggle_cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
}
static void
......@@ -258,7 +261,6 @@ gimp_convolve_tool_paint (GimpPaintTool *paint_tool,
default:
break;
}
}
static void
......@@ -289,8 +291,6 @@ gimp_convolve_tool_modifier_key (GimpTool *tool,
break;
}
}
tool->toggled = (options->type == SHARPEN_CONVOLVE);
}
static void
......@@ -367,7 +367,7 @@ gimp_convolve_tool_motion (GimpPaintTool *paint_tool,
rate = rate * 2.0 * paint_tool->cur_coords.pressure;
calculate_matrix (type, rate);
/* Image region near edges? If so, paint area will be clipped */
/* with respect to brush mask + 1 pixel border (# 19285) */
......
......@@ -197,11 +197,11 @@ gimp_dodgeburn_tool_init (GimpDodgeBurnTool *dodgeburn)
GimpTool *tool;
GimpPaintTool *paint_tool;
tool = GIMP_TOOL (dodgeburn);
tool = GIMP_TOOL (dodgeburn);
paint_tool = GIMP_PAINT_TOOL (dodgeburn);
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
tool->toggle_cursor = GIMP_BURN_TOOL_CURSOR;
tool->tool_cursor = GIMP_DODGE_TOOL_CURSOR;
tool->toggle_tool_cursor = GIMP_BURN_TOOL_CURSOR;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
}
......
......@@ -172,7 +172,10 @@ gimp_eraser_tool_init (GimpEraserTool *eraser)
tool = GIMP_TOOL (eraser);
paint_tool = GIMP_PAINT_TOOL (eraser);
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
tool->tool_cursor = GIMP_ERASER_TOOL_CURSOR;
tool->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
tool->toggle_tool_cursor = GIMP_ERASER_TOOL_CURSOR;
tool->toggle_cursor_modifier = GIMP_CURSOR_MODIFIER_MINUS;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
}
......@@ -194,8 +197,6 @@ gimp_eraser_tool_modifier_key (GimpTool *tool,
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (options->anti_erase_w),
! options->anti_erase);
}
tool->toggled = options->anti_erase;
}
static void
......
......@@ -552,11 +552,8 @@ gimp_ink_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp)
{
GimpDisplayShell *shell;
GimpLayer *layer;
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
GimpLayer *layer;
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
if ((layer = gimp_image_get_active_layer (gdisp->gimage)))
{
......@@ -579,10 +576,9 @@ gimp_ink_tool_cursor_update (GimpTool *tool,
}
}
gimp_display_shell_install_tool_cursor (shell,
ctype,
GIMP_INK_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
tool->cursor = ctype;
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
}
......
......@@ -54,10 +54,6 @@
#include "display/gimpdisplayshell.h"
#include "display/gimpstatusbar.h"
#include "gimpdrawtool.h"
#include "gimpdodgeburntool.h"
#include "gimperasertool.h"
#include "gimpconvolvetool.h"
#include "gimppainttool.h"
#include "app_procs.h"
......@@ -559,8 +555,6 @@ gimp_paint_tool_motion (GimpTool *tool,
paint_tool->last_coords = paint_tool->cur_coords;
}
/* FIXME: this belongs in the individual tools */
static void
gimp_paint_tool_cursor_update (GimpTool *tool,
GimpCoords *coords,
......@@ -572,10 +566,7 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
GimpDisplayShell *shell;
GimpLayer *layer;
gchar status_str[STATUSBAR_SIZE];
GdkCursorType ctype = GIMP_MOUSE_CURSOR;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE;
gboolean ctoggle = FALSE;
gboolean pick_colors = FALSE;
paint_tool = GIMP_PAINT_TOOL (tool);
draw_tool = GIMP_DRAW_TOOL (tool);
......@@ -587,26 +578,6 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
gimp_statusbar_pop (GIMP_STATUSBAR (shell->statusbar), "paint_tool");
#ifdef __GNUC__
#warning this doesnt belong here
#endif
/* Set toggle cursors for various paint tools */
if (tool->toggled)
{
if (GIMP_IS_ERASER_TOOL (tool))
{
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
}
else if (GIMP_IS_CONVOLVE_TOOL (tool))
{
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
}
else if (GIMP_IS_DODGEBURN_TOOL (tool))
{
ctoggle = TRUE;
}
}
if ((layer = gimp_image_get_active_layer (gdisp->gimage)))
{
gint off_x, off_y;
......@@ -644,8 +615,12 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
break;
}
dx = idx > 0 ? (cosinus[6-i] * radius) >> 8 : - ((cosinus[6-i] * radius) >> 8);
dy = idy > 0 ? (cosinus[i] * radius) >> 8 : - ((cosinus[i] * radius) >> 8);
dx = (idx > 0 ?
(cosinus[6-i] * radius) >> 8 :
- ((cosinus[6-i] * radius) >> 8));
dy = (idy > 0 ?
(cosinus[i] * radius) >> 8 :
- ((cosinus[i] * radius) >> 8));
}
paint_tool->cur_coords.x = paint_tool->last_coords.x + dx;
......@@ -661,20 +636,20 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
}
else
{
gchar *format_str =
g_strdup_printf ("%%.%df %s",
gimp_unit_get_digits (gdisp->gimage->unit),
gimp_unit_get_symbol (gdisp->gimage->unit));
gchar format_str[64];
g_snprintf (format_str, sizeof (format_str), "%%.%df %s",
gimp_unit_get_digits (gdisp->gimage->unit),
gimp_unit_get_symbol (gdisp->gimage->unit));
d = (gimp_unit_get_factor (gdisp->gimage->unit) *
sqrt (SQR (dx / gdisp->gimage->xresolution) +
SQR (dy / gdisp->gimage->yresolution)));
g_snprintf (status_str, sizeof (status_str), format_str, d);
g_free (format_str);
}
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar),
"paint_tool",
gimp_statusbar_push (GIMP_STATUSBAR (shell->statusbar), "paint_tool",
status_str);
if (draw_tool->gc == NULL)
......@@ -693,34 +668,23 @@ gimp_paint_tool_cursor_update (GimpTool *tool,
! (state & GDK_SHIFT_MASK) &&
(state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)))
{
ctype = GIMP_COLOR_PICKER_CURSOR;
}
/* Normal operation -- no modifier pressed or first stroke */
else
{
if (coords->x >= off_x &&
coords->y >= off_y &&
coords->x < (off_x + gimp_drawable_width (GIMP_DRAWABLE (layer))) &&
coords->y < (off_y + gimp_drawable_height (GIMP_DRAWABLE (layer))))
{
/* One more test--is there a selected region?
* if so, is cursor inside?
*/
if (gimp_image_mask_is_empty (gdisp->gimage))
ctype = GIMP_MOUSE_CURSOR;
else if (gimp_image_mask_value (gdisp->gimage,
coords->x, coords->y))
ctype = GIMP_MOUSE_CURSOR;
}
pick_colors = TRUE;
}
}
gimp_display_shell_install_tool_cursor (shell,
ctype,
ctype == GIMP_COLOR_PICKER_CURSOR ?
GIMP_COLOR_PICKER_TOOL_CURSOR :
ctoggle ?
tool->toggle_cursor : tool->tool_cursor,
cmodifier);
if (pick_colors)
{
gimp_tool_set_cursor (tool, gdisp,
GIMP_COLOR_PICKER_CURSOR,
GIMP_COLOR_PICKER_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
}
else
{
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool,
coords,
state,
gdisp);
}
}
......
......@@ -63,26 +63,26 @@ typedef struct _GimpPaintToolClass GimpPaintToolClass;
struct _GimpPaintTool
{
GimpDrawTool parent_instance;
GimpDrawTool parent_instance;
GimpCoords start_coords; /* starting coords */
GimpCoords cur_coords; /* current coords */
GimpCoords last_coords; /* last coords */
GimpCoords start_coords; /* starting coords */
GimpCoords cur_coords; /* current coords */
GimpCoords last_coords; /* last coords */
gint state; /* state of buttons and keys */
gint state; /* state of buttons and keys */
gdouble distance; /* distance traveled by brush */
gdouble pixel_dist; /* distance in pixels */
gdouble spacing; /* spacing */
gdouble distance; /* distance traveled by brush */
gdouble pixel_dist; /* distance in pixels */
gdouble spacing; /* spacing */
gint x1, y1; /* image space coordinate */
gint x2, y2; /* image space coords */
gint x1, y1; /* image space coordinate */
gint x2, y2; /* image space coords */
GimpBrush * brush; /* current brush */
GimpBrush *brush; /* current brush */
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
ToolFlags flags; /* tool flags, see ToolFlags above */
gboolean pick_colors; /* pick color if ctrl or alt is pressed */
gboolean pick_state; /* was ctrl or alt pressed when clicked? */
ToolFlags flags; /* tool flags, see ToolFlags above */
};
struct _GimpPaintToolClass
......
......@@ -171,7 +171,7 @@ gimp_smudge_tool_init (GimpSmudgeTool *smudge)
tool->tool_cursor = GIMP_SMUDGE_TOOL_CURSOR;
paint_tool->pick_colors = TRUE;
paint_tool->pick_colors = TRUE;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
}
......
......@@ -227,9 +227,8 @@ gimp_clone_tool_init (GimpCloneTool *clone)
tool->tool_cursor = GIMP_CLONE_TOOL_CURSOR;
paint_tool->pick_colors = TRUE;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
paint_tool->flags |= TOOL_TRACES_ON_WINDOW;
paint_tool->flags |= TOOL_CAN_HANDLE_CHANGING_BRUSH;
paint_tool->flags |= TOOL_TRACES_ON_WINDOW;
}
static void
......@@ -396,15 +395,12 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
GdkModifierType state,
GimpDisplay *gdisp)
{
CloneOptions *options;
GimpDisplayShell *shell;
GimpLayer *layer;
GdkCursorType ctype = GDK_TOP_LEFT_ARROW;
CloneOptions *options;
GimpLayer *layer;
GdkCursorType ctype = GIMP_MOUSE_CURSOR;
options = (CloneOptions *) tool->tool_info->tool_options;
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
if ((layer = gimp_image_get_active_layer (gdisp->gimage)))
{
int off_x, off_y;
......@@ -434,12 +430,9 @@ gimp_clone_tool_cursor_update (GimpTool *tool,
ctype = GIMP_BAD_CURSOR;
}
gimp_display_shell_install_tool_cursor (shell,
ctype,
ctype == GIMP_CROSSHAIR_SMALL_CURSOR ?
GIMP_TOOL_CURSOR_NONE :
GIMP_CLONE_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
tool->cursor = ctype;
GIMP_TOOL_CLASS (parent_class)->cursor_update (tool, coords, state, gdisp);
}
static void
......
......@@ -1818,199 +1818,129 @@ gimp_bezier_select_tool_cursor_update (GimpTool *tool,
{
GimpBezierSelectTool *bezier_sel;
GimpDrawTool *draw_tool;
GimpDisplayShell *shell;
gboolean on_curve;
gboolean on_control_pnt;
gboolean in_selection_area;
gint halfwidth, halfheight;
GimpToolCursorType tool_cursor = GIMP_BEZIER_SELECT_TOOL_CURSOR;
GimpCursorModifier cmodifier = GIMP_CURSOR_MODIFIER_NONE;
bezier_sel = GIMP_BEZIER_SELECT_TOOL (tool);
draw_tool = GIMP_DRAW_TOOL (tool);
shell = GIMP_DISPLAY_SHELL (gdisp->shell);
if (gdisp != tool->gdisp ||
draw_tool->draw_state == GIMP_DRAW_TOOL_STATE_INVISIBLE)
if (gdisp == tool->gdisp &&
draw_tool->draw_state != GIMP_DRAW_TOOL_STATE_INVISIBLE)
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_BEZIER_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
return;
}
gboolean on_curve;
gboolean on_control_pnt;
gboolean in_selection_area;
gint halfwidth, halfheight;
halfwidth = UNSCALEX (gdisp, BEZIER_HALFWIDTH);
halfheight = UNSCALEX (gdisp, BEZIER_HALFWIDTH);
halfwidth = UNSCALEX (gdisp, BEZIER_HALFWIDTH);
halfheight = UNSCALEX (gdisp, BEZIER_HALFWIDTH);
on_control_pnt = bezier_on_control_point (gdisp, bezier_sel,
coords->x, coords->y,
halfwidth, halfheight);
on_control_pnt = bezier_on_control_point (gdisp, bezier_sel,
coords->x, coords->y,
halfwidth, halfheight);
on_curve = bezier_point_on_curve (gdisp, bezier_sel,
coords->x, coords->y,
halfwidth, halfheight);
on_curve = bezier_point_on_curve (gdisp, bezier_sel,
coords->x, coords->y,
halfwidth, halfheight);
if (bezier_sel->mask && bezier_sel->closed &&
gimp_channel_value (bezier_sel->mask, coords->x, coords->y) &&
!on_control_pnt &&
(!on_curve || ModeEdit != EXTEND_ADD))
{
in_selection_area = TRUE;
if (bezier_sel->mask && bezier_sel->closed &&
gimp_channel_value (bezier_sel->mask, coords->x, coords->y) &&
!on_control_pnt &&
(!on_curve || ModeEdit != EXTEND_ADD))
{
in_selection_area = TRUE;
if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK))
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_INTERSECT);
}
else if (state & GDK_SHIFT_MASK)
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_PLUS);
}
else if (state & GDK_CONTROL_MASK)
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_MINUS);
}
else
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_RECT_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_NONE);
}
return;
}
tool_cursor = GIMP_RECT_SELECT_TOOL_CURSOR;
if (state & GDK_MOD1_MASK)
{
/* Moving curve */
if (state & GDK_SHIFT_MASK)
{
/* moving on 1 curve */
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_BEZIER_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_MOVE);
}
if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK))
{
cmodifier = GIMP_CURSOR_MODIFIER_INTERSECT;
}
else if (state & GDK_SHIFT_MASK)
{
cmodifier = GIMP_CURSOR_MODIFIER_PLUS;
}
else if (state & GDK_CONTROL_MASK)
{
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
}
}
else if (state & GDK_MOD1_MASK)
{
/* Moving curve */
if (state & GDK_SHIFT_MASK)
{
/* moving on 1 curve */
cmodifier = GIMP_CURSOR_MODIFIER_MOVE;
}
else
{
cmodifier = GIMP_CURSOR_MODIFIER_MOVE;
}
}
else
{
gimp_display_shell_install_tool_cursor (shell,
GIMP_MOUSE_CURSOR,
GIMP_BEZIER_SELECT_TOOL_CURSOR,
GIMP_CURSOR_MODIFIER_MOVE);
}
{
switch (ModeEdit)
{
case EXTEND_NEW:
if (on_control_pnt && bezier_sel->closed)
{
cmodifier = GIMP_CURSOR_MODIFIER_CONTROL;
/* g_print ("add to curve cursor\n"); */
}
else if (on_curve)
{
cmodifier = GIMP_CURSOR_MODIFIER_NONE;
/* g_print ("edit control point cursor\n"); */
}
break;
case EXTEND_ADD:
if (on_curve)
{
cmodifier = GIMP_CURSOR_MODIFIER_PLUS;
/* g_print ("add to curve cursor\n"); */
}
break;
case EXTEND_EDIT:
if (on_control_pnt)
{
cmodifier = GIMP_CURSOR_MODIFIER_CONTROL;
/* g_print ("edit control point cursor\n"); */
}
break;
case EXTEND_REMOVE:
if (on_control_pnt && (state & GDK_SHIFT_MASK))
{
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
/* g_print ("delete whole curve cursor\n"); */
}
else if (on_control_pnt)
{
cmodifier = GIMP_CURSOR_MODIFIER_MINUS;
/* g_print ("remove point cursor\n"); */
}
break;
default:
g_print ("In default\n");
break;