Description
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
GtkCheckMenuItem has a main CSS node with name menuitem, and a subnode
with name check, which gets the .left or .right style class.
Functions
gtk_check_menu_item_new_with_label ()
GtkWidget *
gtk_check_menu_item_new_with_label (const gchar *label);
Creates a new GtkCheckMenuItem with a label.
gtk_check_menu_item_set_active ()
void
gtk_check_menu_item_set_active (GtkCheckMenuItem *check_menu_item,
gboolean is_active);
Sets the active state of the menu item’s check box.
gtk_check_menu_item_toggled ()
void
gtk_check_menu_item_toggled (GtkCheckMenuItem *check_menu_item);
Emits the “toggled” signal.
gtk_check_menu_item_set_inconsistent ()
void
gtk_check_menu_item_set_inconsistent (GtkCheckMenuItem *check_menu_item,
gboolean 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
display the check in an “in between” state. This function turns on
“in between” display. Normally you would turn off the inconsistent
state again if the user explicitly selects a setting. This has to be
done manually, gtk_check_menu_item_set_inconsistent() only affects
visual appearance, it doesn’t affect the semantics of the widget.
gtk_check_menu_item_set_draw_as_radio ()
void
gtk_check_menu_item_set_draw_as_radio (GtkCheckMenuItem *check_menu_item,
gboolean draw_as_radio);
Sets whether check_menu_item
is drawn like a GtkRadioMenuItem
Since: 2.4