1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 a menu item with a check box.
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkCheckMenuItem is a menu item that maintains the state of a boolean
10 value in addition to a #GtkMenuItem's usual role in activating application
15 A check box indicating the state of the boolean value is displayed
16 at the left side of the #GtkMenuItem. Activating the #GtkMenuItem
20 <!-- ##### SECTION See_Also ##### -->
25 <!-- ##### STRUCT GtkCheckMenuItem ##### -->
27 The #GtkCheckMenuItem-struct struct contains the following fields.
28 (These fields should be considered read-only. They should never be set by
31 <informaltable pgwide=1 frame="none" role="struct">
32 <tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
36 <entry>#guint active;</entry>
37 <entry>TRUE if the check box is active.</entry>
40 </tbody></tgroup></informaltable>
44 <!-- ##### FUNCTION gtk_check_menu_item_new ##### -->
46 Creates a new #GtkCheckMenuItem.
49 @Returns: a new #GtkCheckMenuItem.
52 <!-- ##### FUNCTION gtk_check_menu_item_new_with_label ##### -->
54 Creates a new #GtkCheckMenuItem with a label.
57 @label: the string to use for the label.
58 @Returns: a new #GtkCheckMenuItem.
61 <!-- ##### FUNCTION gtk_check_menu_item_new_with_mnemonic ##### -->
70 <!-- ##### MACRO gtk_check_menu_item_set_state ##### -->
72 This macro is provided to preserve compatibility with older code.
73 New code should use gtk_check_menu_item_set_active() function instead.
78 <!-- ##### FUNCTION gtk_check_menu_item_get_active ##### -->
87 <!-- ##### FUNCTION gtk_check_menu_item_set_active ##### -->
89 Sets the active state of the menu item's check box.
92 @check_menu_item: a #GtkCheckMenuItem.
93 @is_active: boolean value indicating whether the check box is active.
96 <!-- ##### FUNCTION gtk_check_menu_item_set_show_toggle ##### -->
98 Controls whether the check box is shown at all times.
99 Normally the check box is shown only when it is active or while the
100 menu item is selected.
103 @menu_item: a #GtkCheckMenuItem.
104 @always: boolean value indicating whether to always show the check box.
107 <!-- ##### FUNCTION gtk_check_menu_item_toggled ##### -->
109 Emits the GtkCheckMenuItem::toggled signal.
112 @check_menu_item: a #GtkCheckMenuItem.
115 <!-- ##### FUNCTION gtk_check_menu_item_get_inconsistent ##### -->
124 <!-- ##### FUNCTION gtk_check_menu_item_set_inconsistent ##### -->
133 <!-- ##### SIGNAL GtkCheckMenuItem::toggled ##### -->
135 This signal is emitted when the state of the check box is changed.
139 A signal handler can examine the <structfield>active</structfield>
140 field of the #GtkCheckMenuItem-struct struct to discover the new state.
143 @checkmenuitem: the object which received the signal.
145 <!-- ##### ARG GtkCheckMenuItem:active ##### -->
150 <!-- ##### ARG GtkCheckMenuItem:inconsistent ##### -->