]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkcheckmenuitem.sgml
The render vfunc takes a GdkDrawable* instead of a GdkWindow*, because
[~andy/gtk] / docs / reference / gtk / tmpl / gtkcheckmenuitem.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkCheckMenuItem
3
4 <!-- ##### SECTION Short_Description ##### -->
5 a menu item with a check box.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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
11 code.
12 </para>
13
14 <para>
15 A check box indicating the state of the boolean value is displayed
16 at the left side of the #GtkMenuItem.  Activating the #GtkMenuItem 
17 toggles the value.
18 </para>
19
20 <!-- ##### SECTION See_Also ##### -->
21 <para>
22
23 </para>
24
25 <!-- ##### STRUCT GtkCheckMenuItem ##### -->
26 <para>
27 The #GtkCheckMenuItem-struct struct contains the following fields.
28 (These fields should be considered read-only. They should never be set by
29 an application.)
30
31 <informaltable pgwide="1" frame="none" role="struct">
32 <tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
33 <tbody>
34
35 <row>
36 <entry>#guint active;</entry>
37 <entry>TRUE if the check box is active.</entry>
38 </row>
39
40 </tbody></tgroup></informaltable>
41 </para>
42
43
44 <!-- ##### FUNCTION gtk_check_menu_item_new ##### -->
45 <para>
46 Creates a new #GtkCheckMenuItem.
47 </para>
48
49 @Returns: a new #GtkCheckMenuItem.
50
51
52 <!-- ##### FUNCTION gtk_check_menu_item_new_with_label ##### -->
53 <para>
54 Creates a new #GtkCheckMenuItem with a label.
55 </para>
56
57 @label: the string to use for the label.
58 @Returns: a new #GtkCheckMenuItem.
59
60
61 <!-- ##### FUNCTION gtk_check_menu_item_new_with_mnemonic ##### -->
62 <para>
63
64 </para>
65
66 @label: 
67 @Returns: 
68
69
70 <!-- ##### MACRO gtk_check_menu_item_set_state ##### -->
71 <para>
72 This macro is provided to preserve compatibility with older code.
73 New code should use gtk_check_menu_item_set_active() function instead.
74 </para>
75
76
77
78 <!-- ##### FUNCTION gtk_check_menu_item_get_active ##### -->
79 <para>
80
81 </para>
82
83 @check_menu_item: 
84 @Returns: 
85
86
87 <!-- ##### FUNCTION gtk_check_menu_item_set_active ##### -->
88 <para>
89 Sets the active state of the menu item's check box.
90 </para>
91
92 @check_menu_item: a #GtkCheckMenuItem.
93 @is_active: boolean value indicating whether the check box is active.
94
95
96 <!-- ##### FUNCTION gtk_check_menu_item_set_show_toggle ##### -->
97 <para>
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.
101 </para>
102
103 @menu_item: a #GtkCheckMenuItem.
104 @always: boolean value indicating whether to always show the check box.
105
106
107 <!-- ##### FUNCTION gtk_check_menu_item_toggled ##### -->
108 <para>
109 Emits the GtkCheckMenuItem::toggled signal.
110 </para>
111
112 @check_menu_item: a #GtkCheckMenuItem.
113
114
115 <!-- ##### FUNCTION gtk_check_menu_item_get_inconsistent ##### -->
116 <para>
117
118 </para>
119
120 @check_menu_item: 
121 @Returns: 
122
123
124 <!-- ##### FUNCTION gtk_check_menu_item_set_inconsistent ##### -->
125 <para>
126
127 </para>
128
129 @check_menu_item: 
130 @setting: 
131
132
133 <!-- ##### SIGNAL GtkCheckMenuItem::toggled ##### -->
134 <para>
135 This signal is emitted when the state of the check box is changed.
136 </para>
137
138 <para>
139 A signal handler can examine the <structfield>active</structfield> 
140 field of the #GtkCheckMenuItem-struct struct to discover the new state.
141 </para>
142
143 @checkmenuitem: the object which received the signal.
144
145 <!-- ##### ARG GtkCheckMenuItem:active ##### -->
146 <para>
147
148 </para>
149
150 <!-- ##### ARG GtkCheckMenuItem:draw-as-radio ##### -->
151 <para>
152
153 </para>
154
155 <!-- ##### ARG GtkCheckMenuItem:inconsistent ##### -->
156 <para>
157
158 </para>
159