The #GtkButton widget is generally used to trigger a callback function that is
called when the button is pressed. The various signals and how to use them
are outlined below.
The #GtkButton widget can hold any valid child widget. That is, it can hold
almost any other standard #GtkWidget. The most commonly used child is the
#GtkLabel.
CSS nodes
GtkButton has a single CSS node with name button. The node will get the
style classes .image-button or .text-button, if the content is just an
image or label, respectively. It may also receive the .flat style class.
Other style classes that are commonly used with GtkButton include
.suggested-action and .destructive-action. In special cases, buttons
can be made round by adding the .circular style class.
Button-like widgets like #GtkToggleButton, #GtkMenuButton, #GtkVolumeButton,
#GtkLockButton, #GtkColorButton, #GtkFontButton or #GtkFileChooserButton use
style classes such as .toggle, .popup, .scale, .lock, .color, .font, .file
to differentiate themselves from a plain GtkButton.
The #GtkButton widget is generally used to trigger a callback function that is called when the button is pressed. The various signals and how to use them are outlined below.
The #GtkButton widget can hold any valid child widget. That is, it can hold almost any other standard #GtkWidget. The most commonly used child is the #GtkLabel.
CSS nodes
GtkButton has a single CSS node with name button. The node will get the style classes .image-button or .text-button, if the content is just an image or label, respectively. It may also receive the .flat style class.
Other style classes that are commonly used with GtkButton include .suggested-action and .destructive-action. In special cases, buttons can be made round by adding the .circular style class.
Button-like widgets like #GtkToggleButton, #GtkMenuButton, #GtkVolumeButton, #GtkLockButton, #GtkColorButton, #GtkFontButton or #GtkFileChooserButton use style classes such as .toggle, .popup, .scale, .lock, .color, .font, .file to differentiate themselves from a plain GtkButton.