home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / paint_options.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-02-23  |  3.1 KB  |  109 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
  3.  *
  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.
  8.  *
  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.
  13.  *
  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.
  17.  */
  18. #ifndef __PAINT_OPTIONS_H__
  19. #define __PAINT_OPTIONS_H__
  20.  
  21. #include "tools.h"
  22. #include "tool_options.h"
  23.  
  24. /*  the paint options structures  */
  25. typedef struct _PaintPressureOptions PaintPressureOptions;
  26. struct _PaintPressureOptions
  27. {
  28.   GtkWidget   *frame;
  29.  
  30.   gboolean     opacity;
  31.   gboolean     opacity_d;
  32.   GtkWidget   *opacity_w;
  33.  
  34.   gboolean     pressure;
  35.   gboolean     pressure_d;
  36.   GtkWidget   *pressure_w;
  37.  
  38.   gboolean     rate;
  39.   gboolean     rate_d;
  40.   GtkWidget   *rate_w;
  41.  
  42.   gboolean     size;
  43.   gboolean     size_d;
  44.   GtkWidget   *size_w;
  45.   
  46.   gboolean     color;
  47.   gboolean     color_d;
  48.   GtkWidget   *color_w;
  49. };
  50.  
  51. /*  the paint options structures  */
  52. typedef struct _PaintOptions PaintOptions;
  53. struct _PaintOptions
  54. {
  55.   ToolOptions  tool_options;
  56.  
  57.   /*  vbox for the common paint options  */
  58.   GtkWidget   *paint_vbox;
  59.  
  60.   /*  a widget to be shown if we are in global mode  */
  61.   GtkWidget   *global;
  62.  
  63.   /*  options used by all paint tools  */
  64.   GtkObject   *opacity_w;
  65.   GtkWidget   *paint_mode_w;
  66.  
  67.   /*  this tool's private context  */
  68.   GimpContext *context;
  69.  
  70.   /*  the incremental toggle  */
  71.   gboolean     incremental;
  72.   gboolean     incremental_d;
  73.   GtkWidget   *incremental_w;
  74.  
  75.   /*  the pressure-sensitivity options  */
  76.   PaintPressureOptions *pressure_options;
  77. };
  78.  
  79.  
  80. /*  the default pressure_options for non_gui use  */
  81. extern PaintPressureOptions non_gui_pressure_options;
  82.  
  83.  
  84. /*  paint tool options functions  */
  85.  
  86. PaintOptions *paint_options_new    (ToolType              tool_type,
  87.                     ToolOptionsResetFunc  reset_func);
  88.  
  89. void          paint_options_reset  (PaintOptions         *options);
  90.  
  91. /*  to be used by "derived" paint options only  */
  92. void          paint_options_init   (PaintOptions         *options,
  93.                     ToolType              tool_type,
  94.                     ToolOptionsResetFunc  reset_func);
  95.  
  96.  
  97. /*  functions for the global paint options  */
  98.  
  99. /*  switch between global and per-tool paint options  */
  100. void        paint_options_set_global       (gboolean          global);
  101.  
  102.  
  103. /*  a utility function which returns a paint mode menu  */
  104. GtkWidget * paint_mode_menu_new            (GtkSignalFunc     callback,
  105.                         gpointer          data,
  106.                         LayerModeEffects  initial);
  107.  
  108. #endif  /*  __PAINT_OPTIONS_H__  */
  109.