]> Pileus Git - ~andy/gtk/blobdiff - docs/reference/gtk/tmpl/gtktoolbar.sgml
Make 3.0 parallel-installable to 2.x
[~andy/gtk] / docs / reference / gtk / tmpl / gtktoolbar.sgml
index 97c9f6329dc7996eaa103e9de312cf9e1548e0fb..6539b7497fc72f7a5c75cbfe95bce636794d48e8 100644 (file)
 GtkToolbar
 
 <!-- ##### SECTION Short_Description ##### -->
-create bars of buttons and other widgets.
+Create bars of buttons and other widgets
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
 A toolbar is created with a call to gtk_toolbar_new().
 </para>
 <para>
-Buttons with text and/or images are added with gtk_toolbar_append_item(), gtk_toolbar_prepend_item(), and gtk_toolbar_insert_item().
+A toolbar can contain instances of a subclass of #GtkToolItem. To add
+a #GtkToolItem to the a toolbar, use gtk_toolbar_insert(). To remove
+an item from the toolbar use gtk_container_remove(). To add a button
+to the toolbar, add an instance of #GtkToolButton.
 </para>
 <para>
-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().
+Toolbar items can be visually grouped by adding instances of
+#GtkSeparatorToolItem to the toolbar. If a #GtkSeparatorToolItem has
+the "expand" property set to #TRUE and the "draw" property set to
+#FALSE the effect is to force all following items to the end of the
+toolbar.
 </para>
 <para>
-Widgets can be visibily grouped by adding gaps between widgets using gtk_toolbar_append_space(), gtk_toolbar_prepend_space, and gtk_toolbar_insert_space().
+Creating a context menu for the toolbar can be done by connecting to
+the #GtkToolbar::popup-context-menu signal.
 </para>
 
 <!-- ##### SECTION See_Also ##### -->
 <para>
 <variablelist>
+
 <varlistentry>
-<term>#GtkToolTips</term>
-<listitem><para>Change the properties of a #GtkToolbar's #GtkTooltips.</para></listitem>
-</varlistentry>
-<varlistentry>
-<term>#GtkTipsQuery</term>
-<listitem><para>Make use of the private tips of toolbar elements.</para></listitem>
+<term>#GtkToolItem</term>
+<listitem><para>Base class of widgets that can be added to a toolbar.</para></listitem>
 </varlistentry>
+
 </variablelist>
 </para>
 
+<!-- ##### SECTION Stability_Level ##### -->
+
+
+<!-- ##### SECTION Image ##### -->
+
+
 <!-- ##### STRUCT GtkToolbar ##### -->
 <para>
-<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.
+The #GtkToolbar struct only contains private data and should only be
+accessed through the function described below.
 </para>
+
+
+<!-- ##### SIGNAL GtkToolbar::focus-home-or-end ##### -->
 <para>
-<structfield>orientation</structfield>
+
 </para>
 
+@toolbar: the object which received the signal.
+@arg1: 
+@Returns: 
 
-<!-- ##### ENUM GtkToolbarChildType ##### -->
+<!-- ##### SIGNAL GtkToolbar::orientation-changed ##### -->
 <para>
-is used to set the type of new elements that are added to a #GtkToolbar.
+
 </para>
+
+@toolbar: the object which received the signal.
+@orientation: the new #GtkOrientation of the toolbar.
+
+<!-- ##### SIGNAL GtkToolbar::popup-context-menu ##### -->
 <para>
-SPACE is just a space in the style of the toolbar's GtkToolbarSpaceStyle. BUTTON denotes a #GtkButton. TOGGLEBUTTON denotes a #GtkToggleButton, RADIOBUTTON denotes a #GtkRadioButton, and WIDGET denotes a standard #GtkWidget.
+
 </para>
 
-@GTK_TOOLBAR_CHILD_SPACE: 
-@GTK_TOOLBAR_CHILD_BUTTON
-@GTK_TOOLBAR_CHILD_TOGGLEBUTTON
-@GTK_TOOLBAR_CHILD_RADIOBUTTON
-@GTK_TOOLBAR_CHILD_WIDGET
+@toolbar: the object which received the signal.
+@Returns
+@Returns
+@Returns
+@Returns
 
-<!-- ##### ENUM GtkToolbarSpaceStyle ##### -->
+<!-- ##### SIGNAL GtkToolbar::style-changed ##### -->
 <para>
 
 </para>
 
-@GTK_TOOLBAR_SPACE_EMPTY
-@GTK_TOOLBAR_SPACE_LINE
+@toolbar
+@style
 
-<!-- ##### STRUCT GtkToolbarChild ##### -->
+<!-- ##### ARG GtkToolbar:icon-size ##### -->
 <para>
 
 </para>
 
-@type: 
-@widget: 
-@icon: 
-@label: 
+<!-- ##### ARG GtkToolbar:icon-size-set ##### -->
+<para>
 
-<!-- ##### FUNCTION gtk_toolbar_new ##### -->
+</para>
+
+<!-- ##### ARG GtkToolbar:show-arrow ##### -->
 <para>
-creates a new toolbar. 
+
 </para>
 
-@Returns: the newly created toolbar.
-<!-- # Unused Parameters # -->
-@orientation: a #GtkOrientation. It determines whether the toolbar appears horizontally or vertically.
-@style: a #GtkToolbarStyle. It determines if the toolbar will contain buttons with just labels, just images, or both.
+<!-- ##### ARG GtkToolbar:toolbar-style ##### -->
+<para>
 
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_append_item ##### -->
+<!-- ##### ARG GtkToolbar:expand ##### -->
 <para>
-adds a new button to the beginning (left or top edges) of the given toolbar.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@text: give your toolbar button a label.
-@tooltip_text: a string that appears when the user holds the mouse over this item.
-@tooltip_private_text: use with #GtkTipsQuery.
-@icon: a #GtkWidget that should be used as the button's icon.
-@callback: the function to be executed when the button is pressed.
-@user_data: a pointer to any data you wish to be passed to the callback.
-@Returns: the new toolbar item as a #GtkWidget.
+<!-- ##### ARG GtkToolbar:homogeneous ##### -->
+<para>
 
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_prepend_item ##### -->
+<!-- ##### ARG GtkToolbar:button-relief ##### -->
 <para>
-adds a new button to the beginning of the given toolbar.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@text: give your toolbar button a label.
-@tooltip_text: a string that appears when the user holds the mouse over this item.
-@tooltip_private_text: use with #GtkTipsQuery.
-@icon: a #GtkWidget that should be used as the button's icon.
-@callback: the function to be executed when the button is pressed.
-@user_data: a pointer to any data you wish to be passed to the callback.
-@Returns: the new toolbar item as a #GtkWidget.
+<!-- ##### ARG GtkToolbar:internal-padding ##### -->
+<para>
 
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_insert_item ##### -->
+<!-- ##### ARG GtkToolbar:max-child-expand ##### -->
 <para>
-inserts a new item into the toolbar. You must specify the position in the toolbar where it will be inserted.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@text: give your toolbar button a label.
-@tooltip_text: a string that appears when the user holds the mouse over this item.
-@tooltip_private_text: use with #GtkTipsQuery.
-@icon: a #GtkWidget that should be used as the button's icon.
-@callback: the function to be executed when the button is pressed.
-@user_data: a pointer to any data you wish to be passed to the callback.
-@position: the number of widgets to insert this item after.
-@Returns: the new toolbar item as a #GtkWidget.
+<!-- ##### ARG GtkToolbar:shadow-type ##### -->
+<para>
 
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_append_space ##### -->
+<!-- ##### ARG GtkToolbar:space-size ##### -->
 <para>
-adds a new space to the end of the toolbar.
+
 </para>
 
-@toolbar: a #GtkToolbar.
+<!-- ##### ARG GtkToolbar:space-style ##### -->
+<para>
 
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_prepend_space ##### -->
+<!-- ##### ENUM GtkToolbarChildType ##### -->
 <para>
-adds a new space to the beginning of the toolbar.
+#GtkToolbarChildType is used to set the type of new elements that are added 
+to a #GtkToolbar.
 </para>
 
-@toolbar: a #GtkToolbar.
+@GTK_TOOLBAR_CHILD_SPACE: a space in the style of the toolbar's #GtkToolbarSpaceStyle.
+@GTK_TOOLBAR_CHILD_BUTTON: a #GtkButton.
+@GTK_TOOLBAR_CHILD_TOGGLEBUTTON: a #GtkToggleButton.
+@GTK_TOOLBAR_CHILD_RADIOBUTTON: a #GtkRadioButton.
+@GTK_TOOLBAR_CHILD_WIDGET: a standard #GtkWidget.
 
+<!-- ##### ENUM GtkToolbarSpaceStyle ##### -->
+<para>
+
+</para>
 
-<!-- ##### FUNCTION gtk_toolbar_insert_space ##### -->
+@GTK_TOOLBAR_SPACE_EMPTY: 
+@GTK_TOOLBAR_SPACE_LINE: 
+
+<!-- ##### STRUCT GtkToolbarChild ##### -->
 <para>
-inserts a new space in the toolbar at the specified position.
+
+</para>
+
+@type: 
+@widget: 
+@icon: 
+@label: 
+
+<!-- ##### FUNCTION gtk_toolbar_new ##### -->
+<para>
+
 </para>
 
-@toolbar: a #GtkToolbar
-@position: the number of widgets after which a space should be inserted.
+@void: 
+@Returns: the newly-created toolbar.
 
 
-<!-- ##### FUNCTION gtk_toolbar_append_element ##### -->
+<!-- ##### FUNCTION gtk_toolbar_insert ##### -->
 <para>
-adds a new element to the end of a toolbar.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@type: a value of type #GtkToolbarChildType that determines what @widget will be.
-@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
-@text: the element's label.
-@tooltip_text: the element's tooltip.
-@tooltip_private_text: used for context-sensitive help about this toolbar element.
-@icon: a #GtkWidget that provides pictorial representation of the element's function.
-@callback: the function to be executed when the button is pressed.
-@user_data: any data you wish to pass to the callback.
-@Returns: the new toolbar element as a #GtkWidget.
+@toolbar: 
+@item: 
+@pos: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_prepend_element ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_item_index ##### -->
 <para>
-adds a new element to the beginning of a toolbar.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@type: a value of type #GtkToolbarChildType that determines what @widget will be.
-@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
-@text: the element's label.
-@tooltip_text: the element's tooltip.
-@tooltip_private_text: used for context-sensitive help about this toolbar element.
-@icon: a #GtkWidget that provides pictorial representation of the element's function.
-@callback: the function to be executed when the button is pressed.
-@user_data: any data you wish to pass to the callback.
-@Returns: the new toolbar element as a #GtkWidget.
+@toolbar: 
+@item: 
+@Returns: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_insert_element ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_n_items ##### -->
 <para>
 
 </para>
 
-@toolbar: a #GtkToolbar.
-@type: a value of type #GtkToolbarChildType that determines what @widget will be.
-@widget: a #GtkWidget to add to the toolbar. (FIXME: double check this).
-@text: the element's label.
-@tooltip_text: the element's tooltip.
-@tooltip_private_text: used for context-sensitive help about this toolbar element.
-@icon: a #GtkWidget that provides pictorial representation of the element's function.
-@callback: the function to be executed when the button is pressed.
-@user_data: any data you wish to pass to the callback.
-@position: the number of widgets to insert this element after.
-@Returns: the new toolbar element as a #GtkWidget.
+@toolbar: 
+@Returns: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_append_widget ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_nth_item ##### -->
 <para>
 
 </para>
 
 @toolbar: 
-@widget: 
-@tooltip_text: 
-@tooltip_private_text: 
+@n: 
+@Returns: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_prepend_widget ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_drop_index ##### -->
 <para>
 
 </para>
 
 @toolbar: 
-@widget
-@tooltip_text
-@tooltip_private_text
+@x
+@y
+@Returns
 
 
-<!-- ##### FUNCTION gtk_toolbar_insert_widget ##### -->
+<!-- ##### FUNCTION gtk_toolbar_set_drop_highlight_item ##### -->
 <para>
 
 </para>
 
 @toolbar: 
-@widget: 
-@tooltip_text: 
-@tooltip_private_text: 
-@position: 
+@tool_item: 
+@index_: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_set_orientation ##### -->
+<!-- ##### FUNCTION gtk_toolbar_set_show_arrow ##### -->
 <para>
-sets whether a toolbar should appear horizontally or vertically.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@orientation: a new #GtkOrientation.
+@toolbar: 
+@show_arrow: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_set_style ##### -->
+<!-- ##### FUNCTION gtk_toolbar_unset_icon_size ##### -->
 <para>
-alters the view of @toolbar to display either icons only, text only, or both.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@style: the new style for @toolbar.
+@toolbar: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_set_tooltips ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_show_arrow ##### -->
 <para>
-sets if the tooltips of a toolbar should be active or not.
+
 </para>
 
-@toolbar: a #GtkToolbar.
-@enable: set to 0 to disable the tooltips, or 1 to enable them.
+@toolbar: 
+@Returns: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_insert_stock ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_style ##### -->
 <para>
 
 </para>
 
 @toolbar: 
-@stock_id: 
-@tooltip_text: 
-@tooltip_private_text: 
-@callback: 
-@user_data: 
-@position: 
 @Returns: 
 
 
-<!-- ##### FUNCTION gtk_toolbar_set_icon_size ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_icon_size ##### -->
 <para>
 
 </para>
 
 @toolbar: 
-@icon_size: 
-<!-- # Unused Parameters # -->
-@stock_size: 
+@Returns: 
 
 
-<!-- ##### SIGNAL GtkToolbar::orientation-changed ##### -->
+<!-- ##### FUNCTION gtk_toolbar_get_relief_style ##### -->
 <para>
-should be used if you wish to perform an action when the orientation of a toolbar is changed.
+
 </para>
 
-@toolbar: the object which received the signal.
-@orientation: the new #GtkOrientation of the toolbar.
+@toolbar: 
+@Returns: 
 
-<!-- ##### SIGNAL GtkToolbar::style-changed ##### -->
+
+<!-- ##### FUNCTION gtk_toolbar_set_style ##### -->
 <para>
-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.
+
 </para>
 
-@toolbar: the object which received the signal.
-@style: the new #GtkToolbarStyle of @toolbar.
+@toolbar: 
+@style: 
+
 
-<!-- ##### ARG GtkToolbar:orientation ##### -->
+<!-- ##### FUNCTION gtk_toolbar_set_icon_size ##### -->
 <para>
 
 </para>
 
-<!-- ##### ARG GtkToolbar:toolbar-style ##### -->
+@toolbar: 
+@icon_size: 
+
+
+<!-- ##### FUNCTION gtk_toolbar_unset_style ##### -->
 <para>
 
 </para>
 
+@toolbar: 
+
+