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.
ToolButton self()Returns `this`, for use in `with` statements.ToolButtonGidBuilder builder()Get builder for [gtk.tool_button.ToolButton] Returns: New builder objectstring iconName() @propertyGet `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) @propertySet `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.widget.Widget iconWidget() @propertyvoid iconWidget(gtk.widget.Widget propval) @propertystring label() @propertyvoid label(string propval) @propertygtk.widget.Widget labelWidget() @propertyvoid labelWidget(gtk.widget.Widget propval) @propertystring stockId() @propertyvoid stockId(string propval) @propertybool useUnderline() @propertyvoid useUnderline(bool propval) @propertygtk.tool_button.ToolButton newFromStock(string stockId)Creates a new #GtkToolButton containing the image and text from a stock item. Some stock ids have preprocessor macros like #GTKSTOCKOK and #GTKSTOCKAPPLY.string getIconName()Returns 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()Return 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()Returns 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()Returns 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()Returns 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()Returns 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)Sets 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)Sets 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)Sets 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)Sets labelwidget as the widget that will be used as the label for button. If labelwidget is null the #GtkToolButton:label property is used as label. If #GtkToolButton:label is also null, the label ...void setStockId(string stockId = null)Sets the name of the stock item. See [gtk.toolbutton.ToolButton.newFromStock]. The stockid property only has an effect if not overridden by non-null #GtkToolButton:label-widget and #GtkToolButton:i...void setUseUnderline(bool useUnderline)If 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)Connect 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.T iconName(string propval)Set `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)T label(string propval)T labelWidget(gtk.widget.Widget propval)T stockId(string propval)T useUnderline(bool propval)Fluent builder for [gtk.tool_button.ToolButton]