GtkCheckButton — Create widgets with a discrete toggle button
int | indicator-size | Read |
int | indicator-spacing | Read |
struct | GtkCheckButton |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkButton ╰── GtkToggleButton ╰── GtkCheckButton ╰── GtkRadioButton
GtkCheckButton implements AtkImplementorIface, GtkBuildable, GtkActionable and GtkActivatable.
#include <gtk/gtk.h>
A GtkCheckButton places a discrete GtkToggleButton next to a widget, (usually a GtkLabel). See the section on GtkToggleButton widgets for more information about toggle/check buttons.
The important signal ( “toggled” ) is also inherited from GtkToggleButton.
A GtkCheckButton with indicator (see gtk_toggle_button_set_mode()
) has a main CSS node with name checkbutton and a subnode with name check.
checkbutton ├── check ╰── <child>
A GtkCheckButton without indicator changes the name of its main node to button and adds a .check style class to it. The subnode is invisible in this case.
GtkWidget *
gtk_check_button_new (void
);
Creates a new GtkCheckButton.
a GtkWidget.
GtkWidget *
gtk_check_button_new_with_label (const gchar *label
);
Creates a new GtkCheckButton with a GtkLabel to the right of it.
label | the text for the check button. |
a GtkWidget.
GtkWidget *
gtk_check_button_new_with_mnemonic (const gchar *label
);
Creates a new GtkCheckButton containing a label. The label will be created using gtk_label_new_with_mnemonic()
, so underscores in label
indicate the mnemonic for the check button.
label | The text of the button, with an underscore in front of the mnemonic character |
a new GtkCheckButton
struct GtkCheckButton;
“indicator-size”
style property“indicator-size” int
The size of the indicator.
GtkCheckButton:indicator-size
has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS min-width and min-height on the indicator node.
Owner: GtkCheckButton
Flags: Read
Allowed values: >= 0
Default value: 16
“indicator-spacing”
style property“indicator-spacing” int
The spacing around the indicator.
GtkCheckButton:indicator-spacing
has been deprecated since version 3.20 and should not be used in newly-written code.
Use CSS margins of the indicator node, the value of this style property is ignored.
Owner: GtkCheckButton
Flags: Read
Allowed values: >= 0
Default value: 2
GtkCheckMenuItem, GtkButton, GtkToggleButton, GtkRadioButton
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk3/3.24/GtkCheckButton.html