~ubuntu-branches/ubuntu/maverick/gimp/maverick-updates

« back to all changes in this revision

Viewing changes to app/dialogs/info-dialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-12-09 19:44:52 UTC
  • Revision ID: james.westby@ubuntu.com-20051209194452-yggpemjlofpjqyf4
Tags: upstream-2.2.9
ImportĀ upstreamĀ versionĀ 2.2.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
23
typedef enum
 
24
{
 
25
  INFO_LABEL,
 
26
  INFO_ENTRY,
 
27
  INFO_SCALE,
 
28
  INFO_SPINBUTTON,
 
29
  INFO_SIZEENTRY
 
30
} InfoFieldType;
 
31
 
 
32
typedef struct _InfoField  InfoField;
 
33
 
 
34
struct _InfoField
 
35
{
 
36
  InfoFieldType  field_type;
 
37
 
 
38
  GtkObject     *obj;
 
39
  gpointer       value_ptr;
 
40
 
 
41
  GCallback      callback;
 
42
  gpointer       callback_data;
 
43
};
 
44
 
 
45
struct _InfoDialog
 
46
{
 
47
  GtkWidget   *shell;
 
48
  GtkWidget   *vbox;
 
49
  GtkWidget   *info_table;
 
50
  GtkWidget   *info_notebook;
 
51
 
 
52
  GSList      *field_list;
 
53
  gint         nfields;
 
54
 
 
55
  gpointer     user_data;
 
56
};
 
57
 
 
58
/*  Info Dialog functions  */
 
59
 
 
60
InfoDialog *info_dialog_new            (GimpViewable    *viewable,
 
61
                                        const gchar     *title,
 
62
                                        const gchar     *role,
 
63
                                        const gchar     *stock_id,
 
64
                                        const gchar     *desc,
 
65
                                        GtkWidget       *parent,
 
66
                                        GimpHelpFunc     help_func,
 
67
                                        gpointer         help_data);
 
68
InfoDialog *info_dialog_notebook_new   (GimpViewable    *viewable,
 
69
                                        const gchar     *title,
 
70
                                        const gchar     *role,
 
71
                                        const gchar     *stock_id,
 
72
                                        const gchar     *desc,
 
73
                                        GtkWidget       *parent,
 
74
                                        GimpHelpFunc     help_func,
 
75
                                        gpointer         help_data);
 
76
void        info_dialog_free           (InfoDialog      *idialog);
 
77
 
 
78
void        info_dialog_show           (InfoDialog      *idialog);
 
79
void        info_dialog_present        (InfoDialog      *idialog);
 
80
void        info_dialog_hide           (InfoDialog      *idialog);
 
81
 
 
82
void        info_dialog_update         (InfoDialog      *idialog);
 
83
 
 
84
GtkWidget  *info_dialog_add_label      (InfoDialog      *idialog,
 
85
                                        gchar           *title,
 
86
                                        gchar           *text_ptr);
 
87
 
 
88
GtkWidget  *info_dialog_add_entry      (InfoDialog      *idialog,
 
89
                                        gchar           *title,
 
90
                                        gchar           *text_ptr,
 
91
                                        GCallback        callback,
 
92
                                        gpointer         callback_data);
 
93
 
 
94
GtkWidget  *info_dialog_add_scale      (InfoDialog      *idialog,
 
95
                                        gchar           *title,
 
96
                                        gdouble         *value_ptr,
 
97
                                        gfloat           lower,
 
98
                                        gfloat           upper,
 
99
                                        gfloat           step_increment,
 
100
                                        gfloat           page_increment,
 
101
                                        gfloat           page_size,
 
102
                                        gint             digits,
 
103
                                        GCallback        callback,
 
104
                                        gpointer         callback_data);
 
105
 
 
106
GtkWidget  *info_dialog_add_spinbutton (InfoDialog      *idialog,
 
107
                                        gchar           *title,
 
108
                                        gdouble         *value_ptr,
 
109
                                        gfloat           lower,
 
110
                                        gfloat           upper,
 
111
                                        gfloat           step_increment,
 
112
                                        gfloat           page_increment,
 
113
                                        gfloat           page_size,
 
114
                                        gfloat           climb_rate,
 
115
                                        gint             digits,
 
116
                                        GCallback        callback,
 
117
                                        gpointer         callback_data);
 
118
 
 
119
GtkWidget  *info_dialog_add_sizeentry  (InfoDialog      *idialog,
 
120
                                        gchar           *title,
 
121
                                        gdouble         *value_ptr,
 
122
                                        gint             nfields,
 
123
                                        GimpUnit         unit,
 
124
                                        gchar           *unit_format,
 
125
                                        gboolean         menu_show_pixels,
 
126
                                        gboolean         menu_show_percent,
 
127
                                        gboolean         show_refval,
 
128
                                        GimpSizeEntryUpdatePolicy update_policy,
 
129
                                        GCallback        callback,
 
130
                                        gpointer         callback_data);
 
131
 
 
132
#endif  /*  __INFO_DIALOG_H__  */