gimppropwidgets.h 11.8 KB
Newer Older
1 2
/* LIBGIMP - The GIMP Library
 * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3
 *
4 5 6
 * gimppropwidgets.h
 * Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
 *
7
 * This library is free software: you can redistribute it and/or
8 9
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
10
 * version 3 of the License, or (at your option) any later version.
11
 *
12
 * This library is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library.  If not, see
19
 * <https://www.gnu.org/licenses/>.
20 21
 */

22 23 24 25
#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
#endif

26 27 28
#ifndef __GIMP_PROP_WIDGETS_H__
#define __GIMP_PROP_WIDGETS_H__

29 30
G_BEGIN_DECLS

31

32 33
/*  GParamBoolean  */

Sven Neumann's avatar
Sven Neumann committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
GtkWidget     * gimp_prop_check_button_new        (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *label);
GtkWidget     * gimp_prop_boolean_combo_box_new   (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *true_text,
                                                   const gchar  *false_text);
GtkWidget     * gimp_prop_boolean_radio_frame_new (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *title,
                                                   const gchar  *true_text,
                                                   const gchar  *false_text);

GtkWidget     * gimp_prop_expander_new            (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *label);
50

51

52 53
/*  GParamInt  */

Sven Neumann's avatar
Sven Neumann committed
54 55 56
GtkWidget     * gimp_prop_int_combo_box_new       (GObject      *config,
                                                   const gchar  *property_name,
                                                   GimpIntStore *store);
57

58 59 60 61 62
/*  GParamGType  */

GtkWidget     * gimp_prop_pointer_combo_box_new   (GObject      *config,
                                                   const gchar  *property_name,
                                                   GimpIntStore *store);
63

64 65
/*  GParamEnum  */

Sven Neumann's avatar
Sven Neumann committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
GtkWidget     * gimp_prop_enum_combo_box_new      (GObject      *config,
                                                   const gchar  *property_name,
                                                   gint          minimum,
                                                   gint          maximum);

GtkWidget     * gimp_prop_enum_check_button_new   (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *label,
                                                   gint          false_value,
                                                   gint          true_value);

GtkWidget     * gimp_prop_enum_radio_frame_new    (GObject      *config,
                                                   const gchar  *property_name,
                                                   const gchar  *title,
                                                   gint          minimum,
                                                   gint          maximum);
GtkWidget     * gimp_prop_enum_radio_box_new      (GObject      *config,
                                                   const gchar  *property_name,
                                                   gint          minimum,
                                                   gint          maximum);
86 87

GtkWidget     * gimp_prop_enum_icon_box_new       (GObject      *config,
Sven Neumann's avatar
Sven Neumann committed
88
                                                   const gchar  *property_name,
89
                                                   const gchar  *icon_prefix,
Sven Neumann's avatar
Sven Neumann committed
90 91
                                                   gint          minimum,
                                                   gint          maximum);
92

93 94 95
GtkWidget     * gimp_prop_enum_label_new          (GObject      *config,
                                                   const gchar  *property_name);

96 97 98

/*  GParamInt, GParamUInt, GParamLong, GParamULong, GParamDouble  */

Sven Neumann's avatar
Sven Neumann committed
99 100 101 102 103 104
GtkWidget     * gimp_prop_spin_button_new         (GObject      *config,
                                                   const gchar  *property_name,
                                                   gdouble       step_increment,
                                                   gdouble       page_increment,
                                                   gint          digits);

105 106 107 108 109 110
GtkWidget     * gimp_prop_hscale_new              (GObject      *config,
                                                   const gchar  *property_name,
                                                   gdouble       step_increment,
                                                   gdouble       page_increment,
                                                   gint          digits);

111
GtkAdjustment * gimp_prop_scale_entry_new         (GObject      *config,
Sven Neumann's avatar
Sven Neumann committed
112
                                                   const gchar  *property_name,
113
                                                   GtkGrid      *grid,
Sven Neumann's avatar
Sven Neumann committed
114 115 116 117 118 119
                                                   gint          column,
                                                   gint          row,
                                                   const gchar  *label,
                                                   gdouble       step_increment,
                                                   gdouble       page_increment,
                                                   gint          digits,
120 121 122
                                                   gboolean      limit_scale,
                                                   gdouble       lower_limit,
                                                   gdouble       upper_limit);
123

124 125
/*  special form of gimp_prop_scale_entry_new() for GParamDouble  */

126
GtkAdjustment * gimp_prop_opacity_entry_new       (GObject       *config,
Sven Neumann's avatar
Sven Neumann committed
127
                                                   const gchar   *property_name,
128
                                                   GtkGrid       *grid,
Sven Neumann's avatar
Sven Neumann committed
129 130 131
                                                   gint           column,
                                                   gint           row,
                                                   const gchar   *label);
132

133 134 135

/*  GimpParamMemsize  */

Sven Neumann's avatar
Sven Neumann committed
136 137
GtkWidget     * gimp_prop_memsize_entry_new       (GObject       *config,
                                                   const gchar   *property_name);
138 139 140 141


/*  GParamString  */

Sven Neumann's avatar
Sven Neumann committed
142 143 144 145 146 147 148 149
GtkWidget     * gimp_prop_label_new               (GObject       *config,
                                                   const gchar   *property_name);
GtkWidget     * gimp_prop_entry_new               (GObject       *config,
                                                   const gchar   *property_name,
                                                   gint           max_len);
GtkTextBuffer * gimp_prop_text_buffer_new         (GObject       *config,
                                                   const gchar   *property_name,
                                                   gint           max_len);
150 151
GtkWidget     * gimp_prop_string_combo_box_new    (GObject       *config,
                                                   const gchar   *property_name,
152
                                                   GtkTreeModel  *model,
153 154
                                                   gint           id_column,
                                                   gint           label_column);
155 156 157 158


/*  GimpParamPath  */

159 160 161 162
GtkWidget     * gimp_prop_file_chooser_button_new (GObject              *config,
                                                   const gchar          *property_name,
                                                   const gchar          *title,
                                                   GtkFileChooserAction  action);
163 164 165 166
GtkWidget     * gimp_prop_file_chooser_button_new_with_dialog (GObject     *config,
                                                               const gchar *property_name,

                                                               GtkWidget   *dialog);
167 168 169 170
GtkWidget     * gimp_prop_path_editor_new         (GObject       *config,
                                                   const gchar   *path_property_name,
                                                   const gchar   *writable_property_name,
                                                   const gchar   *filesel_title);
171

172

173
/*  GParamInt, GParamUInt, GParamDouble   unit: GimpParamUnit  */
174

Sven Neumann's avatar
Sven Neumann committed
175 176
GtkWidget     * gimp_prop_size_entry_new          (GObject       *config,
                                                   const gchar   *property_name,
177
                                                   gboolean       property_is_pixel,
Sven Neumann's avatar
Sven Neumann committed
178 179
                                                   const gchar   *unit_property_name,
                                                   const gchar   *unit_format,
180
                                                   GimpSizeEntryUpdatePolicy  update_policy,
Sven Neumann's avatar
Sven Neumann committed
181
                                                   gdouble        resolution);
182 183


184 185
/*  x,y: GParamInt, GParamDouble   unit: GimpParamUnit  */

Sven Neumann's avatar
Sven Neumann committed
186 187 188 189 190
GtkWidget     * gimp_prop_coordinates_new         (GObject       *config,
                                                   const gchar   *x_property_name,
                                                   const gchar   *y_property_name,
                                                   const gchar   *unit_property_name,
                                                   const gchar   *unit_format,
191
                                                   GimpSizeEntryUpdatePolicy  update_policy,
Sven Neumann's avatar
Sven Neumann committed
192 193 194 195 196 197 198 199 200 201 202
                                                   gdouble        xresolution,
                                                   gdouble        yresolution,
                                                   gboolean       has_chainbutton);
gboolean        gimp_prop_coordinates_connect     (GObject       *config,
                                                   const gchar   *x_property_name,
                                                   const gchar   *y_property_name,
                                                   const gchar   *unit_property_name,
                                                   GtkWidget     *sizeentry,
                                                   GtkWidget     *chainbutton,
                                                   gdouble        xresolution,
                                                   gdouble        yresolution);
203 204


205 206
/*  GimpParamColor  */

Sven Neumann's avatar
Sven Neumann committed
207 208 209 210
GtkWidget     * gimp_prop_color_area_new          (GObject       *config,
                                                   const gchar   *property_name,
                                                   gint           width,
                                                   gint           height,
211
                                                   GimpColorAreaType  type);
212

213 214
/*  GimpParamUnit  */

215 216
GtkWidget     * gimp_prop_unit_combo_box_new      (GObject       *config,
                                                   const gchar   *property_name);
217 218


219
/*  GParamString (icon name)  */
220

221 222 223
GtkWidget     * gimp_prop_icon_image_new          (GObject       *config,
                                                   const gchar   *property_name,
                                                   GtkIconSize    icon_size);
224 225


226 227
G_END_DECLS

228
#endif /* __GIMP_PROP_WIDGETS_H__ */