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 "paint/gimppaintoptions.h"
29
#include "widgets/gimphelp-ids.h"
31
#include "gimppaintbrushtool.h"
32
#include "gimppaintoptions-gui.h"
33
#include "gimptoolcontrol.h"
35
#include "gimp-intl.h"
38
static void gimp_paintbrush_tool_init (GimpPaintbrushTool *tool);
42
gimp_paintbrush_tool_register (GimpToolRegisterCallback callback,
45
(* callback) (GIMP_TYPE_PAINTBRUSH_TOOL,
46
GIMP_TYPE_PAINT_OPTIONS,
47
gimp_paint_options_gui,
48
GIMP_PAINT_OPTIONS_CONTEXT_MASK |
49
GIMP_CONTEXT_GRADIENT_MASK,
50
"gimp-paintbrush-tool",
52
_("Paint fuzzy brush strokes"),
53
N_("_Paintbrush"), "P",
54
NULL, GIMP_HELP_TOOL_PAINTBRUSH,
55
GIMP_STOCK_TOOL_PAINTBRUSH,
60
gimp_paintbrush_tool_get_type (void)
62
static GType tool_type = 0;
66
static const GTypeInfo tool_info =
68
sizeof (GimpPaintbrushToolClass),
70
(GBaseFinalizeFunc) NULL,
71
NULL, /* class_init */
72
NULL, /* class_finalize */
73
NULL, /* class_data */
74
sizeof (GimpPaintbrushTool),
76
(GInstanceInitFunc) gimp_paintbrush_tool_init,
79
tool_type = g_type_register_static (GIMP_TYPE_PAINT_TOOL,
88
gimp_paintbrush_tool_init (GimpPaintbrushTool *paintbrush)
90
GimpTool *tool = GIMP_TOOL (paintbrush);
92
gimp_tool_control_set_tool_cursor (tool->control,
93
GIMP_TOOL_CURSOR_PAINTBRUSH);
95
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (paintbrush),
96
GIMP_COLOR_PICK_MODE_FOREGROUND);