gtk.check_menu_item

Module for [CheckMenuItem] class

Types 3

A #GtkCheckMenuItem is a menu item that maintains the state of a boolean value in addition to a #GtkMenuItem usual role in activating application code.

A check box indicating the state of the boolean value is displayed at the left side of the #GtkMenuItem. Activating the #GtkMenuItem toggles the value.

CSS nodes

menuitem
├── check.left
╰── <child>

GtkCheckMenuItem has a main CSS node with name menuitem, and a subnode with name check, which gets the .left or .right style class.

Methods
GType _gType() @property
CheckMenuItem self()Returns `this`, for use in `with` statements.
CheckMenuItemGidBuilder builder()Get builder for [gtk.checkmenuitem.CheckMenuItem] Returns: New builder object
bool active() @property
void active(bool propval) @property
bool drawAsRadio() @property
void drawAsRadio(bool propval) @property
bool inconsistent() @property
void inconsistent(bool propval) @property
gtk.check_menu_item.CheckMenuItem newWithLabel(string label)Creates a new #GtkCheckMenuItem with a label.
gtk.check_menu_item.CheckMenuItem newWithMnemonic(string label)Creates a new #GtkCheckMenuItem containing a label. The label will be created using [gtk.label.Label.newWithMnemonic], so underscores in label indicate the mnemonic for the menu item.
bool getActive()Returns whether the check menu item is active. See gtkcheckmenuitemset_active (). Returns: true if the menu item is checked.
bool getDrawAsRadio()Returns whether checkmenuitem looks like a #GtkRadioMenuItem Returns: Whether checkmenuitem looks like a #GtkRadioMenuItem
bool getInconsistent()Retrieves the value set by [gtk.checkmenuitem.CheckMenuItem.setInconsistent]. Returns: true if inconsistent
void setActive(bool isActive)Sets the active state of the menu item’s check box.
void setDrawAsRadio(bool drawAsRadio)Sets whether checkmenuitem is drawn like a #GtkRadioMenuItem
void setInconsistent(bool setting)If the user has selected a range of elements (such as some text or spreadsheet cells) that are affected by a boolean setting, and the current values in that range are inconsistent, you may want to ...
void toggled()Emits the #GtkCheckMenuItem::toggled signal.
gulong connectToggled(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.check_menu_item.CheckMenuItem))) && Parameters!T.length < 2)Connect to `Toggled` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new #GtkCheckMenuItem. Returns: a new #GtkCheckMenuItem.
Methods
T active(bool propval)
T drawAsRadio(bool propval)
T inconsistent(bool propval)

Fluent builder for [gtk.check_menu_item.CheckMenuItem]