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

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 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.  
  19. #ifndef  __PATTERN_SELECT_H__
  20. #define  __PATTERN_SELECT_H__
  21.  
  22. #include "patterns.h"
  23.  
  24.  
  25. typedef struct _PatternSelect PatternSelect;
  26.  
  27. struct _PatternSelect
  28. {
  29.   GtkWidget     *shell;
  30.  
  31.   /*  The preview and it's vscale data  */
  32.   GtkWidget     *preview;
  33.   GdkGC         *gc;
  34.   GtkAdjustment *sbar_data;
  35.  
  36.   GtkWidget *options_box;
  37.   GtkWidget *pattern_name;
  38.   GtkWidget *pattern_size;
  39.  
  40.   /*  Pattern popup  */
  41.   GtkWidget *pattern_popup;
  42.   GtkWidget *pattern_preview;
  43.   guint      popup_timeout_tag;
  44.  
  45.   /*  Callback function name  */
  46.   gchar       *callback_name;
  47.  
  48.   /*  Context to store the current pattern  */
  49.   GimpContext *context;
  50.  
  51.   GPattern    *dnd_pattern;
  52.  
  53.   /*  Some variables to keep the GUI consistent  */
  54.   gint  cell_width;
  55.   gint  cell_height;
  56.   gint  scroll_offset;
  57.   gint  old_row;
  58.   gint  old_col;
  59.   gint  NUM_PATTERN_COLUMNS;
  60.   gint  NUM_PATTERN_ROWS;
  61. };
  62.  
  63. /*  list of active dialogs  */
  64. extern GSList *pattern_active_dialogs;
  65.  
  66. /*  the main pattern dialog  */
  67. extern PatternSelect *pattern_select_dialog;
  68.  
  69. PatternSelect * pattern_select_new       (gchar         *title,
  70.                       gchar         *initial_pattern);
  71.  
  72. void            pattern_select_free      (PatternSelect *psp);
  73.  
  74. void            patterns_check_dialogs   (void);
  75.  
  76. /*  the main pattern selection  */
  77. void            pattern_dialog_create    (void);
  78. void            pattern_dialog_free      (void);
  79.  
  80. #endif  /*  __PATTERN_SELECT_H__  */
  81.