ToolButtons are ToolItems containing buttons.
Use ToolButton to create a new ToolButton
The label of a ToolButton is determined by the properties
stock_id. If label_widget is non-null
, then that widget is used as the label. Otherwise, if label is non-
null, that string is used as the label. Otherwise, if
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 ToolButton is determined by the properties
icon_widget is non-null, then that
widget is used as the icon. Otherwise, if stock_id is non-
null, the icon is determined by the stock item. Otherwise, the button does not have a icon.
GtkToolButton has a single CSS node with name toolbutton.
- public unowned string? get_icon_name ()
Returns the name of the themed icon for the tool button, see
- public unowned Widget? get_icon_widget ()
Return the widget used as icon widget on this
- public unowned string? get_label ()
Returns the label used by the tool button, or
null if the tool button doesn’t have a label.
- public unowned Widget? get_label_widget ()
Returns the widget used as label on this.
- public unowned string get_stock_id ()
Returns the name of the stock item.
- public bool get_use_underline ()
Returns whether underscores in the label property are used as mnemonics on
menu items on the overflow menu.
- public void set_icon_name (string? icon_name)
Sets the icon for the tool button from a named themed icon.
- public void set_icon_widget (Widget? icon_widget)
icon as the widget used as icon on
- public void set_label (string? label)
label as the label used for the tool button.
- public void set_label_widget (Widget? label_widget)
label_widget as the widget that will be used as the label
- public void set_stock_id (string? stock_id)
Sets the name of the stock item.
- public void set_use_underline (bool use_underline)
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.