gimp/app/tools/gimptoolcontrol.c

751 lines
19 KiB
C
Raw Normal View History

/* GIMP - The GNU Image Manipulation Program
2002-03-29 11:50:29 +08:00
* Copyright (C) 1995-2002 Spencer Kimball, Peter Mattis and others
*
* This program is free software: you can redistribute it and/or modify
2002-03-29 11:50:29 +08:00
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
2002-03-29 11:50:29 +08:00
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
2002-03-29 11:50:29 +08:00
*/
#include "config.h"
#include <gegl.h>
devel-docs/Makefile.am new file documenting the core's include policy. 2002-05-03 Michael Natterer <mitch@gimp.org> * devel-docs/Makefile.am * devel-docs/includes.txt: new file documenting the core's include policy. * HACKING: mention it here. * libgimptool/gimptooltypes.h: removed GimpToolOptions here. * app/core/core-types.h: and added it here. This is a temp hack needed because GimpToolInfo needs to know the GimpToolOptions type. * libgimpproxy/gimpproxytypes.h: regenerated. * libgimptool/gimptoolmodule.h: don't include gimptooltypes.h here... * libgimptool/gimptoolmodule.c: ...but here. * app/config/gimpconfig-params.c: include "libgimpbase/gimpbase.h" entirely, not single files from it. * app/core/gimp.c * app/core/gimpcontext.c * app/core/gimpcoreconfig.c * app/core/gimpdatafactory.c * app/core/gimpdocuments.c * app/core/gimpdrawable-blend.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-convert.c * app/core/gimpimage-crop.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-guides.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage-qmask.c * app/core/gimpimage-resize.c * app/core/gimpimage-scale.c * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimpmodules.c * app/core/gimppaintinfo.c * app/core/gimpparasite.c * app/core/gimppreviewcache.c * app/core/gimptoolinfo.c * app/core/gimpunit.c: include "core-types.h" and no other types file. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell.c: include "tools/tools-types.h" instead of "libgimptool/gimptooltypes.h", warn about inclusion on "gui/gui-types.h" * app/file/file-open.c * app/file/file-save.c: don't include "libgimptool/gimptooltypes.h". * app/gui/about-dialog.c * app/gui/brush-select.c * app/gui/brushes-commands.c * app/gui/color-select.c * app/gui/data-commands.c * app/gui/device-status-dialog.c * app/gui/dialogs.c * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/info-window.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/resize-dialog.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c: include "gui-types.h" and no other types file. * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppaintcore-stroke.c * app/paint/gimppaintcore.c * app/paint/gimppaintoptions.c * app/paint/gimppencil.c * app/paint/gimpsmudge.c * app/paint/paint.c: include "paint-types.h" and no other types file. * app/pdb/pdb-types.h: don't include "libgimptool/gimptooltypes.h". * app/plug-in/plug-in-progress.c: warn about inclusion of "display/display-types.h" * app/tools/tools-types.h: include "libgimptool/gimptooltypes.h". * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpselectiontool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimptoolcontrol.c * app/tools/gimptoolcontrol.h * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c * app/tools/tools.c: include "tools-types.h" and no other types file, warn about inclusion of "gui/gui-types.h". * app/widgets/gimpcolorpanel.c * app/widgets/gimptoolbox-color-area.c: warn about inclusion of "gui/gui-types.h". * app/xcf/xcf-load.c * app/xcf/xcf.c: don't include "libgimptool/gimptooltypes.h". Split tool-safe-mode up in two files, one including libgimpproxy, one libgimp. * plug-ins/tools/Makefile.am * plug-ins/tools/tool-safe-mode-plug-in.[ch]: new files including libgimp/ stuff only. * plug-ins/tools/tool-safe-mode.[ch]: include libgimpproxy/ and libgimptool/ but don't include libgimp/ because of conflicting declarations. Unrelated: * app/tools/gimpclonetool.c: create the clone core so we don't crash. * app/gui/file-open-dialog.c: changed the way we create previews so that only out-of-date previews are created on a click in the preview area. Unconditional creation can still be forced by <Ctrl>+click. Changed the tooltip to document this.
2002-05-03 20:45:22 +08:00
#include <gtk/gtk.h>
#include "tools-types.h"
2002-03-29 11:50:29 +08:00
#include "gimptoolcontrol.h"
devel-docs/Makefile.am new file documenting the core's include policy. 2002-05-03 Michael Natterer <mitch@gimp.org> * devel-docs/Makefile.am * devel-docs/includes.txt: new file documenting the core's include policy. * HACKING: mention it here. * libgimptool/gimptooltypes.h: removed GimpToolOptions here. * app/core/core-types.h: and added it here. This is a temp hack needed because GimpToolInfo needs to know the GimpToolOptions type. * libgimpproxy/gimpproxytypes.h: regenerated. * libgimptool/gimptoolmodule.h: don't include gimptooltypes.h here... * libgimptool/gimptoolmodule.c: ...but here. * app/config/gimpconfig-params.c: include "libgimpbase/gimpbase.h" entirely, not single files from it. * app/core/gimp.c * app/core/gimpcontext.c * app/core/gimpcoreconfig.c * app/core/gimpdatafactory.c * app/core/gimpdocuments.c * app/core/gimpdrawable-blend.c * app/core/gimpdrawable-bucket-fill.c * app/core/gimpdrawable-offset.c * app/core/gimpdrawable-transform.c * app/core/gimpdrawable.c * app/core/gimpedit.c * app/core/gimpimage-convert.c * app/core/gimpimage-crop.c * app/core/gimpimage-duplicate.c * app/core/gimpimage-guides.c * app/core/gimpimage-mask.c * app/core/gimpimage-merge.c * app/core/gimpimage-new.c * app/core/gimpimage-projection.c * app/core/gimpimage-qmask.c * app/core/gimpimage-resize.c * app/core/gimpimage-scale.c * app/core/gimpimage.c * app/core/gimpitem.c * app/core/gimpmodules.c * app/core/gimppaintinfo.c * app/core/gimpparasite.c * app/core/gimppreviewcache.c * app/core/gimptoolinfo.c * app/core/gimpunit.c: include "core-types.h" and no other types file. * app/display/gimpdisplay.c * app/display/gimpdisplayshell-callbacks.c * app/display/gimpdisplayshell.c: include "tools/tools-types.h" instead of "libgimptool/gimptooltypes.h", warn about inclusion on "gui/gui-types.h" * app/file/file-open.c * app/file/file-save.c: don't include "libgimptool/gimptooltypes.h". * app/gui/about-dialog.c * app/gui/brush-select.c * app/gui/brushes-commands.c * app/gui/color-select.c * app/gui/data-commands.c * app/gui/device-status-dialog.c * app/gui/dialogs.c * app/gui/gradients-commands.c * app/gui/help-commands.c * app/gui/info-window.c * app/gui/palettes-commands.c * app/gui/patterns-commands.c * app/gui/resize-dialog.c * app/gui/tips-dialog.c * app/gui/tool-options-dialog.c: include "gui-types.h" and no other types file. * app/paint/gimpairbrush.c * app/paint/gimpclone.c * app/paint/gimpconvolve.c * app/paint/gimpdodgeburn.c * app/paint/gimperaser.c * app/paint/gimppaintbrush.c * app/paint/gimppaintcore-stroke.c * app/paint/gimppaintcore.c * app/paint/gimppaintoptions.c * app/paint/gimppencil.c * app/paint/gimpsmudge.c * app/paint/paint.c: include "paint-types.h" and no other types file. * app/pdb/pdb-types.h: don't include "libgimptool/gimptooltypes.h". * app/plug-in/plug-in-progress.c: warn about inclusion of "display/display-types.h" * app/tools/tools-types.h: include "libgimptool/gimptooltypes.h". * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpdrawtool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppainttool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimpposterizetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpselectiontool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimptoolcontrol.c * app/tools/gimptoolcontrol.h * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c * app/tools/tools.c: include "tools-types.h" and no other types file, warn about inclusion of "gui/gui-types.h". * app/widgets/gimpcolorpanel.c * app/widgets/gimptoolbox-color-area.c: warn about inclusion of "gui/gui-types.h". * app/xcf/xcf-load.c * app/xcf/xcf.c: don't include "libgimptool/gimptooltypes.h". Split tool-safe-mode up in two files, one including libgimpproxy, one libgimp. * plug-ins/tools/Makefile.am * plug-ins/tools/tool-safe-mode-plug-in.[ch]: new files including libgimp/ stuff only. * plug-ins/tools/tool-safe-mode.[ch]: include libgimpproxy/ and libgimptool/ but don't include libgimp/ because of conflicting declarations. Unrelated: * app/tools/gimpclonetool.c: create the clone core so we don't crash. * app/gui/file-open-dialog.c: changed the way we create previews so that only out-of-date previews are created on a click in the preview area. Unconditional creation can still be forced by <Ctrl>+click. Changed the tooltip to document this.
2002-05-03 20:45:22 +08:00
static void gimp_tool_control_finalize (GObject *object);
G_DEFINE_TYPE (GimpToolControl, gimp_tool_control, GIMP_TYPE_OBJECT)
2002-03-29 11:50:29 +08:00
#define parent_class gimp_tool_control_parent_class
2002-03-29 11:50:29 +08:00
2002-03-29 11:50:29 +08:00
static void
gimp_tool_control_class_init (GimpToolControlClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = gimp_tool_control_finalize;
2002-03-29 11:50:29 +08:00
}
static void
gimp_tool_control_init (GimpToolControl *control)
{
control->active = FALSE;
2002-03-29 11:50:29 +08:00
control->paused_count = 0;
control->preserve = TRUE;
control->scroll_lock = FALSE;
control->handle_empty_image = FALSE;
control->dirty_mask = GIMP_DIRTY_NONE;
control->dirty_action = GIMP_TOOL_ACTION_HALT;
control->motion_mode = GIMP_MOTION_MODE_COMPRESS;
control->auto_snap_to = TRUE;
control->snap_offset_x = 0;
control->snap_offset_y = 0;
control->snap_width = 0;
control->snap_height = 0;
Bug 496772 – Position shown in the statusbar needs more precision (for 2008-08-20 Michael Natterer <mitch@gimp.org> Bug 496772 – Position shown in the statusbar needs more precision (for some tools) * app/display/display-enums.[ch]: add enum GimpCursorPrecision which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }. * app/display/gimpdisplayshell-cursor.[ch]: add "precision" parameter to gimp_display_shell_update_cursor() and pass it on to the statusbar. * app/display/gimpstatusbar.[ch]: add "precision" parameters to the cursor coordinates APIs, offset the passed coords accordingly and display them with one decimal point if SUBPIXEL is requested and the display's unit is PIXEL. Keep a second floating-point format string around at any time. * app/tools/gimptoolcontrol.[ch]: add a "precision" member and API so tools can configure the precision they need. Defalt to PIXEL_CENTER since that's right for almost all tools. * app/display/gimpdisplayshell-callbacks.c: pass the tool's precision to gimp_display_shell_update_cursor(). * app/tools/gimptool.[ch]: add "precision" parameter to gimp_tool_push_status_coords() and pass it on to the statusbar. * app/tools/gimpaligntool.c * app/tools/gimpblendtool.c * app/tools/gimpcolortool.c * app/tools/gimpcroptool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimpperspectiveclonetool.c * app/tools/gimprectangleselecttool.c * app/tools/gimprectangletool.c * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c: set precision in init() where needed. Adjust the precision in the fly when needed, e.g. while moving guides or when toggling hard-edge on paint tools. Also pass an appropriate precision to gimp_tool_push_status_coords(), which is not always the tool's precision as used for cursor display. svn path=/trunk/; revision=26681
2008-08-21 00:22:09 +08:00
control->precision = GIMP_CURSOR_PRECISION_PIXEL_CENTER;
control->toggled = FALSE;
2002-03-29 11:50:29 +08:00
control->wants_click = FALSE;
control->wants_double_click = FALSE;
control->wants_triple_click = FALSE;
control->wants_all_key_events = FALSE;
control->active_modifiers = GIMP_TOOL_ACTIVE_MODIFIERS_OFF;
control->cursor = GIMP_CURSOR_MOUSE;
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
control->tool_cursor = GIMP_TOOL_CURSOR_NONE;
control->cursor_modifier = GIMP_CURSOR_MODIFIER_NONE;
2002-03-29 11:50:29 +08:00
control->toggle_cursor = -1;
control->toggle_tool_cursor = -1;
control->toggle_cursor_modifier = -1;
2002-03-29 11:50:29 +08:00
}
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
static void
gimp_tool_control_finalize (GObject *object)
{
GimpToolControl *control = GIMP_TOOL_CONTROL (object);
g_slist_free (control->preserve_stack);
g_free (control->action_opacity);
g_free (control->action_size);
g_free (control->action_aspect);
g_free (control->action_angle);
g_free (control->action_spacing);
g_free (control->action_hardness);
g_free (control->action_force);
g_free (control->action_object_1);
g_free (control->action_object_2);
g_free (control->action_pixel_size);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/* public functions */
void
gimp_tool_control_activate (GimpToolControl *control)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
g_return_if_fail (control->active == FALSE);
control->active = TRUE;
}
void
gimp_tool_control_halt (GimpToolControl *control)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
g_return_if_fail (control->active == TRUE);
control->active = FALSE;
}
gboolean
gimp_tool_control_is_active (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->active;
}
2002-03-29 11:50:29 +08:00
void
gimp_tool_control_pause (GimpToolControl *control)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->paused_count++;
}
void
gimp_tool_control_resume (GimpToolControl *control)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
g_return_if_fail (control->paused_count > 0);
2002-03-29 11:50:29 +08:00
control->paused_count--;
}
gboolean
gimp_tool_control_is_paused (GimpToolControl *control)
2002-03-29 11:50:29 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
2002-03-29 11:50:29 +08:00
return control->paused_count > 0;
}
void
gimp_tool_control_set_preserve (GimpToolControl *control,
gboolean preserve)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->preserve = preserve ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_preserve (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->preserve;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_push_preserve (GimpToolControl *control,
gboolean preserve)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->preserve_stack =
g_slist_prepend (control->preserve_stack,
GINT_TO_POINTER (control->preserve));
control->preserve = preserve ? TRUE : FALSE;
}
void
gimp_tool_control_pop_preserve (GimpToolControl *control)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
g_return_if_fail (control->preserve_stack != NULL);
control->preserve = GPOINTER_TO_INT (control->preserve_stack->data);
control->preserve_stack = g_slist_delete_link (control->preserve_stack,
control->preserve_stack);
}
void
gimp_tool_control_set_scroll_lock (GimpToolControl *control,
gboolean scroll_lock)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->scroll_lock = scroll_lock ? TRUE : FALSE;
2002-03-29 11:50:29 +08:00
}
gboolean
gimp_tool_control_get_scroll_lock (GimpToolControl *control)
2002-03-29 11:50:29 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
2002-03-29 11:50:29 +08:00
return control->scroll_lock;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_set_handle_empty_image (GimpToolControl *control,
gboolean handle_empty)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->handle_empty_image = handle_empty ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_handle_empty_image (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->handle_empty_image;
2002-03-29 11:50:29 +08:00
}
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
void
gimp_tool_control_set_dirty_mask (GimpToolControl *control,
GimpDirtyMask dirty_mask)
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
control->dirty_mask = dirty_mask;
}
GimpDirtyMask
gimp_tool_control_get_dirty_mask (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_DIRTY_NONE);
return control->dirty_mask;
}
void
gimp_tool_control_set_dirty_action (GimpToolControl *control,
GimpToolAction action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->dirty_action = action;
}
GimpToolAction
gimp_tool_control_get_dirty_action (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_TOOL_ACTION_HALT);
return control->dirty_action;
}
void
gimp_tool_control_set_motion_mode (GimpToolControl *control,
GimpMotionMode motion_mode)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->motion_mode = motion_mode;
}
GimpMotionMode
gimp_tool_control_get_motion_mode (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), GIMP_MOTION_MODE_EXACT);
return control->motion_mode;
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
}
void
gimp_tool_control_set_snap_to (GimpToolControl *control,
gboolean snap_to)
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
control->auto_snap_to = snap_to ? TRUE : FALSE;
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
}
gboolean
gimp_tool_control_get_snap_to (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->auto_snap_to;
}
void
gimp_tool_control_set_wants_click (GimpToolControl *control,
gboolean wants_click)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->wants_click = wants_click ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_wants_click (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->wants_click;
}
void
gimp_tool_control_set_wants_double_click (GimpToolControl *control,
gboolean wants_double_click)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->wants_double_click = wants_double_click ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_wants_double_click (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->wants_double_click;
}
void
gimp_tool_control_set_wants_triple_click (GimpToolControl *control,
gboolean wants_triple_click)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->wants_triple_click = wants_triple_click ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_wants_triple_click (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->wants_triple_click;
}
void
gimp_tool_control_set_wants_all_key_events (GimpToolControl *control,
gboolean wants_key_events)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->wants_all_key_events = wants_key_events ? TRUE : FALSE;
}
gboolean
gimp_tool_control_get_wants_all_key_events (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
return control->wants_all_key_events;
}
void
gimp_tool_control_set_active_modifiers (GimpToolControl *control,
GimpToolActiveModifiers active_modifiers)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->active_modifiers = active_modifiers;
}
GimpToolActiveModifiers
gimp_tool_control_get_active_modifiers (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control),
GIMP_TOOL_ACTIVE_MODIFIERS_OFF);
return control->active_modifiers;
}
void
gimp_tool_control_set_snap_offsets (GimpToolControl *control,
gint offset_x,
gint offset_y,
gint width,
gint height)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->snap_offset_x = offset_x;
control->snap_offset_y = offset_y;
control->snap_width = width;
control->snap_height = height;
}
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
void
gimp_tool_control_get_snap_offsets (GimpToolControl *control,
gint *offset_x,
gint *offset_y,
gint *width,
gint *height)
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
if (offset_x) *offset_x = control->snap_offset_x;
if (offset_y) *offset_y = control->snap_offset_y;
if (width) *width = control->snap_width;
if (height) *height = control->snap_height;
app/core/core-types.h moved GimpToolInfo back into the core. * app/core/core-types.h * libgimptool/gimptooltypes.h: moved GimpToolInfo back into the core. * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol.c: got rid of gimp_tool_control_new * libgimptool/gimptool.c (gimp_tool_init): create the GimpToolControl here instead of in the descendant classes * app/tools/gimpairbrushtool.c * app/tools/gimpbezierselecttool.c * app/tools/gimpblendtool.c * app/tools/gimpbucketfilltool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcolorpickertool.c * app/tools/gimpconvolvetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpdodgeburntool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpellipseselecttool.c * app/tools/gimperasertool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpfuzzyselecttool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimpinktool.c * app/tools/gimpiscissorstool.c * app/tools/gimplevelstool.c * app/tools/gimpmagnifytool.c * app/tools/gimpmeasuretool.c * app/tools/gimpmovetool.c * app/tools/gimppaintbrushtool.c * app/tools/gimppathtool.c * app/tools/gimppenciltool.c * app/tools/gimpperspectivetool.c * app/tools/gimprectselecttool.c * app/tools/gimprotatetool.c * app/tools/gimpscaletool.c * app/tools/gimpsheartool.c * app/tools/gimpsmudgetool.c * app/tools/gimptexttool.c * app/tools/gimpvectortool.c * plug-ins/tools/tool-safe-mode.c: changed accordingly * libgimpproxy/gimpproxytypes.h: autogenerated
2002-05-03 05:03:27 +08:00
}
Bug 496772 – Position shown in the statusbar needs more precision (for 2008-08-20 Michael Natterer <mitch@gimp.org> Bug 496772 – Position shown in the statusbar needs more precision (for some tools) * app/display/display-enums.[ch]: add enum GimpCursorPrecision which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }. * app/display/gimpdisplayshell-cursor.[ch]: add "precision" parameter to gimp_display_shell_update_cursor() and pass it on to the statusbar. * app/display/gimpstatusbar.[ch]: add "precision" parameters to the cursor coordinates APIs, offset the passed coords accordingly and display them with one decimal point if SUBPIXEL is requested and the display's unit is PIXEL. Keep a second floating-point format string around at any time. * app/tools/gimptoolcontrol.[ch]: add a "precision" member and API so tools can configure the precision they need. Defalt to PIXEL_CENTER since that's right for almost all tools. * app/display/gimpdisplayshell-callbacks.c: pass the tool's precision to gimp_display_shell_update_cursor(). * app/tools/gimptool.[ch]: add "precision" parameter to gimp_tool_push_status_coords() and pass it on to the statusbar. * app/tools/gimpaligntool.c * app/tools/gimpblendtool.c * app/tools/gimpcolortool.c * app/tools/gimpcroptool.c * app/tools/gimpeditselectiontool.c * app/tools/gimpfliptool.c * app/tools/gimpfreeselecttool.c * app/tools/gimpmovetool.c * app/tools/gimppainttool.c * app/tools/gimpperspectiveclonetool.c * app/tools/gimprectangleselecttool.c * app/tools/gimprectangletool.c * app/tools/gimptransformtool.c * app/tools/gimpvectortool.c: set precision in init() where needed. Adjust the precision in the fly when needed, e.g. while moving guides or when toggling hard-edge on paint tools. Also pass an appropriate precision to gimp_tool_push_status_coords(), which is not always the tool's precision as used for cursor display. svn path=/trunk/; revision=26681
2008-08-21 00:22:09 +08:00
void
gimp_tool_control_set_precision (GimpToolControl *control,
GimpCursorPrecision precision)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
control->precision = precision;
}
GimpCursorPrecision
gimp_tool_control_get_precision (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control),
GIMP_CURSOR_PRECISION_PIXEL_CENTER);
return control->precision;
}
2002-03-29 11:50:29 +08:00
void
gimp_tool_control_set_toggled (GimpToolControl *control,
gboolean toggled)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->toggled = toggled ? TRUE : FALSE;
2002-03-29 11:50:29 +08:00
}
gboolean
gimp_tool_control_get_toggled (GimpToolControl *control)
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
return control->toggled;
Replaced the concept of having a boolean indicating if an undo step 2004-07-29 Michael Natterer <mitch@gimp.org> Replaced the concept of having a boolean indicating if an undo step dirties the image by a bitfield indicating which parts of the image are dirtied: * app/core/core-enums.[ch]: reordered two values in enum GimpUndoType, added GIMP_DIRTY_IMAGE_SIZE to enum GimpDirtyMask. The values of GimpDirtyMask are still questionable and will probably change... * app/core/gimpimage.[ch]: removed signal "undo_start" and added a GimpDirtyMask parameter to the "dirty" and "clean" signals. * app/core/gimpimage-undo.[ch] (gimp_image_undo_push): replaced "gboolean dirties_image" by "GimpDirtyMask dirty_mask" and pass it to gimp_image_dirty(). (gimp_image_undo_group_start): added *ugly* code which tries to figure GimpDirtyMask from the group's GimpUndoType and store it in the GimpUndoGroup. Call gimp_image_dirty() instead of the removed gimp_image_undo_start(). This means the undo group now dirties the image just like one of its undo steps, but that's no problem since undoing cleans it in the same way. * app/core/gimpundo.[ch]: s/dirties_image/dirty_mask/g (gimp_undo_pop): emit clean/dirty signals *before* performing the actual undo step so listeners can detach from the image before it is changed by undo. * app/core/gimpimage-undo-push.c (gimp_image_undo_push_*): pass a GimpDirtyMask instead of TRUE/FALSE to gimp_image_undo_push(). * app/core/gimpimagemap.[ch]: removed "gboolean interactive" because it makes no sense to use GimpImageMap noninteractively. Don't freeze()/thaw() undo while the image_map is active which fixes many ways of trashing the image's undo state but probably introduces new ways of doing evil things. * app/display/gimpdisplay-foreach.c * app/display/gimpdisplayshell-handlers.c: changed according to the GimpImage::clean()/dirty() signal changes. Small fixes in the quit dialog's dirty image container. * app/tools/gimptoolcontrol.[ch]: added member and API to set/get the dirty_mask. * app/tools/gimpcroptool.c * app/tools/gimpimagemaptool.c * app/tools/gimpiscissorstool.c * app/tools/gimptexttool.c * app/tools/gimptransformtool.c: whenever setting "preserve" to FALSE, also set a "dirty_mask" which specifies on which image changes the tool wants to be canceled. * app/tools/tool_manager.c: removed "undo_start" connection and connect to both "dirty" *and* "clean" to check if the active_tool needs to be canceled. Cancel the tool only if the dirty_mask passed in the signal has common bits with the tool's dirty_mask. Fixes bug #109561 and probably opens some new ones...
2004-07-29 22:16:21 +08:00
}
2002-03-29 11:50:29 +08:00
void
gimp_tool_control_set_cursor (GimpToolControl *control,
GimpCursorType cursor)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->cursor = cursor;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_set_tool_cursor (GimpToolControl *control,
GimpToolCursorType cursor)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->tool_cursor = cursor;
2002-03-29 11:50:29 +08:00
}
2002-03-29 11:50:29 +08:00
void
gimp_tool_control_set_cursor_modifier (GimpToolControl *control,
GimpCursorModifier modifier)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->cursor_modifier = modifier;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_set_toggle_cursor (GimpToolControl *control,
GimpCursorType cursor)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->toggle_cursor = cursor;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_set_toggle_tool_cursor (GimpToolControl *control,
GimpToolCursorType cursor)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->toggle_tool_cursor = cursor;
2002-03-29 11:50:29 +08:00
}
void
gimp_tool_control_set_toggle_cursor_modifier (GimpToolControl *control,
GimpCursorModifier modifier)
2002-03-29 11:50:29 +08:00
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
2002-03-29 11:50:29 +08:00
control->toggle_cursor_modifier = modifier;
2002-03-29 11:50:29 +08:00
}
GimpCursorType
gimp_tool_control_get_cursor (GimpToolControl *control)
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
if (control->toggled && control->toggle_cursor != -1)
return control->toggle_cursor;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
return control->cursor;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
}
GimpToolCursorType
gimp_tool_control_get_tool_cursor (GimpToolControl *control)
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
if (control->toggled && control->toggle_tool_cursor != -1)
return control->toggle_tool_cursor;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
return control->tool_cursor;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
}
GimpCursorModifier
gimp_tool_control_get_cursor_modifier (GimpToolControl *control)
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), FALSE);
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
if (control->toggled && control->toggle_cursor_modifier != -1)
return control->toggle_cursor_modifier;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
return control->cursor_modifier;
app/tools/gimptoolcontrol.[ch] resurrected the motion hints and cursor * app/tools/gimptoolcontrol.[ch] * libgimptool/gimptool.c: resurrected the motion hints and cursor changing code. app/tools/gimpairbrushtool.c app/tools/gimpbezierselecttool.c app/tools/gimpblendtool.c app/tools/gimpbucketfilltool.c app/tools/gimpbycolorselecttool.c app/tools/gimpclonetool.c app/tools/gimpcolorbalancetool.c app/tools/gimpcolorpickertool.c app/tools/gimpconvolvetool.c app/tools/gimpcroptool.c app/tools/gimpcurvestool.c app/tools/gimpdodgeburntool.c app/tools/gimpeditselectiontool.c app/tools/gimpellipseselecttool.c app/tools/gimperasertool.c app/tools/gimpfliptool.c app/tools/gimpfuzzyselecttool.c app/tools/gimphistogramtool.c app/tools/gimphuesaturationtool.c app/tools/gimpimagemaptool.c app/tools/gimpinktool.c app/tools/gimpiscissorstool.c app/tools/gimplevelstool.c app/tools/gimpmagnifytool.c app/tools/gimpmeasuretool.c app/tools/gimpmovetool.c app/tools/gimppaintbrushtool.c app/tools/gimppainttool.c app/tools/gimppathtool.c app/tools/gimppenciltool.c app/tools/gimpperspectivetool.c app/tools/gimprectselecttool.c app/tools/gimprotatetool.c app/tools/gimpscaletool.c app/tools/gimpselectiontool.c app/tools/gimpsheartool.c app/tools/gimpsmudgetool.c app/tools/gimptexttool.c app/tools/gimptransformtool.c app/tools/gimpvectortool.c: set the motion mode; fix a few parameters * app/tools/gimpinktool.c (gimp_ink_tool_button_press): uncommented some code I had temporarily commented out and didn't uncomment before committing * libgimptool/gimptoolcontrol.h * app/tools/gimptoolcontrol-displayshell.[ch]: merged with gimptoolcontrol.[ch]. The distinction was fairly arbitrary. * plug-ins/tools/gimptoolcontrol.c: added some stubs * app/tools/Makefile.am * app/tools/tool_manager.c * app/display/gimpdisplayshell-callbacks.c: changed accordingly * libgimp/gimpimage_pdb.c: applied a patch from Pippen to correct documentation on the undo operations
2002-04-21 15:31:12 +08:00
}
void
gimp_tool_control_set_action_opacity (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_opacity)
{
g_free (control->action_opacity);
control->action_opacity = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_opacity (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_opacity;
}
void
gimp_tool_control_set_action_size (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_size)
{
g_free (control->action_size);
control->action_size = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_size (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_size;
}
void
gimp_tool_control_set_action_aspect (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_aspect)
{
g_free (control->action_aspect);
control->action_aspect = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_aspect (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_aspect;
}
void
gimp_tool_control_set_action_angle (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_angle)
{
g_free (control->action_angle);
control->action_angle = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_angle (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_angle;
}
void
gimp_tool_control_set_action_spacing (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_spacing)
{
g_free (control->action_spacing);
control->action_spacing = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_spacing (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_spacing;
}
void
gimp_tool_control_set_action_hardness (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_hardness)
{
g_free (control->action_hardness);
control->action_hardness = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_hardness (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_hardness;
}
void
gimp_tool_control_set_action_force (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_force)
{
g_free (control->action_force);
control->action_force = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_force (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_force;
}
void
gimp_tool_control_set_action_object_1 (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_object_1)
{
g_free (control->action_object_1);
control->action_object_1 = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_object_1 (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_object_1;
}
void
gimp_tool_control_set_action_object_2 (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_object_2)
{
g_free (control->action_object_2);
control->action_object_2 = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_object_2 (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_object_2;
}
void
gimp_tool_control_set_action_pixel_size (GimpToolControl *control,
const gchar *action)
{
g_return_if_fail (GIMP_IS_TOOL_CONTROL (control));
if (action != control->action_pixel_size)
{
g_free (control->action_pixel_size);
control->action_pixel_size = g_strdup (action);
}
}
const gchar *
gimp_tool_control_get_action_pixel_size (GimpToolControl *control)
{
g_return_val_if_fail (GIMP_IS_TOOL_CONTROL (control), NULL);
return control->action_pixel_size;
}