Synopsis#include <gtk/gtk.h> GtkToolItem; GtkToolItem* gtk_tool_item_new (void); void gtk_tool_item_set_homogeneous (GtkToolItem *tool_item, gboolean homogeneous); gboolean gtk_tool_item_get_homogeneous (GtkToolItem *tool_item); void gtk_tool_item_set_expand (GtkToolItem *tool_item, gboolean expand); gboolean gtk_tool_item_get_expand (GtkToolItem *tool_item); void gtk_tool_item_set_tooltip (GtkToolItem *tool_item, GtkTooltips *tooltips, const gchar *tip_text, const gchar *tip_private); void gtk_tool_item_set_tooltip_text (GtkToolItem *tool_item, const gchar *text); void gtk_tool_item_set_tooltip_markup (GtkToolItem *tool_item, const gchar *markup); void gtk_tool_item_set_use_drag_window (GtkToolItem *tool_item, gboolean use_drag_window); gboolean gtk_tool_item_get_use_drag_window (GtkToolItem *tool_item); void gtk_tool_item_set_visible_horizontal (GtkToolItem *tool_item, gboolean visible_horizontal); gboolean gtk_tool_item_get_visible_horizontal (GtkToolItem *tool_item); void gtk_tool_item_set_visible_vertical (GtkToolItem *tool_item, gboolean visible_vertical); gboolean gtk_tool_item_get_visible_vertical (GtkToolItem *tool_item); void gtk_tool_item_set_is_important (GtkToolItem *tool_item, gboolean is_important); gboolean gtk_tool_item_get_is_important (GtkToolItem *tool_item); GtkIconSize gtk_tool_item_get_icon_size (GtkToolItem *tool_item); GtkOrientation gtk_tool_item_get_orientation (GtkToolItem *tool_item); GtkToolbarStyle gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item); GtkReliefStyle gtk_tool_item_get_relief_style (GtkToolItem *tool_item); GtkWidget* gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item); GtkWidget* gtk_tool_item_get_proxy_menu_item (GtkToolItem *tool_item, const gchar *menu_item_id); void gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item, const gchar *menu_item_id, GtkWidget *menu_item); void gtk_tool_item_rebuild_menu (GtkToolItem *tool_item); void gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item); Object HierarchyGObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkToolItem +----GtkToolButton +----GtkSeparatorToolItem Properties"is-important" gboolean : Read / Write "visible-horizontal" gboolean : Read / Write "visible-vertical" gboolean : Read / Write Description
GtkToolItems are widgets that can appear on a toolbar. To
create a toolbar item that contain something else than a button, use
For toolbar items that contain buttons, see the GtkToolButton, GtkToggleToolButton and GtkRadioToolButton classes. See the GtkToolbar class for a description of the toolbar widget, and GtkToolShell for a description of the tool shell interface.
DetailsGtkToolItemtypedef struct _GtkToolItem GtkToolItem; The GtkToolItem struct contains only private data. It should only be accessed through the functions described below.
gtk_tool_item_new ()GtkToolItem* gtk_tool_item_new (void); Creates a new GtkToolItem
Since 2.4 gtk_tool_item_set_homogeneous ()void gtk_tool_item_set_homogeneous (GtkToolItem *tool_item, gboolean homogeneous);
Sets whether
Since 2.4 gtk_tool_item_get_homogeneous ()gboolean gtk_tool_item_get_homogeneous (GtkToolItem *tool_item);
Returns whether
Since 2.4 gtk_tool_item_set_expand ()void gtk_tool_item_set_expand (GtkToolItem *tool_item, gboolean expand);
Sets whether
Since 2.4 gtk_tool_item_get_expand ()gboolean gtk_tool_item_get_expand (GtkToolItem *tool_item);
Returns whether
Since 2.4 gtk_tool_item_set_tooltip ()void gtk_tool_item_set_tooltip (GtkToolItem *tool_item, GtkTooltips *tooltips, const gchar *tip_text, const gchar *tip_private); Warning
Sets the GtkTooltips object to be used for
Since 2.4 gtk_tool_item_set_tooltip_text ()void gtk_tool_item_set_tooltip_text (GtkToolItem *tool_item, const gchar *text);
Sets the text to be displayed as tooltip on the item.
See
Since 2.12 gtk_tool_item_set_tooltip_markup ()void gtk_tool_item_set_tooltip_markup (GtkToolItem *tool_item, const gchar *markup);
Sets the markup text to be displayed as tooltip on the item.
See
Since 2.12 gtk_tool_item_set_use_drag_window ()void gtk_tool_item_set_use_drag_window (GtkToolItem *tool_item, gboolean use_drag_window);
Sets whether
Since 2.4 gtk_tool_item_get_use_drag_window ()gboolean gtk_tool_item_get_use_drag_window (GtkToolItem *tool_item);
Returns whether
Since 2.4 gtk_tool_item_set_visible_horizontal ()void gtk_tool_item_set_visible_horizontal (GtkToolItem *tool_item, gboolean visible_horizontal);
Sets whether
Since 2.4 gtk_tool_item_get_visible_horizontal ()gboolean gtk_tool_item_get_visible_horizontal (GtkToolItem *tool_item);
Returns whether the
Since 2.4 gtk_tool_item_set_visible_vertical ()void gtk_tool_item_set_visible_vertical (GtkToolItem *tool_item, gboolean visible_vertical);
Sets whether
Since 2.4 gtk_tool_item_get_visible_vertical ()gboolean gtk_tool_item_get_visible_vertical (GtkToolItem *tool_item);
Returns whether
Since 2.4 gtk_tool_item_set_is_important ()void gtk_tool_item_set_is_important (GtkToolItem *tool_item, gboolean is_important);
Sets whether
Since 2.4 gtk_tool_item_get_is_important ()gboolean gtk_tool_item_get_is_important (GtkToolItem *tool_item);
Returns whether
Since 2.4 gtk_tool_item_get_icon_size ()GtkIconSize gtk_tool_item_get_icon_size (GtkToolItem *tool_item);
Returns the icon size used for
Since 2.4 gtk_tool_item_get_orientation ()GtkOrientation gtk_tool_item_get_orientation (GtkToolItem *tool_item);
Returns the orientation used for
Since 2.4 gtk_tool_item_get_toolbar_style ()GtkToolbarStyle gtk_tool_item_get_toolbar_style (GtkToolItem *tool_item);
Returns the toolbar style used for Possibilities are:
Since 2.4 gtk_tool_item_get_relief_style ()GtkReliefStyle gtk_tool_item_get_relief_style (GtkToolItem *tool_item);
Returns the relief style of
Since 2.4 gtk_tool_item_retrieve_proxy_menu_item ()GtkWidget* gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
Returns the GtkMenuItem that was last set by
Since 2.4 gtk_tool_item_get_proxy_menu_item ()GtkWidget* gtk_tool_item_get_proxy_menu_item (GtkToolItem *tool_item, const gchar *menu_item_id);
If
Custom subclasses of GtkToolItem should use this function to update
their menu item when the GtkToolItem changes. That the
Since 2.4 gtk_tool_item_set_proxy_menu_item ()void gtk_tool_item_set_proxy_menu_item (GtkToolItem *tool_item, const gchar *menu_item_id, GtkWidget *menu_item);
Sets the GtkMenuItem used in the toolbar overflow menu. The
Since 2.4 gtk_tool_item_rebuild_menu ()void gtk_tool_item_rebuild_menu (GtkToolItem *tool_item);
Calling this function signals to the toolbar that the
overflow menu item for The function must be called when the tool item changes what it will do in response to the "create_menu_proxy" signal.
Since 2.6 gtk_tool_item_toolbar_reconfigured ()void gtk_tool_item_toolbar_reconfigured (GtkToolItem *tool_item);
Emits the signal "toolbar_reconfigured" on
Since 2.14 Property DetailsThe
|
|
the object the signal was emitted on |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the signal was handled, FALSE if not
|
"set-tooltip"
signalgboolean user_function (GtkToolItem *tool_item, GtkTooltips *tooltips, gchar *tip_text, gchar *tip_private, gpointer user_data) : Run Last
This signal is emitted when the toolitem's tooltip changes.
Application developers can use gtk_tool_item_set_tooltip()
to
set the item's tooltip.
|
the object the signal was emitted on |
|
the GtkTooltips |
|
the tooltip text |
|
the tooltip private text |
|
user data set when the signal handler was connected. |
Returns : |
TRUE if the signal was handled, FALSE if not
|
"toolbar-reconfigured"
signalvoid user_function (GtkToolItem *tool_item, gpointer user_data) : Run Last
This signal is emitted when some property of the toolbar that the item is a child of changes. For custom subclasses of GtkToolItem, the default handler of this signal use the functions
to find out what the toolbar should look like and change themselves accordingly.
|
the object the signal was emitted on |
|
user data set when the signal handler was connected. |
The toolbar widget
A subclass of GtkToolItem that displays buttons on the toolbar
A subclass of GtkToolItem that separates groups of items on a toolbar