1
/* The GIMP -- an image manipulation program
2
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
#include "libgimpwidgets/gimpwidgets.h"
25
#include "tools-types.h"
27
#include "core/gimptoolinfo.h"
29
#include "paint/gimpsmudgeoptions.h"
31
#include "widgets/gimphelp-ids.h"
32
#include "widgets/gimppropwidgets.h"
34
#include "gimpsmudgetool.h"
35
#include "gimppaintoptions-gui.h"
36
#include "gimptoolcontrol.h"
38
#include "gimp-intl.h"
41
static void gimp_smudge_tool_init (GimpSmudgeTool *tool);
42
static GtkWidget * gimp_smudge_options_gui (GimpToolOptions *tool_options);
46
gimp_smudge_tool_register (GimpToolRegisterCallback callback,
49
(* callback) (GIMP_TYPE_SMUDGE_TOOL,
50
GIMP_TYPE_SMUDGE_OPTIONS,
51
gimp_smudge_options_gui,
52
GIMP_PAINT_OPTIONS_CONTEXT_MASK,
57
NULL, GIMP_HELP_TOOL_SMUDGE,
58
GIMP_STOCK_TOOL_SMUDGE,
63
gimp_smudge_tool_get_type (void)
65
static GType tool_type = 0;
69
static const GTypeInfo tool_info =
71
sizeof (GimpSmudgeToolClass),
73
(GBaseFinalizeFunc) NULL,
74
NULL, /* class_init */
75
NULL, /* class_finalize */
76
NULL, /* class_data */
77
sizeof (GimpSmudgeTool),
79
(GInstanceInitFunc) gimp_smudge_tool_init,
82
tool_type = g_type_register_static (GIMP_TYPE_PAINT_TOOL,
91
gimp_smudge_tool_init (GimpSmudgeTool *smudge)
93
GimpTool *tool = GIMP_TOOL (smudge);
95
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_SMUDGE);
97
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (smudge),
98
GIMP_COLOR_PICK_MODE_FOREGROUND);
102
/* tool options stuff */
105
gimp_smudge_options_gui (GimpToolOptions *tool_options)
111
config = G_OBJECT (tool_options);
113
vbox = gimp_paint_options_gui (tool_options);
116
table = gtk_table_new (1, 3, FALSE);
117
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
118
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
119
gtk_widget_show (table);
121
gimp_prop_scale_entry_new (config, "rate",
122
GTK_TABLE (table), 0, 0,