W Wrapl, The Programming Language

Libraries:Gtk:Gtk:ToolItem

Types

T

Inherits from:

Ts 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.Gtk.Container.Add to add a child widget to the tool item.

For toolbar items that contain buttons, see the Gtk.Gtk.ToolButton.T, Gtk.Gtk.ToggleToolButton.T and Gtk.Gtk.RadioToolButton.T classes.

See the Gtk.Gtk.Toolbar.T class for a description of the toolbar widget, and Gtk.Gtk.ToolShell.T for a description of the tool shell interface.



Constants

Nil : T

Functions

GetType() : Gtk.GObject.Type.T



New() : Gtk.Gtk.ToolItem.T

Creates a new T

Returns the new T


Methods

:GetEllipsizeMode(self @ T) : Gtk.Pango.EllipsizeMode.T

Returns the ellipsize mode used for tool_item. Custom subclasses of T should call this function to find out how text should be ellipsized.

tool_item a T
Returns a PangoEllipsizeMode indicating how text in tool_item should be ellipsized.


:GetExpand(self @ T) : Std.Symbol.T

Returns whether tool_item is allocated extra space. See SetExpand.

tool_item a T
Returns TRUE if tool_item is allocated extra space.


:GetHomogeneous(self @ T) : Std.Symbol.T

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

tool_item a T
Returns TRUE if the item is the same size as other homogeneous items.


:GetIconSize(self @ T) : Gtk.Gtk.IconSize.T

Returns the icon size used for tool_item. Custom subclasses of T should call this function to find out what size icons they should use.

tool_item a T
Returns a Gtk.Gtk.IconSize.T indicating the icon size used for tool_item. [type int]


:GetIsImportant(self @ T) : Std.Symbol.T

Returns whether tool_item is considered important. See SetIsImportant

tool_item a T
Returns TRUE if tool_item is considered important.


:GetOrientation(self @ T) : Gtk.Gtk.Orientation.T

Returns the orientation used for tool_item. Custom subclasses of T should call this function to find out what size icons they should use.

tool_item a T
Returns a Gtk.Gtk.Orientation.T indicating the orientation used for tool_item


:GetProxyMenuItem(self @ T, menu_item_id @ Std.String.T) : Gtk.Gtk.Widget.T

If menu_item_id matches the string passed to SetProxyMenuItem return the corresponding Gtk.Gtk.MenuItem.T.

Custom subclasses of T should use this function to update their menu item when the T changes. That the menu_item_ids must match ensures that a T will not inadvertently change a menu item that they did not create.

tool_item a T
menu_item_id a string used to identify the menu item
Returns The Gtk.Gtk.MenuItem.T passed to SetProxyMenuItem, if the menu_item_ids match. [transfer none]


:GetReliefStyle(self @ T) : Gtk.Gtk.ReliefStyle.T

Returns the relief style of tool_item. See gtk_button_set_relief_style(). Custom subclasses of T should call this function in the handler of the "toolbar_reconfigured" signal to find out the relief style of buttons.

tool_item a T
Returns a Gtk.Gtk.ReliefStyle.T indicating the relief style used for tool_item.


:GetTextAlignment(self @ T) : Std.Real.T

Returns the text alignment used for tool_item. Custom subclasses of T should call this function to find out how text should be aligned.

tool_item a T:
Returns a gfloat indicating the horizontal text alignment used for tool_item


:GetTextOrientation(self @ T) : Gtk.Gtk.Orientation.T

Returns the text orientation used for tool_item. Custom subclasses of T should call this function to find out how text should be orientated.

tool_item a T
Returns a Gtk.Gtk.Orientation.T indicating the text orientation used for tool_item


:GetTextSizeGroup(self @ T) : Gtk.Gtk.SizeGroup.T

Returns the size group used for labels in tool_item. Custom subclasses of T should call this function and use the size group for labels.

tool_item a T
Returns a Gtk.Gtk.SizeGroup.T. [transfer none]


:GetToolbarStyle(self @ T) : Gtk.Gtk.ToolbarStyle.T

Returns the toolbar style used for tool_item. Custom subclasses of T 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
  • GTK_TOOLBAR_ICONS, meaning the toolbar shows only icons
  • GTK_TOOLBAR_TEXT, meaning the tool item should only show text
  • GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show both an icon and a label, arranged horizontally (however, note the "has_text_horizontally" that makes tool buttons not show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.


:GetUseDragWindow(self @ T) : Std.Symbol.T

Returns whether tool_item has a drag window. See SetUseDragWindow.

tool_item a T
Returns TRUE if tool_item uses a drag window.


:GetVisibleHorizontal(self @ T) : Std.Symbol.T

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

tool_item a T
Returns TRUE if tool_item is visible on toolbars that are docked horizontally.


:GetVisibleVertical(self @ T) : Std.Symbol.T

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

tool_item a T
Returns Whether tool_item is visible when the toolbar is docked vertically


:RebuildMenu(self @ T) : Std.Object.T

Calling this function signals to the toolbar that the overflow menu item for tool_item has changed. 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.

tool_item a T


:RetrieveProxyMenuItem(self @ T) : Gtk.Gtk.Widget.T

Returns the Gtk.Gtk.MenuItem.T that was last set by SetProxyMenuItem, ie. the Gtk.Gtk.MenuItem.T that is going to appear in the overflow menu.

tool_item a T
Returns The Gtk.Gtk.MenuItem.T that is going to appear in the overflow menu for tool_item. [transfer none]


:SetExpand(self @ T, expand @ Std.Symbol.T) : Std.Object.T

Sets whether tool_item is allocated extra space when there is more room on the toolbar then needed for the items. The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller.

tool_item a T
expand Whether tool_item is allocated extra space


:SetHomogeneous(self @ T, homogeneous @ Std.Symbol.T) : Std.Object.T

Sets whether tool_item is to be allocated the same size as other homogeneous items. The effect is that all homogeneous items will have the same width as the widest of the items.

tool_item a T
homogeneous whether tool_item is the same size as other homogeneous items


:SetIsImportant(self @ T, is_important @ Std.Symbol.T) : Std.Object.T

Sets whether tool_item should be considered important. The Gtk.Gtk.ToolButton.T class uses this property to determine whether to show or hide its label when the toolbar style is Gtk.Gtk.ToolbarStyle.BothHoriz. The result is that only tool buttons with the "is_important" property set have labels, an effect known as "priority text"

tool_item a T
is_important whether the tool item should be considered important


:SetProxyMenuItem(self @ T, menu_item_id @ Std.String.T, menu_item @ Gtk.Gtk.Widget.T) : Std.Object.T

Sets the Gtk.Gtk.MenuItem.T used in the toolbar overflow menu. The menu_item_id is used to identify the caller of this function and should also be used with GetProxyMenuItem.

tool_item a T
menu_item_id a string used to identify menu_item
menu_item a Gtk.Gtk.MenuItem.T to be used in the overflow menu


:SetTooltip(self @ T, tooltips @ Gtk.Gtk.Tooltips.T, tip_text @ Std.String.T, tip_private @ Std.String.T) : Std.Object.T

Warning

SetTooltip has been deprecated since version 2.12 and should not be used in newly-written code. Use SetTooltipText instead.



:SetTooltipMarkup(self @ T, markup @ Std.String.T) : Std.Object.T

Sets the markup text to be displayed as tooltip on the item. See Gtk.Gtk.Widget.SetTooltipMarkup.

tool_item a T
markup markup text to be used as tooltip for tool_item


:SetTooltipText(self @ T, text @ Std.String.T) : Std.Object.T

Sets the text to be displayed as tooltip on the item. See Gtk.Gtk.Widget.SetTooltipText.

tool_item a T
text text to be used as tooltip for tool_item


:SetUseDragWindow(self @ T, use_drag_window @ Std.Symbol.T) : Std.Object.T

Sets whether tool_item has a drag window. When TRUE the toolitem can be used as a drag source through Gtk.Gtk.Drag.SourceSet. 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.

tool_item a T
use_drag_window Whether tool_item has a drag window.


:SetVisibleHorizontal(self @ T, visible_horizontal @ Std.Symbol.T) : Std.Object.T

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

tool_item a T
visible_horizontal Whether tool_item is visible when in horizontal mode


:SetVisibleVertical(self @ T, visible_vertical @ Std.Symbol.T) : Std.Object.T

Sets whether tool_item is visible when the toolbar is docked vertically. 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.

tool_item a T
visible_vertical whether tool_item is visible when the toolbar is in vertical mode


:ToolbarReconfigured(self @ T) : Std.Object.T

Emits the signal "toolbar_reconfigured" on tool_item. Gtk.Gtk.Toolbar.T and other Gtk.Gtk.ToolShell.T implementations use this function to notify children, when some aspect of their configuration changes.

tool_item a T