11.124Class GtkToolItem

The base class of widgets that can be added to GtkToolShell

Class GtkToolItem

GtkToolItems are widgets that can appear on a toolbar. To create a toolbar item that contain something else than a button, use gtk_tool_item_new(). Use gtk_container_add() to add a child widget to the tool item.

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.

Methods
get_ellipsize_modeReturns the ellipsize mode used for tool_item.
get_expandReturns whether tool_item is allocated extra space.
get_homogeneousReturns whether tool_item is the same size as other homogeneous items.
get_icon_sizeReturns the icon size used for tool_item.
get_is_importantReturns whether tool_item is considered important.
get_orientationReturns the orientation used for tool_item.
get_relief_styleReturns the relief style of tool_item.
get_text_alignmentReturns the text alignment used for tool_item.
get_text_orientationReturns the text orientation used for tool_item.
get_toolbar_styleReturns the toolbar style used for tool_item.
get_use_drag_windowReturns whether tool_item has a drag window.
get_visible_horizontalReturns whether the tool_item is visible on toolbars that are docked horizontally.
get_visible_verticalReturns whether tool_item is visible when the toolbar is docked vertically.
rebuild_menuCalling this function signals to the toolbar that the overflow menu item for tool_item has changed.
retrieve_proxy_menu_itemReturns the GtkMenuItem that was last set by gtk_tool_item_set_proxy_menu_item(), ie. the GtkMenuItem that is going to appear in the overflow menu.
set_expandSets whether tool_item is allocated extra space when there is more room on the toolbar then needed for the items.
set_homogeneousSets whether tool_item is to be allocated the same size as other homogeneous items.
set_is_importantSets whether tool_item should be considered important.
set_proxy_menu_itemSets the GtkMenuItem used in the toolbar overflow menu.
set_tooltip_markupSets the markup text to be displayed as tooltip on the item.
set_tooltip_textSets the text to be displayed as tooltip on the item.
set_use_drag_windowSets whether tool_item has a drag window.
set_visible_horizontalSets whether tool_item is visible when the toolbar is docked horizontally.
set_visible_verticalSets whether tool_item is visible when the toolbar is docked vertically.
toolbar_reconfiguredEmits the signal "toolbar_reconfigured" on tool_item.

Methods

get_ellipsize_mode

Returns the ellipsize mode used for tool_item.

GtkToolItem.get_ellipsize_mode()
Returna PangoEllipsizeMode indicating how text in tool_item should be ellipsized.

Custom subclasses of GtkToolItem should call this function to find out how text should be ellipsized.

get_expand

Returns whether tool_item is allocated extra space.

GtkToolItem.get_expand()
ReturnTRUE if tool_item is allocated extra space.

get_homogeneous

Returns whether tool_item is the same size as other homogeneous items.

GtkToolItem.get_homogeneous()
ReturnTRUE if the item is the same size as other homogeneous items.

get_icon_size

Returns the icon size used for tool_item.

GtkToolItem.get_icon_size()
Returna GtkIconSize indicating the icon size used for tool_item.

Custom subclasses of GtkToolItem should call this function to find out what size icons they should use.

get_is_important

Returns whether tool_item is considered important.

GtkToolItem.get_is_important()
ReturnTRUE if tool_item is considered important.

get_orientation

Returns the orientation used for tool_item.

GtkToolItem.get_orientation()
Returna GtkOrientation indicating the orientation used for tool_item

Custom subclasses of GtkToolItem should call this function to find out what size icons they should use.

get_relief_style

Returns the relief style of tool_item.

GtkToolItem.get_relief_style()
Returna GtkReliefStyle indicating the relief style used for tool_item.

Custom subclasses of GtkToolItem should call this function in the handler of the "toolbar_reconfigured" signal to find out the relief style of buttons.

get_text_alignment

Returns the text alignment used for tool_item.

GtkToolItem.get_text_alignment()
Returna numeric value indicating the horizontal text alignment used for tool_item

Custom subclasses of GtkToolItem should call this function to find out how text should be aligned.

get_text_orientation

Returns the text orientation used for tool_item.

GtkToolItem.get_text_orientation()
Returna GtkOrientation indicating the text orientation used for tool_item

Custom subclasses of GtkToolItem should call this function to find out how text should be orientated.

get_toolbar_style

Returns the toolbar style used for tool_item.

GtkToolItem.get_toolbar_style()
ReturnA GtkToolbarStyle indicating the toolbar style used for tool_item.

Custom subclasses of GtkToolItem should call this function in the handler of the GtkToolItem::toolbar_reconfigured signal to find out in what style the toolbar is displayed and change themselves accordingly

Possibilities are:

- GTK_TOOLBAR_BOTH, meaning the tool item should show both an icon and a label, stacked vertically

get_use_drag_window

Returns whether tool_item has a drag window.

GtkToolItem.get_use_drag_window()
ReturnTRUE if tool_item uses a drag window.

get_visible_horizontal

Returns whether the tool_item is visible on toolbars that are docked horizontally.

GtkToolItem.get_visible_horizontal()
ReturnTRUE if tool_item is visible on toolbars that are docked horizontally.

get_visible_vertical

Returns whether tool_item is visible when the toolbar is docked vertically.

GtkToolItem.get_visible_vertical()
ReturnWhether tool_item is visible when the toolbar is docked vertically

rebuild_menu

Calling this function signals to the toolbar that the overflow menu item for tool_item has changed.

GtkToolItem.rebuild_menu()

If the overflow menu is visible when this function it called, the menu will be rebuilt.

The function must be called when the tool item changes what it will do in response to the "create-menu-proxy" signal.

retrieve_proxy_menu_item

Returns the GtkMenuItem that was last set by gtk_tool_item_set_proxy_menu_item(), ie. the GtkMenuItem that is going to appear in the overflow menu.

GtkToolItem.retrieve_proxy_menu_item()
ReturnThe GtkMenuItem that is going to appear in the overflow menu for tool_item.

set_expand

Sets whether tool_item is allocated extra space when there is more room on the toolbar then needed for the items.

GtkToolItem.set_expand( expand )
expand Whether tool_item is allocated extra space

The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller.

set_homogeneous

Sets whether tool_item is to be allocated the same size as other homogeneous items.

GtkToolItem.set_homogeneous()

The effect is that all homogeneous items will have the same width as the widest of the items.

set_is_important

Sets whether tool_item should be considered important.

GtkToolItem.set_is_important( is_important )
is_important whether the tool item should be considered important

The GtkToolButton class uses this property to determine whether to show or hide its label when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ. The result is that only tool buttons with the "is_important" property set have labels, an effect known as "priority text".

set_proxy_menu_item

Sets the GtkMenuItem used in the toolbar overflow menu.

GtkToolItem.set_proxy_menu_item( menu_item_id, menu_item )
menu_item_id a string used to identify menu_item
menu_item a GtkMenuItem to be used in the overflow menu

The menu_item_id is used to identify the caller of this function and should also be used with gtk_tool_item_get_proxy_menu_item().

set_tooltip_markup

Sets the markup text to be displayed as tooltip on the item.

GtkToolItem.set_tooltip_markup( markup )
markup markup text to be used as tooltip for tool_item

set_tooltip_text

Sets the text to be displayed as tooltip on the item.

GtkToolItem.set_tooltip_text( text )
text text to be used as tooltip for tool_item

set_use_drag_window

Sets whether tool_item has a drag window.

GtkToolItem.set_use_drag_window( use_drag_window )
use_drag_window Whether tool_item has a drag window.

When TRUE the toolitem can be used as a drag source through gtk_drag_source_set(). When tool_item has a drag window it will intercept all events, even those that would otherwise be sent to a child of tool_item.

set_visible_horizontal

Sets whether tool_item is visible when the toolbar is docked horizontally.

GtkToolItem.set_visible_horizontal( visible_horizontal )
visible_horizontal Whether tool_item is visible when in horizontal mode

set_visible_vertical

Sets whether tool_item is visible when the toolbar is docked vertically.

GtkToolItem.set_visible_vertical( visible_vertical )
visible_vertical whether tool_item is visible when the toolbar is in vertical mode

Some tool items, such as text entries, are too wide to be useful on a vertically docked toolbar. If visible_vertical is FALSE tool_item will not appear on toolbars that are docked vertically.

toolbar_reconfigured

Emits the signal "toolbar_reconfigured" on tool_item.

GtkToolItem.toolbar_reconfigured()

GtkToolbar and other GtkToolShell implementations use this function to notify children, when some aspect of their configuration changes.

Made with http://www.falconpl.org