home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / info_dialog.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-12-17  |  3.7 KB  |  128 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 __INFO_DIALOG_H__
  20. #define __INFO_DIALOG_H__
  21.  
  22. #include "gimphelp.h"
  23.  
  24. #include "libgimp/gimpsizeentry.h"
  25. #include "libgimp/gimpunit.h"
  26.  
  27.  
  28. typedef enum
  29.   INFO_LABEL,
  30.   INFO_ENTRY,
  31.   INFO_SCALE,
  32.   INFO_SPINBUTTON,
  33.   INFO_SIZEENTRY
  34. } InfoFieldType;
  35.  
  36. typedef struct _InfoField  InfoField;
  37. typedef struct _InfoDialog InfoDialog;
  38.  
  39. struct _InfoField
  40. {
  41.   InfoFieldType  field_type;
  42.  
  43.   GtkObject     *obj;
  44.   void          *value_ptr;
  45.  
  46.   GtkSignalFunc  callback;
  47.   gpointer       client_data;
  48. };
  49.  
  50. struct _InfoDialog
  51. {
  52.   GtkWidget   *shell;
  53.   GtkWidget   *vbox;
  54.   GtkWidget   *info_table;
  55.   GtkWidget   *info_notebook;
  56.  
  57.   GSList      *field_list;
  58.   gint         nfields;
  59.  
  60.   void        *user_data;
  61. };
  62.  
  63. /*  Info Dialog functions  */
  64.  
  65. InfoDialog *info_dialog_new            (gchar           *title,
  66.                     GimpHelpFunc     help_func,
  67.                     gpointer         help_data);
  68. InfoDialog *info_dialog_notebook_new   (gchar           *title,
  69.                     GimpHelpFunc     help_func,
  70.                     gpointer         help_data);
  71. void        info_dialog_free           (InfoDialog      *idialog);
  72.  
  73. void        info_dialog_popup          (InfoDialog      *idialog);
  74. void        info_dialog_popdown        (InfoDialog      *idialog);
  75.  
  76. void        info_dialog_update         (InfoDialog      *idialog);
  77.  
  78. GtkWidget  *info_dialog_add_label      (InfoDialog      *idialog,
  79.                     gchar           *title,
  80.                     gchar           *text_ptr);
  81.  
  82. GtkWidget  *info_dialog_add_entry      (InfoDialog      *idialog,
  83.                     gchar           *title,
  84.                     gchar           *text_ptr,
  85.                     GtkSignalFunc    callback,
  86.                     gpointer         data);
  87.  
  88. GtkWidget  *info_dialog_add_scale      (InfoDialog      *idialog,
  89.                     gchar           *title,
  90.                     gdouble         *value_ptr,
  91.                     gfloat           lower,
  92.                     gfloat           upper,
  93.                     gfloat           step_increment,
  94.                     gfloat           page_increment,
  95.                     gfloat           page_size,
  96.                     gint             digits,
  97.                     GtkSignalFunc    callback,
  98.                     gpointer         data);
  99.  
  100. GtkWidget  *info_dialog_add_spinbutton (InfoDialog      *idialog,
  101.                     gchar           *title,
  102.                     gdouble         *value_ptr,
  103.                     gfloat           lower,
  104.                     gfloat           upper,
  105.                     gfloat           step_increment,
  106.                     gfloat           page_increment,
  107.                     gfloat           page_size,
  108.                     gfloat           climb_rate,
  109.                     gint             digits,
  110.                     GtkSignalFunc    callback,
  111.                     gpointer         data);
  112.  
  113. GtkWidget  *info_dialog_add_sizeentry  (InfoDialog      *idialog,
  114.                     gchar           *title,
  115.                     gdouble         *value_ptr,
  116.                     gint             nfields,
  117.                     GimpUnit         unit,
  118.                     gchar           *unit_format,
  119.                     gboolean         menu_show_pixels,
  120.                     gboolean         menu_show_percent,
  121.                     gboolean         show_refval,
  122.                     GimpSizeEntryUpdatePolicy update_policy,
  123.                     GtkSignalFunc    callback,
  124.                     gpointer         data);
  125.  
  126. #endif  /*  __INFO_DIALOG_H__  */
  127.