Package: gtk

Class gtk-tool-button

Superclasses

gtk-tool-item, gtk-bin, gtk-container, gtk-widget, gtk-buildable, gtk-activatable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots

icon-name
The icon-name property of type :string (Read / Write)
The name of the themed icon displayed on the item. This property only has an effect if not overridden by the label, icon-widget or stock-id properties.
Default value: nil
icon-widget
The icon-widget property of type gtk-widget (Read / Write)
Icon widget to display in the item.
label
The label property of type :string (Read / Write)
Text to show in the tool item.
Default value: nil
label-widget
The label-widget property of type gtk-widget (Read / Write)
Widget to use as the item label.
stock-id
The stock-id property of type :string (Read / Write)
The stock icon displayed on the item.
Warning: The stock-id property has been deprecated since version 3.10 and should not be used in newly written code. Use the icon-name property instead.
Default value: nil
use-underline
The use-underline property of type :boolean (Read / Write)
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.
Default value: false

Details

The gtk-tool-button widgets are gtk-tool-item widgets containing buttons. Use the gtk-tool-button-new function to create a new gtk-tool-button widget.

The label of a gtk-tool-button widget is determined by the label-widget, label, icon-name, and stock-id properties. If the label-widget property is non-nil, then that widget is used as the label. Otherwise, if the label property is non-nil, that string is used as the label. Otherwise, if the stock-id property is non-nil, the label is determined by the stock item. Otherwise, the button does not have a label.

The icon of a gtk-tool-button widget is determined by the icon-widget, icon-name, and stock-id properties. If the icon-widget property is non-nil, then that widget is used as the icon. Otherwise, if the icon-name or stock-id properties are non-nil, the icons are determined by the icon name or the stock item. Otherwise, the button does not have a icon.

CSS nodes

The gtk-tool-button implementation has a single CSS node with name toolbutton.

Style Property Details

icon-spacing
The icon-spacing style property of type :int (Read / Write)
Spacing in pixels between the icon and label.
Allowed values: >= 0
Default value: 3

Signal Details

The "clicked" signal
 lambda (button)    :action      
The signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.
button
The gtk-tool-button widget that emitted the signal.
 

Slot Access Functions

Inherited Slot Access Functions

See also

*2021-11-30