summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkmenuitem.sgml
blob: a3e01835d3e532a21b6f3b10dd9e874ae21cdfb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
<!-- ##### SECTION Title ##### -->
GtkMenuItem

<!-- ##### SECTION Short_Description ##### -->
The widget used for item in menus

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkMenuItem widget and the derived widgets are the only valid
childs for menus. Their function is to correctly handle highlighting,
alignment, events and submenus.
</para>
<para>
As it derives from #GtkBin it can hold any valid child widget, altough
only a few are really useful.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>
<variablelist>
<varlistentry>
<term>#GtkBin</term>
<listitem><para>for how to handle the child.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkItem</term>
<listitem><para>is the abstract class for all sorts of items.</para></listitem>
</varlistentry>
<varlistentry>
<term>#GtkMenuShell</term>
<listitem><para>is always the parent of #GtkMenuItem.</para></listitem>
</varlistentry>
</variablelist>
</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT GtkMenuItem ##### -->
<para>

</para>


<!-- ##### SIGNAL GtkMenuItem::activate ##### -->
<para>
Emitted when the item is activated.
</para>

@menuitem: the object which received the signal.

<!-- ##### SIGNAL GtkMenuItem::activate-item ##### -->
<para>
Emitted when the item is activated, but also if the menu item has a
submenu. For normal applications, the relevant signal is "activate".
</para>

@menuitem: the object which received the signal.

<!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
<para>

</para>

@menuitem: the object which received the signal.
@arg1: 

<!-- ##### SIGNAL GtkMenuItem::toggle-size-request ##### -->
<para>

</para>

@menuitem: the object which received the signal.
@arg1: 

<!-- ##### ARG GtkMenuItem:accel-path ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:right-justified ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:submenu ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:arrow-scaling ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:arrow-spacing ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:horizontal-padding ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:selected-shadow-type ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:toggle-spacing ##### -->
<para>

</para>

<!-- ##### ARG GtkMenuItem:width-chars ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_menu_item_new ##### -->
<para>
Creates a new #GtkMenuItem.
</para>

@Returns: the newly created #GtkMenuItem


<!-- ##### FUNCTION gtk_menu_item_new_with_label ##### -->
<para>
Creates a new #GtkMenuItem whose child is a #GtkLabel.
</para>

@label: the text for the label
@Returns: the newly created #GtkMenuItem


<!-- ##### FUNCTION gtk_menu_item_new_with_mnemonic ##### -->
<para>

</para>

@label: 
@Returns: 


<!-- ##### FUNCTION gtk_menu_item_set_right_justified ##### -->
<para>

</para>

@menu_item: 
@right_justified: 


<!-- ##### FUNCTION gtk_menu_item_get_right_justified ##### -->
<para>

</para>

@menu_item: 
@Returns: 


<!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
<para>

</para>

@menu_item: 
@submenu: 


<!-- ##### FUNCTION gtk_menu_item_get_submenu ##### -->
<para>

</para>

@menu_item: 
@Returns: 


<!-- ##### FUNCTION gtk_menu_item_set_accel_path ##### -->
<para>

</para>

@menu_item: 
@accel_path: 


<!-- ##### FUNCTION gtk_menu_item_get_accel_path ##### -->
<para>

</para>

@menu_item: 
@Returns: 


<!-- ##### FUNCTION gtk_menu_item_remove_submenu ##### -->
<para>

</para>

@menu_item: 


<!-- ##### FUNCTION gtk_menu_item_select ##### -->
<para>
Emits the "select" signal on the given item. Behaves exactly like
#gtk_item_select.
</para>

@menu_item: the menu item


<!-- ##### FUNCTION gtk_menu_item_deselect ##### -->
<para>
Emits the "deselect" signal on the given item. Behaves exactly like
#gtk_item_deselect.
</para>

@menu_item: the menu item


<!-- ##### FUNCTION gtk_menu_item_activate ##### -->
<para>
Emits the "activate" signal on the given item
</para>

@menu_item: the menu item


<!-- ##### FUNCTION gtk_menu_item_toggle_size_request ##### -->
<para>
Emits the "toggle_size_request" signal on the given item.
</para>

@menu_item: the menu item
@requisition: the requisition to use as signal data.


<!-- ##### FUNCTION gtk_menu_item_toggle_size_allocate ##### -->
<para>
Emits the "toggle_size_allocate" signal on the given item.
</para>

@menu_item: the menu item.
@allocation: the allocation to use as signal data.


<!-- ##### MACRO gtk_menu_item_right_justify ##### -->
<para>
Sets the menu item to be right-justified. Only useful for menu bars.
</para>

@menu_item: the menu item