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 If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
159 If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
160 the radio group for the new element. In all other cases, @widget must
164 @toolbar: a #GtkToolbar.
165 @type: a value of type #GtkToolbarChildType that determines what @widget will be.
166 @widget: a #GtkWidget, or %NULL.
167 @text: the element's label.
168 @tooltip_text: the element's tooltip.
169 @tooltip_private_text: used for context-sensitive help about this toolbar element.
170 @icon: a #GtkWidget that provides pictorial representation of the element's function.
171 @callback: the function to be executed when the button is pressed.
172 @user_data: any data you wish to pass to the callback.
173 @Returns: the new toolbar element as a #GtkWidget.
176 <!-- ##### FUNCTION gtk_toolbar_prepend_element ##### -->
178 Adds a new element to the beginning of a toolbar.
181 If @type == %GTK_TOOLBAR_CHILD_WIDGET, @widget is used as the new element.
182 If @type == %GTK_TOOLBAR_CHILD_RADIOBUTTON, @widget is used to determine
183 the radio group for the new element. In all other cases, @widget must
187 @toolbar: a #GtkToolbar.
188 @type: a value of type #GtkToolbarChildType that determines what @widget will be.
189 @widget: a #GtkWidget, or %NULL
190 @text: the element's label.
191 @tooltip_text: the element's tooltip.
192 @tooltip_private_text: used for context-sensitive help about this toolbar element.
193 @icon: a #GtkWidget that provides pictorial representation of the element's function.
194 @callback: the function to be executed when the button is pressed.
195 @user_data: any data you wish to pass to the callback.
196 @Returns: the new toolbar element as a #GtkWidget.
199 <!-- ##### FUNCTION gtk_toolbar_insert_element ##### -->
209 @tooltip_private_text:
217 <!-- ##### FUNCTION gtk_toolbar_append_widget ##### -->
225 @tooltip_private_text:
228 <!-- ##### FUNCTION gtk_toolbar_prepend_widget ##### -->
236 @tooltip_private_text:
239 <!-- ##### FUNCTION gtk_toolbar_insert_widget ##### -->
247 @tooltip_private_text:
251 <!-- ##### FUNCTION gtk_toolbar_set_orientation ##### -->
253 Sets whether a toolbar should appear horizontally or vertically.
256 @toolbar: a #GtkToolbar.
257 @orientation: a new #GtkOrientation.
260 <!-- ##### FUNCTION gtk_toolbar_set_style ##### -->
262 Alters the view of @toolbar to display either icons only, text only, or both.
265 @toolbar: a #GtkToolbar.
266 @style: the new style for @toolbar.
269 <!-- ##### FUNCTION gtk_toolbar_set_tooltips ##### -->
271 Sets if the tooltips of a toolbar should be active or not.
274 @toolbar: a #GtkToolbar.
275 @enable: set to %FALSE to disable the tooltips, or %TRUE to enable them.
278 <!-- ##### FUNCTION gtk_toolbar_insert_stock ##### -->
286 @tooltip_private_text:
293 <!-- ##### FUNCTION gtk_toolbar_set_icon_size ##### -->
302 <!-- ##### FUNCTION gtk_toolbar_get_icon_size ##### -->
311 <!-- ##### FUNCTION gtk_toolbar_get_orientation ##### -->
320 <!-- ##### FUNCTION gtk_toolbar_get_style ##### -->
329 <!-- ##### FUNCTION gtk_toolbar_get_tooltips ##### -->
338 <!-- ##### FUNCTION gtk_toolbar_remove_space ##### -->
347 <!-- ##### FUNCTION gtk_toolbar_unset_icon_size ##### -->
355 <!-- ##### FUNCTION gtk_toolbar_unset_style ##### -->
363 <!-- ##### SIGNAL GtkToolbar::orientation-changed ##### -->
365 Should be used if you wish to perform an action when the orientation of a toolbar is changed.
368 @toolbar: the object which received the signal.
369 @orientation: the new #GtkOrientation of the toolbar.
371 <!-- ##### SIGNAL GtkToolbar::style-changed ##### -->
373 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.
376 @toolbar: the object which received the signal.
377 @style: the new #GtkToolbarStyle of @toolbar.
379 <!-- ##### ARG GtkToolbar:orientation ##### -->
384 <!-- ##### ARG GtkToolbar:toolbar-style ##### -->
389 <!-- ##### ARG GtkToolbar:button-relief ##### -->
394 <!-- ##### ARG GtkToolbar:internal-padding ##### -->
399 <!-- ##### ARG GtkToolbar:shadow-type ##### -->
404 <!-- ##### ARG GtkToolbar:space-size ##### -->
409 <!-- ##### ARG GtkToolbar:space-style ##### -->