1 /* GIMP - The GNU Image Manipulation Program
2  * Copyright (C) 1995-1997 Spencer Kimball and Peter Mattis
3  *
4  * gimppropwidgets.h
5  * Copyright (C) 2002 Michael Natterer <mitch@gimp.org>
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __GIMP_APP_PROP_WIDGETS_H__
22 #define __GIMP_APP_PROP_WIDGETS_H__
23 
24 
25 /*  GParamBoolean  */
26 
27 GtkWidget * gimp_prop_expanding_frame_new   (GObject       *config,
28                                              const gchar   *property_name,
29                                              const gchar   *button_label,
30                                              GtkWidget     *child,
31                                              GtkWidget    **button);
32 
33 GtkWidget * gimp_prop_boolean_icon_box_new  (GObject      *config,
34                                              const gchar  *property_name,
35                                              const gchar  *true_icon,
36                                              const gchar  *false_icon,
37                                              const gchar  *true_tooltip,
38                                              const gchar  *false_tooltip);
39 
40 
41 /*  GParamEnum  */
42 
43 GtkWidget * gimp_prop_layer_mode_box_new    (GObject       *config,
44                                              const gchar   *property_name,
45                                              GimpLayerModeContext  context);
46 
47 
48 /*  GimpParamColor  */
49 
50 GtkWidget * gimp_prop_color_button_new      (GObject       *config,
51                                              const gchar   *property_name,
52                                              const gchar   *title,
53                                              gint           width,
54                                              gint           height,
55                                              GimpColorAreaType  type);
56 
57 
58 /*  GParamDouble  */
59 
60 GtkWidget * gimp_prop_scale_button_new      (GObject       *config,
61                                              const gchar   *property_name);
62 GtkWidget * gimp_prop_spin_scale_new        (GObject       *config,
63                                              const gchar   *property_name,
64                                              const gchar   *label,
65                                              gdouble        step_increment,
66                                              gdouble        page_increment,
67                                              gint           digits);
68 
69 void        gimp_prop_widget_set_factor     (GtkWidget     *widget,
70                                              gdouble        factor,
71                                              gdouble        step_increment,
72                                              gdouble        page_increment,
73                                              gint           digits);
74 
75 GtkWidget * gimp_prop_angle_dial_new        (GObject       *config,
76                                              const gchar   *property_name);
77 GtkWidget * gimp_prop_angle_range_dial_new  (GObject       *config,
78                                              const gchar   *alpha_property_name,
79                                              const gchar   *beta_property_name,
80                                              const gchar   *clockwise_property_name);
81 
82 GtkWidget * gimp_prop_polar_new             (GObject       *config,
83                                              const gchar   *angle_property_name,
84                                              const gchar   *radius_property_name);
85 
86 GtkWidget * gimp_prop_range_new             (GObject       *config,
87                                              const gchar   *lower_property_name,
88                                              const gchar   *upper_property_name,
89                                              gdouble        step_increment,
90                                              gdouble        page_increment,
91                                              gint           digits,
92                                              gboolean       sorted);
93 void        gimp_prop_range_set_ui_limits   (GtkWidget     *widget,
94                                              gdouble        lower,
95                                              gdouble        upper);
96 
97 
98 /*  GParamObject (GimpViewable)  */
99 
100 GtkWidget * gimp_prop_view_new              (GObject       *config,
101                                              const gchar   *property_name,
102                                              GimpContext   *context,
103                                              gint           size);
104 
105 
106 /*  GParamDouble, GParamDouble, GParamDouble, GParamDouble, GParamBoolean  */
107 
108 GtkWidget * gimp_prop_number_pair_entry_new (GObject     *config,
109                                              const gchar *left_number_property,
110                                              const gchar *right_number_property,
111                                              const gchar *default_left_number_property,
112                                              const gchar *default_right_number_property,
113                                              const gchar *user_override_property,
114                                              gboolean     connect_numbers_changed,
115                                              gboolean     connect_ratio_changed,
116                                              const gchar *separators,
117                                              gboolean     allow_simplification,
118                                              gdouble      min_valid_value,
119                                              gdouble      max_valid_value);
120 
121 
122 /*  GParamString  */
123 
124 GtkWidget * gimp_prop_language_combo_box_new    (GObject      *config,
125                                                  const gchar  *property_name);
126 GtkWidget * gimp_prop_language_entry_new        (GObject      *config,
127                                                  const gchar  *property_name);
128 
129 GtkWidget * gimp_prop_profile_combo_box_new     (GObject      *config,
130                                                  const gchar  *property_name,
131                                                  GtkListStore *profile_store,
132                                                  const gchar  *dialog_title,
133                                                  GObject      *profile_path_config,
134                                                  const gchar  *profile_path_property_name);
135 
136 GtkWidget * gimp_prop_compression_combo_box_new (GObject     *config,
137                                                  const gchar *property_name);
138 
139 GtkWidget * gimp_prop_icon_picker_new           (GimpViewable *viewable,
140                                                  Gimp         *gimp);
141 
142 
143 /*  Utility functions  */
144 
145 gboolean _gimp_prop_widgets_get_numeric_values (GObject     *object,
146                                                 GParamSpec  *param_spec,
147                                                 gdouble     *value,
148                                                 gdouble     *lower,
149                                                 gdouble     *upper,
150                                                 const gchar *strloc);
151 
152 
153 #endif /* __GIMP_APP_PROP_WIDGETS_H__ */
154