1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 create bars of buttons and other widgets.
7 <!-- ##### SECTION Long_Description ##### -->
9 A toolbar is created with a call to gtk_toolbar_new().
12 Buttons with text and/or images are added with gtk_toolbar_append_item(), gtk_toolbar_prepend_item(), and gtk_toolbar_insert_item().
15 Any of #GtkToggleButton, #GtkRadioButton, or an arbitrary widget can be added to the toolbar with gtk_toolbar_append_element(), gtk_toolbar_prepend_element(), and gtk_toolbar_insert_element().
18 Widgets can be visibly grouped by adding gaps between widgets using gtk_toolbar_append_space(), gtk_toolbar_prepend_space(), and gtk_toolbar_insert_space().
21 <!-- ##### SECTION See_Also ##### -->
25 <term>#GtkToolTips</term>
26 <listitem><para>Change the properties of a #GtkToolbar's #GtkTooltips.</para></listitem>
29 <term>#GtkTipsQuery</term>
30 <listitem><para>Make use of the private tips of toolbar elements.</para></listitem>
35 <!-- ##### STRUCT GtkToolbar ##### -->
37 <structfield>num_children</structfield> is an integer specifying how many toolbar items the #GtkToolbar contains. <structfield>children</structfield> is a #GList of the child widgets of the toolbar.
40 <structfield>orientation</structfield>
44 <!-- ##### ENUM GtkToolbarChildType ##### -->
46 #GtkToolbarChildType is used to set the type of new elements that are added
50 @GTK_TOOLBAR_CHILD_SPACE: a space in the style of the toolbar's #GtkToolbarSpaceStyle.
51 @GTK_TOOLBAR_CHILD_BUTTON: a #GtkButton.
52 @GTK_TOOLBAR_CHILD_TOGGLEBUTTON: a #GtkToggleButton.
53 @GTK_TOOLBAR_CHILD_RADIOBUTTON: a #GtkRadioButton.
54 @GTK_TOOLBAR_CHILD_WIDGET: a standard #GtkWidget.
56 <!-- ##### ENUM GtkToolbarSpaceStyle ##### -->
61 @GTK_TOOLBAR_SPACE_EMPTY:
62 @GTK_TOOLBAR_SPACE_LINE:
64 <!-- ##### STRUCT GtkToolbarChild ##### -->
74 <!-- ##### FUNCTION gtk_toolbar_new ##### -->
76 Creates a new toolbar.
79 @Returns: the newly-created toolbar.
82 <!-- ##### FUNCTION gtk_toolbar_append_item ##### -->
84 Adds a new button to the end (right or bottom edges) of the given toolbar.
87 @toolbar: a #GtkToolbar.
88 @text: give your toolbar button a label.
89 @tooltip_text: a string that appears when the user holds the mouse over this item.
90 @tooltip_private_text: use with #GtkTipsQuery.
91 @icon: a #GtkWidget that should be used as the button's icon.
92 @callback: the function to be executed when the button is pressed.
93 @user_data: a pointer to any data you wish to be passed to the callback.
94 @Returns: the new toolbar item as a #GtkWidget.
97 <!-- ##### FUNCTION gtk_toolbar_prepend_item ##### -->
99 Adds a new button to the beginning (top or left edges) of the given toolbar.
102 @toolbar: a #GtkToolbar.
103 @text: give your toolbar button a label.
104 @tooltip_text: a string that appears when the user holds the mouse over this item.
105 @tooltip_private_text: use with #GtkTipsQuery.
106 @icon: a #GtkWidget that should be used as the button's icon.
107 @callback: the function to be executed when the button is pressed.
108 @user_data: a pointer to any data you wish to be passed to the callback.
109 @Returns: the new toolbar item as a #GtkWidget.
112 <!-- ##### FUNCTION gtk_toolbar_insert_item ##### -->
114 Inserts a new item into the toolbar. You must specify the position in the toolbar where it will be inserted.
117 @toolbar: a #GtkToolbar.
118 @text: give your toolbar button a label.
119 @tooltip_text: a string that appears when the user holds the mouse over this item.
120 @tooltip_private_text: use with #GtkTipsQuery.
121 @icon: a #GtkWidget that should be used as the button's icon.
122 @callback: the function to be executed when the button is pressed.
123 @user_data: a pointer to any data you wish to be passed to the callback.
124 @position: the number of widgets to insert this item after.
125 @Returns: the new toolbar item as a #GtkWidget.
128 <!-- ##### FUNCTION gtk_toolbar_append_space ##### -->
130 Adds a new space to the end of the toolbar.
133 @toolbar: a #GtkToolbar.
136 <!-- ##### FUNCTION gtk_toolbar_prepend_space ##### -->
138 Adds a new space to the beginning of the toolbar.
141 @toolbar: a #GtkToolbar.
144 <!-- ##### FUNCTION gtk_toolbar_insert_space ##### -->
146 Inserts a new space in the toolbar at the specified position.
149 @toolbar: a #GtkToolbar
150 @position: the number of widgets after which a space should be inserted.
153 <!-- ##### FUNCTION gtk_toolbar_append_element ##### -->
155 Adds a new element to the end of a toolbar.
158 @toolbar: a #GtkToolbar.
159 @type: a value of type #GtkToolbarChildType that determines what @widget will be.
160 @widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
161 @text: the element's label.
162 @tooltip_text: the element's tooltip.
163 @tooltip_private_text: used for context-sensitive help about this toolbar element.
164 @icon: a #GtkWidget that provides pictorial representation of the element's function.
165 @callback: the function to be executed when the button is pressed.
166 @user_data: any data you wish to pass to the callback.
167 @Returns: the new toolbar element as a #GtkWidget.
170 <!-- ##### FUNCTION gtk_toolbar_prepend_element ##### -->
172 Adds a new element to the beginning of a toolbar.
175 @toolbar: a #GtkToolbar.
176 @type: a value of type #GtkToolbarChildType that determines what @widget will be.
177 @widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
178 @text: the element's label.
179 @tooltip_text: the element's tooltip.
180 @tooltip_private_text: used for context-sensitive help about this toolbar element.
181 @icon: a #GtkWidget that provides pictorial representation of the element's function.
182 @callback: the function to be executed when the button is pressed.
183 @user_data: any data you wish to pass to the callback.
184 @Returns: the new toolbar element as a #GtkWidget.
187 <!-- ##### FUNCTION gtk_toolbar_insert_element ##### -->
192 @toolbar: a #GtkToolbar.
193 @type: a value of type #GtkToolbarChildType that determines what @widget will be.
194 @widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
195 @text: the element's label.
196 @tooltip_text: the element's tooltip.
197 @tooltip_private_text: used for context-sensitive help about this toolbar element.
198 @icon: a #GtkWidget that provides pictorial representation of the element's function.
199 @callback: the function to be executed when the button is pressed.
200 @user_data: any data you wish to pass to the callback.
201 @position: the number of widgets to insert this element after.
202 @Returns: the new toolbar element as a #GtkWidget.
205 <!-- ##### FUNCTION gtk_toolbar_append_widget ##### -->
213 @tooltip_private_text:
216 <!-- ##### FUNCTION gtk_toolbar_prepend_widget ##### -->
224 @tooltip_private_text:
227 <!-- ##### FUNCTION gtk_toolbar_insert_widget ##### -->
235 @tooltip_private_text:
239 <!-- ##### FUNCTION gtk_toolbar_set_orientation ##### -->
241 Sets whether a toolbar should appear horizontally or vertically.
244 @toolbar: a #GtkToolbar.
245 @orientation: a new #GtkOrientation.
248 <!-- ##### FUNCTION gtk_toolbar_set_style ##### -->
250 Alters the view of @toolbar to display either icons only, text only, or both.
253 @toolbar: a #GtkToolbar.
254 @style: the new style for @toolbar.
257 <!-- ##### FUNCTION gtk_toolbar_set_tooltips ##### -->
259 Sets if the tooltips of a toolbar should be active or not.
262 @toolbar: a #GtkToolbar.
263 @enable: set to %FALSE to disable the tooltips, or %TRUE to enable them.
266 <!-- ##### FUNCTION gtk_toolbar_insert_stock ##### -->
274 @tooltip_private_text:
281 <!-- ##### FUNCTION gtk_toolbar_set_icon_size ##### -->
290 <!-- ##### FUNCTION gtk_toolbar_get_icon_size ##### -->
299 <!-- ##### FUNCTION gtk_toolbar_get_orientation ##### -->
308 <!-- ##### FUNCTION gtk_toolbar_get_style ##### -->
317 <!-- ##### FUNCTION gtk_toolbar_get_tooltips ##### -->
326 <!-- ##### FUNCTION gtk_toolbar_remove_space ##### -->
335 <!-- ##### FUNCTION gtk_toolbar_unset_icon_size ##### -->
343 <!-- ##### FUNCTION gtk_toolbar_unset_style ##### -->
351 <!-- ##### SIGNAL GtkToolbar::orientation-changed ##### -->
353 Should be used if you wish to perform an action when the orientation of a toolbar is changed.
356 @toolbar: the object which received the signal.
357 @orientation: the new #GtkOrientation of the toolbar.
359 <!-- ##### SIGNAL GtkToolbar::style-changed ##### -->
361 Should be used if you wish to perform an action when ever the style of a toolbar is adjusted. For example, this would be a useful signal to connect to if you want to display more items on the toolbar when it is in icon-only mode; each item takes less space on the bar.
364 @toolbar: the object which received the signal.
365 @style: the new #GtkToolbarStyle of @toolbar.
367 <!-- ##### ARG GtkToolbar:orientation ##### -->
372 <!-- ##### ARG GtkToolbar:toolbar-style ##### -->