2006-12-09 21:33:38 +00:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-24 22:05:25 +00:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (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, write to the Free Software
|
1998-04-13 05:44:11 +00:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
1997-11-24 22:05:25 +00:00
|
|
|
*/
|
2000-12-16 21:37:03 +00:00
|
|
|
|
2000-04-27 17:27:28 +00:00
|
|
|
#include "config.h"
|
1999-10-26 18:27:27 +00:00
|
|
|
|
2000-12-16 21:37:03 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2001-01-24 22:36:18 +00:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
2001-01-24 12:21:50 +00:00
|
|
|
|
2002-05-03 12:45:22 +00:00
|
|
|
#include "tools-types.h"
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2003-02-05 14:39:40 +00:00
|
|
|
#include "paint/gimpairbrushoptions.h"
|
2001-09-25 23:23:09 +00:00
|
|
|
|
2003-08-22 01:42:57 +00:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2003-02-07 17:12:21 +00:00
|
|
|
|
2001-03-31 23:04:29 +00:00
|
|
|
#include "gimpairbrushtool.h"
|
2003-06-29 20:40:45 +00:00
|
|
|
#include "gimppaintoptions-gui.h"
|
2003-04-15 16:05:52 +00:00
|
|
|
#include "gimptoolcontrol.h"
|
2002-03-29 03:50:29 +00:00
|
|
|
|
2003-03-25 16:38:19 +00:00
|
|
|
#include "gimp-intl.h"
|
Lots of ii8n stuff here and some additions to the de.po. Applied
Wed Oct 14 17:46:15 EDT 1998 Adrian Likins <adrian@gimp.org>
* app/*, po/de.po, de/POTFILES.in, libgimp/gimpintl.h:
Lots of ii8n stuff here and some additions to the de.po.
Applied gimp-egger-981005-1 ,gimp-egger-981006-1,
gimp-egger-981007-1, gimp-egger-981008-1,
gimp-egger-981009-1.patch, gimp-egger-981010-1.patch
* plug-in/guillotine/guillotine.c: added the coordinates
of the split images from the original image to the title.
ie foo.jpg (0,0) for the image in the topleft.
* plug-in/script-fu/scripts/neon-logo.scm,
perspective-shadow.scm, predator.scm,rendermap.scm,
ripply-anim.scm, select_to_image.scm,swirltile.scm,
xach-effect.scm: updated scripts to use new script-fu stuff
wooo boy! a big un!
in testing this, it looks like some of the po files are busted.
but the code stuff seems okay.
-adrian
1998-10-14 23:23:52 +00:00
|
|
|
|
2000-04-27 17:27:28 +00:00
|
|
|
|
2003-08-30 16:41:35 +00:00
|
|
|
static GtkWidget * gimp_airbrush_options_gui (GimpToolOptions *tool_options);
|
1999-04-08 22:25:54 +00:00
|
|
|
|
|
|
|
|
2006-05-15 09:46:31 +00:00
|
|
|
G_DEFINE_TYPE (GimpAirbrushTool, gimp_airbrush_tool, GIMP_TYPE_PAINTBRUSH_TOOL)
|
2005-12-13 09:13:50 +00:00
|
|
|
|
|
|
|
|
2001-03-31 23:04:29 +00:00
|
|
|
void
|
2002-03-29 03:50:29 +00:00
|
|
|
gimp_airbrush_tool_register (GimpToolRegisterCallback callback,
|
2006-04-12 12:49:29 +00:00
|
|
|
gpointer data)
|
1999-04-08 22:25:54 +00:00
|
|
|
{
|
2002-03-29 03:50:29 +00:00
|
|
|
(* callback) (GIMP_TYPE_AIRBRUSH_TOOL,
|
2003-02-05 14:39:40 +00:00
|
|
|
GIMP_TYPE_AIRBRUSH_OPTIONS,
|
|
|
|
gimp_airbrush_options_gui,
|
2004-09-23 21:04:39 +00:00
|
|
|
GIMP_PAINT_OPTIONS_CONTEXT_MASK |
|
|
|
|
GIMP_CONTEXT_GRADIENT_MASK,
|
2002-03-21 12:17:17 +00:00
|
|
|
"gimp-airbrush-tool",
|
2001-11-20 23:00:47 +00:00
|
|
|
_("Airbrush"),
|
2006-09-18 18:00:22 +00:00
|
|
|
_("Airbrush Tool: Paint using a brush, with variable pressure"),
|
2004-04-29 13:19:28 +00:00
|
|
|
N_("_Airbrush"), "A",
|
2003-08-22 01:42:57 +00:00
|
|
|
NULL, GIMP_HELP_TOOL_AIRBRUSH,
|
2002-03-29 03:50:29 +00:00
|
|
|
GIMP_STOCK_TOOL_AIRBRUSH,
|
2002-05-03 11:31:08 +00:00
|
|
|
data);
|
1999-04-08 22:25:54 +00:00
|
|
|
}
|
|
|
|
|
2005-12-13 09:13:50 +00:00
|
|
|
static void
|
|
|
|
gimp_airbrush_tool_class_init (GimpAirbrushToolClass *klass)
|
1997-11-24 22:05:25 +00:00
|
|
|
{
|
2001-03-31 23:04:29 +00:00
|
|
|
}
|
1997-11-24 22:05:25 +00:00
|
|
|
|
2001-03-31 23:04:29 +00:00
|
|
|
static void
|
|
|
|
gimp_airbrush_tool_init (GimpAirbrushTool *airbrush)
|
1999-04-12 17:55:06 +00:00
|
|
|
{
|
2003-10-25 19:00:49 +00:00
|
|
|
GimpTool *tool = GIMP_TOOL (airbrush);
|
1999-04-12 17:55:06 +00:00
|
|
|
|
2004-06-04 23:08:29 +00:00
|
|
|
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_AIRBRUSH);
|
2001-03-31 23:04:29 +00:00
|
|
|
|
2003-10-25 19:00:49 +00:00
|
|
|
gimp_paint_tool_enable_color_picker (GIMP_PAINT_TOOL (airbrush),
|
|
|
|
GIMP_COLOR_PICK_MODE_FOREGROUND);
|
1997-11-24 22:05:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-02-21 16:02:30 +00:00
|
|
|
/* tool options stuff */
|
2002-02-14 19:31:16 +00:00
|
|
|
|
2003-02-09 17:32:52 +00:00
|
|
|
static GtkWidget *
|
2003-02-05 14:39:40 +00:00
|
|
|
gimp_airbrush_options_gui (GimpToolOptions *tool_options)
|
2001-03-31 23:04:29 +00:00
|
|
|
{
|
2006-08-27 22:19:35 +00:00
|
|
|
GObject *config = G_OBJECT (tool_options);
|
|
|
|
GtkWidget *vbox = gimp_paint_options_gui (tool_options);
|
2003-02-07 17:12:21 +00:00
|
|
|
GtkWidget *table;
|
2001-03-31 23:04:29 +00:00
|
|
|
|
2002-03-08 18:30:40 +00:00
|
|
|
table = gtk_table_new (2, 3, FALSE);
|
|
|
|
gtk_table_set_col_spacing (GTK_TABLE (table), 0, 2);
|
2001-03-31 23:04:29 +00:00
|
|
|
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
2002-03-08 18:30:40 +00:00
|
|
|
gtk_widget_show (table);
|
|
|
|
|
2003-02-07 17:12:21 +00:00
|
|
|
gimp_prop_scale_entry_new (config, "rate",
|
|
|
|
GTK_TABLE (table), 0, 0,
|
|
|
|
_("Rate:"),
|
|
|
|
1.0, 1.0, 1,
|
|
|
|
FALSE, 0.0, 0.0);
|
|
|
|
|
|
|
|
gimp_prop_scale_entry_new (config, "pressure",
|
|
|
|
GTK_TABLE (table), 0, 1,
|
|
|
|
_("Pressure:"),
|
|
|
|
1.0, 1.0, 1,
|
|
|
|
FALSE, 0.0, 0.0);
|
2003-02-09 17:32:52 +00:00
|
|
|
|
|
|
|
return vbox;
|
2001-03-31 23:04:29 +00:00
|
|
|
}
|