11.46Class GtkCheckMenuItem

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_activeReturns whether the check menu item is active.
get_draw_as_radioReturns whether check_menu_item looks like a GtkRadioMenuItem
get_inconsistentRetrieves the value set by gtk_check_menu_item_set_inconsistent().
new_with_labelCreates a new GtkCheckMenuItem with a label.
new_with_mnemonicCreates a new GtkCheckMenuItem containing a label.
set_activeSets the active state of the menu item's check box.
set_draw_as_radioSets whether check_menu_item is drawn like a GtkRadioMenuItem
set_inconsistentSets the CheckMenuItem inconsistent.
signal_toggledThis signal is emitted when the state of the check box is changed.
toggledEmits the GtkCheckMenuItem::toggled signal.

Methods

get_active

Returns whether the check menu item is active.

GtkCheckMenuItem.get_active()
ReturnTRUE if the menu item is checked.

get_draw_as_radio

Returns whether check_menu_item looks like a GtkRadioMenuItem

GtkCheckMenuItem.get_draw_as_radio()
ReturnWhether check_menu_item looks like a GtkRadioMenuItem

get_inconsistent

Retrieves the value set by gtk_check_menu_item_set_inconsistent().

GtkCheckMenuItem.get_inconsistent()
ReturnTRUE if inconsistent

new_with_label

Creates a new GtkCheckMenuItem with a label.

GtkCheckMenuItem.new_with_label( label )
label the string to use for the label.
Returna new GtkCheckMenuItem.

new_with_mnemonic

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
Returna new GtkCheckMenuItem

The label will be created using gtk_label_new_with_mnemonic(), so underscores in label indicate the mnemonic for the menu item.

set_active

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.

set_draw_as_radio

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

set_inconsistent

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.

signal_toggled

This signal is emitted when the state of the check box is changed.

GtkCheckMenuItem.signal_toggled()

toggled

Emits the GtkCheckMenuItem::toggled signal.

GtkCheckMenuItem.toggled()
Made with http://www.falconpl.org