home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / selection_options.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-23  |  2.7 KB  |  91 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 __SELECTION_OPTIONS_H__
  19. #define __SELECTION_OPTIONS_H__
  20.  
  21. #include "tools.h"
  22. #include "tool_options.h"
  23.  
  24. #include "libgimp/gimpunit.h"
  25.  
  26. /*  the selection options structures  */
  27.  
  28. typedef struct _SelectionOptions SelectionOptions;
  29. struct _SelectionOptions
  30. {
  31.   ToolOptions  tool_options;
  32.  
  33.   /*  options used by all selection tools  */
  34.   gboolean     feather;
  35.   gboolean     feather_d;
  36.   GtkWidget   *feather_w;
  37.  
  38.   gdouble      feather_radius;
  39.   gdouble      feather_radius_d;
  40.   GtkObject   *feather_radius_w;
  41.  
  42.   /*  used by all selection tools except rect. select  */
  43.   gboolean     antialias;
  44.   gboolean     antialias_d;
  45.   GtkWidget   *antialias_w;
  46.  
  47.   /*  used by fuzzy, by-color selection  */
  48.   gboolean     sample_merged;
  49.   gboolean     sample_merged_d;
  50.   GtkWidget   *sample_merged_w;
  51.  
  52.   gdouble      threshold;
  53.   /* gdouble   threshold_d; (from gimprc) */
  54.   GtkObject   *threshold_w;
  55.  
  56.   /*  used by rect., ellipse selection  */
  57.   gboolean     fixed_size;
  58.   gboolean     fixed_size_d;
  59.   GtkWidget   *fixed_size_w;
  60.  
  61.   gdouble      fixed_width;
  62.   gdouble      fixed_width_d;
  63.   GtkObject   *fixed_width_w;
  64.  
  65.   gdouble      fixed_height;
  66.   gdouble      fixed_height_d;
  67.   GtkObject   *fixed_height_w;
  68.  
  69.   GimpUnit     fixed_unit;
  70.   GimpUnit     fixed_unit_d;
  71.   GtkWidget   *fixed_unit_w;
  72.  
  73.   /*  used by bezier selection  */
  74.   gint         extend;
  75. };
  76.  
  77. /*  selection tool options functions
  78.  */
  79. SelectionOptions * selection_options_new   (ToolType              tool_type,
  80.                         ToolOptionsResetFunc  reset_func);
  81.  
  82. void               selection_options_reset (SelectionOptions     *options);
  83.  
  84. /*  to be used by "derived selection options only
  85.  */
  86. void               selection_options_init  (SelectionOptions     *options,
  87.                         ToolType              tool_type,
  88.                         ToolOptionsResetFunc  reset_func);
  89.  
  90. #endif  /*  __SELCTION_OPTIONS_H__  */
  91.