gtk.tool_button
Module for [ToolButton] class
Types 3
#GtkToolButtons are #GtkToolItems containing buttons.
Use gtk.tool_button.ToolButton.new_ to create a new #GtkToolButton.
The label of a #GtkToolButton is determined by the properties #GtkToolButton:label-widget, #GtkToolButton:label, and #GtkToolButton:stock-id. If #GtkToolButton:label-widget is non-null, then that widget is used as the label. Otherwise, if #GtkToolButton:label is non-null, that string is used as the label. Otherwise, if #GtkToolButton:stock-id is non-null, the label is determined by the stock item. Otherwise, the button does not have a label.
The icon of a #GtkToolButton is determined by the properties #GtkToolButton:icon-widget and #GtkToolButton:stock-id. If #GtkToolButton:icon-widget is non-null, then that widget is used as the icon. Otherwise, if #GtkToolButton:stock-id is non-null, the icon is determined by the stock item. Otherwise, the button does not have a icon.
CSS nodes
GtkToolButton has a single CSS node with name toolbutton.
ToolButtonGidBuilder builder() static nothrowGet builder for [gtk.tool_button.ToolButton] Returns: New builder objectstring iconName() @property nothrowGet `iconName` property. Returns: The name of the themed icon displayed on the item. This property only has an effect if not overridden by #GtkToolButton:label-widget, #GtkToolButton:icon-widget or...void iconName(string propval) @property nothrowSet `iconName` property. Params: propval = The name of the themed icon displayed on the item. This property only has an effect if not overridden by #GtkToolButton:label-widget, #GtkToolButton:icon-...gtk.tool_button.ToolButton newFromStock(string stockId) static nothrowCreates a new #GtkToolButton containing the image and text from a stock item. Some stock ids have preprocessor macros like #GTK_STOCK_OK and #GTK_STOCK_APPLY.string getIconName() nothrowReturns the name of the themed icon for the tool button, see [gtk.tool_button.ToolButton.setIconName]. Returns: the icon name or null if the tool button has no themed icongtk.widget.Widget getIconWidget() nothrowReturn the widget used as icon widget on button. See [gtk.tool_button.ToolButton.setIconWidget]. Returns: The widget used as icon on button, or null.string getLabel() nothrowReturns the label used by the tool button, or null if the tool button doesn’t have a label. or uses a the label from a stock item. The returned string is owned by GTK+, and must not be modified o...gtk.widget.Widget getLabelWidget() nothrowReturns the widget used as label on button. See [gtk.tool_button.ToolButton.setLabelWidget]. Returns: The widget used as label on button, or null.string getStockId() nothrowReturns the name of the stock item. See [gtk.tool_button.ToolButton.setStockId]. The returned string is owned by GTK+ and must not be freed or modifed. Returns: the name of the stock item for button.bool getUseUnderline() nothrowReturns whether underscores in the label property are used as mnemonics on menu items on the overflow menu. See [gtk.tool_button.ToolButton.setUseUnderline]. Returns: true if underscores in the lab...void setIconName(string iconName = null) nothrowSets the icon for the tool button from a named themed icon. See the docs for #GtkIconTheme for more details. The #GtkToolButton:icon-name property only has an effect if not overridden by non-null #...void setIconWidget(gtk.widget.Widget iconWidget = null) nothrowSets icon as the widget used as icon on button. If icon_widget is null the icon is determined by the #GtkToolButton:stock-id property. If the #GtkToolButton:stock-id property is also null, button w...void setLabel(string label = null) nothrowSets label as the label used for the tool button. The #GtkToolButton:label property only has an effect if not overridden by a non-null #GtkToolButton:label-widget property. If both the #GtkToolButt...void setLabelWidget(gtk.widget.Widget labelWidget = null) nothrowSets label_widget as the widget that will be used as the label for button. If label_widget is null the #GtkToolButton:label property is used as label. If #GtkToolButton:label is also null, the labe...void setStockId(string stockId = null) nothrowSets the name of the stock item. See [gtk.tool_button.ToolButton.newFromStock]. The stock_id property only has an effect if not overridden by non-null #GtkToolButton:label-widget and #GtkToolButton...void setUseUnderline(bool useUnderline) nothrowIf set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu. For example, if the label property is “Open” a...gulong connectClicked(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_button.ToolButton)))
&& Parameters!T.length < 2) nothrowConnect to `Clicked` signal.this(gtk.widget.Widget iconWidget = null, string label = null)Creates a new #GtkToolButton using icon_widget as contents and label as label.Fluent builder implementation template for gtk.tool_button.ToolButton
T iconName(string propval) nothrowSet `iconName` property. Params: propval = The name of the themed icon displayed on the item. This property only has an effect if not overridden by #GtkToolButton:label-widget, #GtkToolButton:icon-...T iconWidget(gtk.widget.Widget propval) nothrowT label(string propval) nothrowT labelWidget(gtk.widget.Widget propval) nothrowT stockId(string propval) nothrowT useUnderline(bool propval) nothrowFluent builder for gtk.tool_button.ToolButton