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
CheckMenuItem self()Returns `this`, for use in `with` statements.CheckMenuItemGidBuilder builder()Get builder for [gtk.checkmenuitem.CheckMenuItem] Returns: New builder objectbool active() @propertyvoid active(bool propval) @propertybool drawAsRadio() @propertyvoid drawAsRadio(bool propval) @propertybool inconsistent() @propertyvoid inconsistent(bool propval) @propertygtk.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 #GtkRadioMenuItembool getInconsistent()Retrieves the value set by [gtk.checkmenuitem.CheckMenuItem.setInconsistent]. Returns: true if inconsistentvoid 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 #GtkRadioMenuItemvoid 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.Fluent builder for [gtk.check_menu_item.CheckMenuItem]
Methods