gtk.tool_item

Module for [ToolItem] class

Types 3

#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.ToolItem.new_]. Use [gtk.container.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
GType _gType() @property
ToolItem self()Returns `this`, for use in `with` statements.
ToolItemGidBuilder builder()Get builder for [gtk.tool_item.ToolItem] Returns: New builder object
bool isImportant() @property
void isImportant(bool propval) @property
bool visibleHorizontal() @property
void visibleHorizontal(bool propval) @property
bool visibleVertical() @property
void visibleVertical(bool propval) @property
pango.types.EllipsizeMode getEllipsizeMode()Returns the ellipsize mode used for toolitem. Custom subclasses of #GtkToolItem should call this function to find out how text should be ellipsized. Returns: a #PangoEllipsizeMode indicating how te...
bool getExpand()Returns whether toolitem is allocated extra space. See [gtk.toolitem.ToolItem.setExpand]. Returns: true if tool_item is allocated extra space.
bool getHomogeneous()Returns whether toolitem is the same size as other homogeneous items. See [gtk.toolitem.ToolItem.setHomogeneous]. Returns: true if the item is the same size as other homogeneous items.
gtk.types.IconSize getIconSize()Returns the icon size used for toolitem. Custom subclasses of #GtkToolItem should call this function to find out what size icons they should use. Returns: a #GtkIconSize indicating the icon size us...
bool getIsImportant()Returns whether toolitem is considered important. See [gtk.toolitem.ToolItem.setIsImportant] Returns: true if tool_item is considered important.
gtk.types.Orientation getOrientation()Returns the orientation used for toolitem. Custom subclasses of #GtkToolItem should call this function to find out what size icons they should use. Returns: a #GtkOrientation indicating the orienta...
gtk.widget.Widget getProxyMenuItem(string menuItemId)If menuitemid matches the string passed to [gtk.tool_item.ToolItem.setProxyMenuItem] return the corresponding #GtkMenuItem.
gtk.types.ReliefStyle getReliefStyle()Returns the relief style of toolitem. See [gtk.button.Button.setRelief]. Custom subclasses of #GtkToolItem should call this function in the handler of the #GtkToolItem::toolbarreconfigured signal t...
float getTextAlignment()Returns the text alignment used for toolitem. Custom subclasses of #GtkToolItem should call this function to find out how text should be aligned. Returns: a #gfloat indicating the horizontal text a...
gtk.types.Orientation getTextOrientation()Returns the text orientation used for toolitem. Custom subclasses of #GtkToolItem should call this function to find out how text should be orientated. Returns: a #GtkOrientation indicating the text...
gtk.size_group.SizeGroup getTextSizeGroup()Returns the size group used for labels in tool_item. Custom subclasses of #GtkToolItem should call this function and use the size group for labels. Returns: a #GtkSizeGroup
gtk.types.ToolbarStyle getToolbarStyle()Returns the toolbar style used for toolitem. Custom subclasses of #GtkToolItem should call this function in the handler of the GtkToolItem::toolbarreconfigured signal to find out in what style the ...
bool getUseDragWindow()Returns whether toolitem has a drag window. See [gtk.toolitem.ToolItem.setUseDragWindow]. Returns: true if tool_item uses a drag window.
bool getVisibleHorizontal()Returns whether the toolitem is visible on toolbars that are docked horizontally. Returns: true if toolitem is visible on toolbars that are docked horizontally.
bool getVisibleVertical()Returns whether toolitem is visible when the toolbar is docked vertically. See [gtk.toolitem.ToolItem.setVisibleVertical]. Returns: Whether tool_item is visible when the toolbar is docked vertically
void rebuildMenu()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.
gtk.widget.Widget retrieveProxyMenuItem()Returns the #GtkMenuItem that was last set by [gtk.toolitem.ToolItem.setProxyMenuItem], ie. the #GtkMenuItem that is going to appear in the overflow menu. Returns: The #GtkMenuItem that is going to...
void setExpand(bool expand)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 wh...
void setHomogeneous(bool homogeneous)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.
void setIsImportant(bool isImportant)Sets whether toolitem 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.types.ToolbarStyle.Bo...
void setProxyMenuItem(string menuItemId, gtk.widget.Widget menuItem = null)Sets the #GtkMenuItem used in the toolbar overflow menu. The menuitemid is used to identify the caller of this function and should also be used with [gtk.tool_item.ToolItem.getProxyMenuItem].
void setTooltipMarkup(string markup)Sets the markup text to be displayed as tooltip on the item. See [gtk.widget.Widget.setTooltipMarkup].
void setTooltipText(string text)Sets the text to be displayed as tooltip on the item. See [gtk.widget.Widget.setTooltipText].
void setUseDragWindow(bool useDragWindow)Sets whether toolitem has a drag window. When true the toolitem can be used as a drag source through [gtk.widget.Widget.dragSourceSet]. When toolitem has a drag window it will intercept all events,...
void setVisibleHorizontal(bool visibleHorizontal)Sets whether tool_item is visible when the toolbar is docked horizontally.
void setVisibleVertical(bool visibleVertical)Sets whether toolitem 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 visiblevertical is false ...
void toolbarReconfigured()Emits the signal #GtkToolItem::toolbarreconfigured on toolitem. #GtkToolbar and other #GtkToolShell implementations use this function to notify children, when some aspect of their configuration cha...
gulong connectCreateMenuProxy(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == bool) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.tool_item.ToolItem))) && Parameters!T.length < 2)Connect to `CreateMenuProxy` signal.
gulong connectToolbarReconfigured(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.tool_item.ToolItem))) && Parameters!T.length < 2)Connect to `ToolbarReconfigured` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkToolItem Returns: the new #GtkToolItem

Fluent builder for [gtk.tool_item.ToolItem]

Methods