2
/* GnomeMeeting -- A Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
* GnomeMeting is licensed under the GPL license and as a special exception,
21
* you have permission to link or otherwise combine this program with the
22
* programs OpenH323 and Pwlib, and distribute the combination, without
23
* applying the requirements of the GNU GPL to the OpenH323 program, as long
24
* as you do follow the requirements of the GNU GPL for all the rest of the
25
* software thus combined.
30
* gnome_prefs_window.c - description
31
* ------------------------------------
32
* begin : Mon Oct 15 2003, but based on older code
33
* copyright : (C) 2000-2006 by Damien Sandras
34
* description : Helpers to create GNOME compliant prefs windows.
45
* The created widgets are associated to a config key. They have the value
46
* of the config key as initial value and they get updated when the config
49
* You have to create a prefs window with gnome_prefs_window_new. You
50
* can create categories of options with gnome_prefs_window_section_new
51
* and subcategories with gnome_prefs_window_subsection_new. You can fill in
52
* those subcategories by blocks of options using gnome_prefs_subsection_new
53
* and then add entries, toggles and such to those blocks using
54
* the functions below.
59
* BEHAVIOR : Creates a GtkEntry associated with a config key and returns
61
* The first parameter is the section in which
62
* the GtkEntry should be attached. The other parameters are
63
* the text label, the config key, the tooltip, the row where
64
* to attach it in the section, and if the label and GtkEntry
65
* should be packed together or aligned with others in the
66
* section they belong to.
69
GtkWidget *gnome_prefs_entry_new (GtkWidget *,
78
* BEHAVIOR : Creates a GtkToggleButton associated with a config key and
80
* The first parameter is the section in which the
81
* GtkToggleButton should be attached. The other parameters are
82
* the text label, the config key, the tooltip, the row where
83
* to attach it in the section.
86
GtkWidget *gnome_prefs_toggle_new (GtkWidget *,
94
* BEHAVIOR : Creates a GtkHScale associated with a config key and
96
* The first parameter is the section in which
97
* the GtkHScale should be attached. The other parameters
98
* are the text labels, the config key, the tooltip, the
99
* minimal and maximal values, the incrementation step,
100
* the row where to attach it in the section.
103
GtkWidget *gnome_prefs_scale_new (GtkWidget *,
115
* BEHAVIOR : Creates a GtkSpinButton associated with a config key and
116
* returns the result.
117
* The first parameter is the section in which
118
* the GtkSpinButton should be attached. The other parameters
119
* are the text label, the config key, the tooltip, the
120
* minimal and maximal values, the incrementation step,
121
* the row where to attach it in the section,
122
* the rest of the label, if any, and if the label and widget
123
* should be packed together or aligned with others in the
124
* section they belong to.
125
* PRE : The gboolean must be TRUE if the rest of the label is given.
127
GtkWidget *gnome_prefs_spin_new (GtkWidget *,
140
* BEHAVIOR : Creates a range with 2 GtkSpinButtons associated with two
142
* The first parameter is the section in which
143
* the GtkSpinButton should be attached. The other parameters
144
* are the first part of the label, a pointer that will be
145
* updated to point to the first GtkSpinButton, the second
146
* part of the text label, a pointer that will be updated
147
* to point to the second GtkSpinButton, the third part
148
* of the text label, the 2 config keys, the 2 tooltips, the
149
* 2 minimal, the 2 maximal values, the incrementation step,
150
* the row where to attach it in the section.
153
void gnome_prefs_range_new (GtkWidget *,
172
* BEHAVIOR : Creates a GtkOptionMenu associated with an integer config
173
* key and returns the result.
174
* The first parameter is the section in which
175
* the GtkEntry should be attached. The other parameters are
176
* the text label, the possible values for the menu, the config
177
* key, the tooltip, the row where to attach it in the section.
180
GtkWidget *gnome_prefs_int_option_menu_new (GtkWidget *,
189
* BEHAVIOR : Creates a GtkOptionMenu associated with a string config
190
* key and returns the result.
191
* The first parameter is the section in which
192
* the GtkEntry should be attached. The other parameters are
193
* the text label, the possible values for the menu, the config
194
* key, the tooltip, the row where to attach it in the section.
195
* PRE : The array ends with NULL.
197
GtkWidget *gnome_prefs_string_option_menu_new (GtkWidget *,
206
* BEHAVIOR : Updates the content of a GtkOptionMenu associated with
207
* a string config key. The first parameter is the menu,
208
* the second is the array of possible values, and the
209
* last one is the config key.
210
* PRE : The array ends with NULL.
212
void gnome_prefs_string_option_menu_update (GtkWidget *,
218
* BEHAVIOR : Creates a subsection inside a section of a prefs window.
219
* The parameters are the prefs window, the section of the
220
* prefs window in which the newly created subsection must
221
* be added, the title of the frame, the number of rows
222
* and of columns. Widgets can be attached to the returned
226
GtkWidget *gnome_prefs_subsection_new (GtkWidget *,
233
* BEHAVIOR : Creates a new prefs window. The parameter is a filename
234
* corresponding to the logo displayed by default. Returns
235
* the created window which still has to be connected to the
239
GtkWidget *gnome_prefs_window_new (gchar *);
243
* BEHAVIOR : Creates a new section in the given prefs window.
244
* The parameter are the prefs window and the prefs
245
* window section name.
248
void gnome_prefs_window_section_new (GtkWidget *,
253
* BEHAVIOR : Creates a new subsection in the given prefs window and
254
* returns it. The parameter are the prefs window and the
255
* prefs window subsection name. General subsections can
256
* be created in the returned gnome prefs window subsection
257
* and widgets can be attached to them.
260
GtkWidget *gnome_prefs_window_subsection_new (GtkWidget *,