A menu item with a check box
Class GtkCheckMenuItem
A GtkCheckMenuItem is a menu item that maintains the state of a boolean value in addition to a GtkMenuItem's 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.
Methods | |
get_active | Returns whether the check menu item is active. |
get_draw_as_radio | Returns whether check_menu_item looks like a GtkRadioMenuItem |
get_inconsistent | Retrieves the value set by gtk_check_menu_item_set_inconsistent(). |
new_with_label | Creates a new GtkCheckMenuItem with a label. |
new_with_mnemonic | Creates a new GtkCheckMenuItem containing a label. |
set_active | Sets the active state of the menu item's check box. |
set_draw_as_radio | Sets whether check_menu_item is drawn like a GtkRadioMenuItem |
set_inconsistent | Sets the CheckMenuItem inconsistent. |
signal_toggled | This signal is emitted when the state of the check box is changed. |
toggled | Emits the GtkCheckMenuItem::toggled signal. |
Returns whether the check menu item is active.
GtkCheckMenuItem.get_active()
Return | TRUE if the menu item is checked. |
Returns whether check_menu_item looks like a GtkRadioMenuItem
GtkCheckMenuItem.get_draw_as_radio()
Return | Whether check_menu_item looks like a GtkRadioMenuItem |
Retrieves the value set by gtk_check_menu_item_set_inconsistent().
GtkCheckMenuItem.get_inconsistent()
Return | TRUE if inconsistent |
Creates a new GtkCheckMenuItem with a label.
GtkCheckMenuItem.new_with_label( label )
label | the string to use for the label. |
Return | a new GtkCheckMenuItem. |
Creates a new GtkCheckMenuItem containing a label.
GtkCheckMenuItem.new_with_mnemonic( label )
label | the text of the button, with an underscore in front of the mnemonic character |
Return | a new GtkCheckMenuItem |
The label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the menu item.
Sets the active state of the menu item's check box.
GtkCheckMenuItem.set_active( is_active )
is_active | boolean value indicating whether the check box is active. |
Sets whether check_menu_item is drawn like a GtkRadioMenuItem
GtkCheckMenuItem.set_draw_as_radio( draw_as_radio )
draw_as_radio | whether check_menu_item is drawn like a GtkRadioMenuItem |
Sets the CheckMenuItem inconsistent.
GtkCheckMenuItem.set_inconsistent( setting )
setting | TRUE to display an "inconsistent" third state check |
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.
This signal is emitted when the state of the check box is changed.
GtkCheckMenuItem.signal_toggled()
Emits the GtkCheckMenuItem::toggled signal.
GtkCheckMenuItem.toggled()