1999-04-22 22:34:00 +08:00
|
|
|
/* The GIMP -- an image manipulation program
|
|
|
|
* Copyright (C) 1995-1999 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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
#ifndef __PAINT_OPTIONS_H__
|
|
|
|
#define __PAINT_OPTIONS_H__
|
|
|
|
|
|
|
|
#include "tools.h"
|
|
|
|
#include "tool_options.h"
|
|
|
|
|
1999-09-09 09:47:54 +08:00
|
|
|
/* the paint options structures */
|
|
|
|
typedef struct _PaintPressureOptions PaintPressureOptions;
|
|
|
|
struct _PaintPressureOptions
|
|
|
|
{
|
|
|
|
GtkWidget *frame;
|
|
|
|
|
|
|
|
gboolean opacity;
|
|
|
|
gboolean opacity_d;
|
|
|
|
GtkWidget *opacity_w;
|
|
|
|
|
|
|
|
gboolean pressure;
|
|
|
|
gboolean pressure_d;
|
|
|
|
GtkWidget *pressure_w;
|
|
|
|
|
1999-11-13 09:02:27 +08:00
|
|
|
gboolean rate;
|
|
|
|
gboolean rate_d;
|
|
|
|
GtkWidget *rate_w;
|
|
|
|
|
1999-09-09 09:47:54 +08:00
|
|
|
gboolean size;
|
|
|
|
gboolean size_d;
|
|
|
|
GtkWidget *size_w;
|
|
|
|
|
|
|
|
gboolean color;
|
|
|
|
gboolean color_d;
|
|
|
|
GtkWidget *color_w;
|
|
|
|
};
|
1999-04-22 22:34:00 +08:00
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* the paint options structures */
|
1999-04-22 22:34:00 +08:00
|
|
|
typedef struct _PaintOptions PaintOptions;
|
|
|
|
struct _PaintOptions
|
|
|
|
{
|
|
|
|
ToolOptions tool_options;
|
|
|
|
|
|
|
|
/* vbox for the common paint options */
|
|
|
|
GtkWidget *paint_vbox;
|
|
|
|
|
|
|
|
/* a widget to be shown if we are in global mode */
|
|
|
|
GtkWidget *global;
|
|
|
|
|
|
|
|
/* options used by all paint tools */
|
|
|
|
GtkObject *opacity_w;
|
|
|
|
GtkWidget *paint_mode_w;
|
1999-08-20 03:53:30 +08:00
|
|
|
|
2000-02-19 05:22:13 +08:00
|
|
|
/* this tool's private context */
|
|
|
|
GimpContext *context;
|
|
|
|
|
1999-08-20 03:53:30 +08:00
|
|
|
/* the incremental toggle */
|
|
|
|
gboolean incremental;
|
|
|
|
gboolean incremental_d;
|
|
|
|
GtkWidget *incremental_w;
|
1999-09-09 09:47:54 +08:00
|
|
|
|
|
|
|
/* the pressure-sensitivity options */
|
|
|
|
PaintPressureOptions *pressure_options;
|
1999-04-22 22:34:00 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
1999-09-09 09:47:54 +08:00
|
|
|
/* the default pressure_options for non_gui use */
|
2000-01-10 01:31:00 +08:00
|
|
|
extern PaintPressureOptions non_gui_pressure_options;
|
|
|
|
|
1999-09-09 09:47:54 +08:00
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* paint tool options functions */
|
1999-09-09 09:47:54 +08:00
|
|
|
|
1999-04-22 22:34:00 +08:00
|
|
|
PaintOptions *paint_options_new (ToolType tool_type,
|
|
|
|
ToolOptionsResetFunc reset_func);
|
|
|
|
|
|
|
|
void paint_options_reset (PaintOptions *options);
|
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* to be used by "derived" paint options only */
|
1999-04-22 22:34:00 +08:00
|
|
|
void paint_options_init (PaintOptions *options,
|
|
|
|
ToolType tool_type,
|
|
|
|
ToolOptionsResetFunc reset_func);
|
|
|
|
|
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* functions for the global paint options */
|
1999-04-22 22:34:00 +08:00
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* switch between global and per-tool paint options */
|
2000-02-13 21:14:34 +08:00
|
|
|
void paint_options_set_global (gboolean global);
|
1999-04-22 22:34:00 +08:00
|
|
|
|
|
|
|
|
1999-07-06 23:18:25 +08:00
|
|
|
/* a utility function which returns a paint mode menu */
|
2000-02-14 06:26:41 +08:00
|
|
|
GtkWidget * paint_mode_menu_new (GtkSignalFunc callback,
|
2000-02-13 21:14:34 +08:00
|
|
|
gpointer data,
|
|
|
|
LayerModeEffects initial);
|
|
|
|
|
1999-04-22 22:34:00 +08:00
|
|
|
#endif /* __PAINT_OPTIONS_H__ */
|