]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkmenuitem.sgml
9f048eb50edac5d2e227b45e86768a37a9e425b7
[~andy/gtk] / docs / reference / gtk / tmpl / gtkmenuitem.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkMenuItem
3
4 <!-- ##### SECTION Short_Description ##### -->
5 the widget used for item in menus
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkMenuItem widget and the derived widgets are the only valid
10 childs for menus. Their function is to correctly handle highlighting,
11 alignment, events and submenus.
12 </para>
13 <para>
14 As it derives from #GtkBin it can hold any valid child widget, altough
15 only a few are really useful.
16 </para>
17
18 <!-- ##### SECTION See_Also ##### -->
19 <para>
20 <variablelist>
21 <varlistentry>
22 <term>#GtkBin</term>
23 <listitem><para>for how to handle the child.</para></listitem>
24 </varlistentry>
25 <varlistentry>
26 <term>#GtkItem</term>
27 <listitem><para>is the abstract class for all sorts of items.</para></listitem>
28 </varlistentry>
29 <varlistentry>
30 <term>#GtkMenuShell</term>
31 <listitem><para>is always the parent of #GtkMenuItem.</para></listitem>
32 </varlistentry>
33 </variablelist>
34 </para>
35
36 <!-- ##### STRUCT GtkMenuItem ##### -->
37 <para>
38
39 </para>
40
41
42 <!-- ##### FUNCTION gtk_menu_item_new ##### -->
43 <para>
44 Creates a new #GtkMenuItem.
45 </para>
46
47 @Returns: the newly created #GtkMenuItem
48
49
50 <!-- ##### FUNCTION gtk_menu_item_new_with_label ##### -->
51 <para>
52 Creates a new #GtkMenuItem whose child is a simple #GtlLabel.
53 </para>
54
55 @label: the text for the label
56 @Returns: the newly created #GtkMenuItem
57
58
59 <!-- ##### FUNCTION gtk_menu_item_set_submenu ##### -->
60 <para>
61 Sets the widget submenu, or changes it.
62 </para>
63
64 @menu_item: the menu item widget
65 @submenu: the submenu
66
67
68 <!-- ##### FUNCTION gtk_menu_item_remove_submenu ##### -->
69 <para>
70 Removes the widget's submenu.
71 </para>
72
73 @menu_item: the menu item widget
74
75
76 <!-- ##### FUNCTION gtk_menu_item_set_placement ##### -->
77 <para>
78 Specifies the placement of the submenu around the menu item. The placement
79 is usually #GTK_LEFT_RIGHT for menu items in a popup menu and
80 #GTK_TOP_BOTTOM in menu bars.
81 </para>
82 <para>
83 This function is useless in usual applications.
84 </para>
85
86 @menu_item: the menu item
87 @placement: the submenu placement
88
89
90 <!-- ##### FUNCTION gtk_menu_item_configure ##### -->
91 <para>
92 Sets whether the menu item should show a submenu indicator, which is a right
93 arrow.
94 </para>
95
96 @menu_item: the menu item
97 @show_toggle_indicator: unused
98 @show_submenu_indicator: whether to show the arrow or not
99
100
101 <!-- ##### FUNCTION gtk_menu_item_select ##### -->
102 <para>
103 Emits the "select" signal on the given item. Behaves exactly like
104 #gtk_item_select.
105 </para>
106
107 @menu_item: the menu item
108
109
110 <!-- ##### FUNCTION gtk_menu_item_deselect ##### -->
111 <para>
112 Emits the "deselect" signal on the given item. Behaves exactly like
113 #gtk_item_deselect.
114 </para>
115
116 @menu_item: the menu item
117
118
119 <!-- ##### FUNCTION gtk_menu_item_activate ##### -->
120 <para>
121 Emits the "activate" signal on the given item
122 </para>
123
124 @menu_item: the menu item
125
126
127 <!-- ##### FUNCTION gtk_menu_item_toggle_size_request ##### -->
128 <para>
129
130 </para>
131
132 @menu_item: 
133 @requisition: 
134
135
136 <!-- ##### FUNCTION gtk_menu_item_toggle_size_allocate ##### -->
137 <para>
138
139 </para>
140
141 @menu_item: 
142 @allocation: 
143
144
145 <!-- ##### FUNCTION gtk_menu_item_right_justify ##### -->
146 <para>
147 Sets the menu item to be right-justified. Only useful for menu bars.
148 </para>
149
150 @menu_item: the menu item
151
152
153 <!-- ##### SIGNAL GtkMenuItem::activate ##### -->
154 <para>
155 Emitted when the item is activated.
156 </para>
157
158 @menuitem: the object which received the signal.
159
160 <!-- ##### SIGNAL GtkMenuItem::activate-item ##### -->
161 <para>
162 Emitted when the item is activated, but also if the menu item has a
163 submenu. For normal applications, the relevant signal is "activate".
164 </para>
165
166 @menuitem: the object which received the signal.
167
168 <!-- ##### SIGNAL GtkMenuItem::toggle-size-allocate ##### -->
169 <para>
170
171 </para>
172
173 @menuitem: the object which received the signal.
174 @arg1: 
175
176 <!-- ##### SIGNAL GtkMenuItem::toggle-size-request ##### -->
177 <para>
178
179 </para>
180
181 @menuitem: the object which received the signal.
182 @arg1: 
183