]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkaction.sgml
2.11.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtkaction.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkAction
3
4 <!-- ##### SECTION Short_Description ##### -->
5 An action which can be triggered by a menu or toolbar item
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 Actions represent operations that the user can be perform, along with
10 some information how it should be presented in the interface. Each action 
11 provides methods to create icons, menu items and toolbar items representing 
12 itself.
13 </para>
14 <para>
15 As well as the callback that is called when the action gets activated, the 
16 following also gets associated with the action:
17 <itemizedlist>
18   <listitem><para>a name (not translated, for path lookup)</para></listitem>
19   <listitem><para>a label (translated, for display)</para></listitem>
20   <listitem><para>an accelerator</para></listitem>
21   <listitem><para>whether label indicates a stock id</para></listitem>
22   <listitem><para>a tooltip (optional, translated)</para></listitem>
23   <listitem><para>a toolbar label (optional, shorter than label)</para></listitem>
24 </itemizedlist>
25 The action will also have some state information:
26 <itemizedlist>
27   <listitem><para>visible (shown/hidden)</para></listitem>
28   <listitem><para>sensitive (enabled/disabled)</para></listitem>
29 </itemizedlist>
30 </para>
31 <para>
32 Apart from regular actions, there are <link linkend="GtkToggleAction">toggle 
33 actions</link>, which can be toggled between two states and <link 
34 linkend="GtkRadioAction">radio actions</link>, of which only one in a group 
35 can be in the "active" state. Other actions can be implemented as #GtkAction 
36 subclasses.
37 </para>
38 <para>
39 Each action can have one or more proxy menu item, toolbar button or
40 other proxy widgets.  Proxies mirror the state of the action (text
41 label, tooltip, icon, visible, sensitive, etc), and should change when
42 the action's state changes. When the proxy is activated, it should
43 activate its action.
44 </para>
45
46 <!-- ##### SECTION See_Also ##### -->
47 <para>
48 #GtkActionGroup, #GtkUIManager
49 </para>
50
51 <!-- ##### SECTION Stability_Level ##### -->
52
53
54 <!-- ##### STRUCT GtkAction ##### -->
55 <para>
56 The <structname>GtkAction</structname> struct contains only private members
57 and should not be accessed directly.
58 </para>
59
60
61 <!-- ##### SIGNAL GtkAction::activate ##### -->
62 <para>
63
64 </para>
65
66 @action: the object which received the signal.
67
68 <!-- ##### ARG GtkAction:action-group ##### -->
69 <para>
70
71 </para>
72
73 <!-- ##### ARG GtkAction:hide-if-empty ##### -->
74 <para>
75
76 </para>
77
78 <!-- ##### ARG GtkAction:icon-name ##### -->
79 <para>
80
81 </para>
82
83 <!-- ##### ARG GtkAction:is-important ##### -->
84 <para>
85
86 </para>
87
88 <!-- ##### ARG GtkAction:label ##### -->
89 <para>
90
91 </para>
92
93 <!-- ##### ARG GtkAction:name ##### -->
94 <para>
95
96 </para>
97
98 <!-- ##### ARG GtkAction:sensitive ##### -->
99 <para>
100
101 </para>
102
103 <!-- ##### ARG GtkAction:short-label ##### -->
104 <para>
105
106 </para>
107
108 <!-- ##### ARG GtkAction:stock-id ##### -->
109 <para>
110
111 </para>
112
113 <!-- ##### ARG GtkAction:tooltip ##### -->
114 <para>
115
116 </para>
117
118 <!-- ##### ARG GtkAction:visible ##### -->
119 <para>
120
121 </para>
122
123 <!-- ##### ARG GtkAction:visible-horizontal ##### -->
124 <para>
125
126 </para>
127
128 <!-- ##### ARG GtkAction:visible-overflown ##### -->
129 <para>
130
131 </para>
132
133 <!-- ##### ARG GtkAction:visible-vertical ##### -->
134 <para>
135
136 </para>
137
138 <!-- ##### FUNCTION gtk_action_new ##### -->
139 <para>
140
141 </para>
142
143 @name: 
144 @label: 
145 @tooltip: 
146 @stock_id: 
147 @Returns: 
148
149
150 <!-- ##### FUNCTION gtk_action_get_name ##### -->
151 <para>
152
153 </para>
154
155 @action: 
156 @Returns: 
157
158
159 <!-- ##### FUNCTION gtk_action_is_sensitive ##### -->
160 <para>
161
162 </para>
163
164 @action: 
165 @Returns: 
166
167
168 <!-- ##### FUNCTION gtk_action_get_sensitive ##### -->
169 <para>
170
171 </para>
172
173 @action: 
174 @Returns: 
175
176
177 <!-- ##### FUNCTION gtk_action_set_sensitive ##### -->
178 <para>
179
180 </para>
181
182 @action: 
183 @sensitive: 
184
185
186 <!-- ##### FUNCTION gtk_action_is_visible ##### -->
187 <para>
188
189 </para>
190
191 @action: 
192 @Returns: 
193
194
195 <!-- ##### FUNCTION gtk_action_get_visible ##### -->
196 <para>
197
198 </para>
199
200 @action: 
201 @Returns: 
202
203
204 <!-- ##### FUNCTION gtk_action_set_visible ##### -->
205 <para>
206
207 </para>
208
209 @action: 
210 @visible: 
211
212
213 <!-- ##### FUNCTION gtk_action_activate ##### -->
214 <para>
215
216 </para>
217
218 @action: 
219
220
221 <!-- ##### FUNCTION gtk_action_create_icon ##### -->
222 <para>
223
224 </para>
225
226 @action: 
227 @icon_size: 
228 @Returns: 
229
230
231 <!-- ##### FUNCTION gtk_action_create_menu_item ##### -->
232 <para>
233
234 </para>
235
236 @action: 
237 @Returns: 
238
239
240 <!-- ##### FUNCTION gtk_action_create_tool_item ##### -->
241 <para>
242
243 </para>
244
245 @action: 
246 @Returns: 
247
248
249 <!-- ##### FUNCTION gtk_action_create_menu ##### -->
250 <para>
251
252 </para>
253
254 @action: 
255 @Returns: 
256
257
258 <!-- ##### FUNCTION gtk_action_connect_proxy ##### -->
259 <para>
260
261 </para>
262
263 @action: 
264 @proxy: 
265
266
267 <!-- ##### FUNCTION gtk_action_disconnect_proxy ##### -->
268 <para>
269
270 </para>
271
272 @action: 
273 @proxy: 
274
275
276 <!-- ##### FUNCTION gtk_action_get_proxies ##### -->
277 <para>
278
279 </para>
280
281 @action: 
282 @Returns: 
283
284
285 <!-- ##### FUNCTION gtk_action_connect_accelerator ##### -->
286 <para>
287
288 </para>
289
290 @action: 
291
292
293 <!-- ##### FUNCTION gtk_action_disconnect_accelerator ##### -->
294 <para>
295
296 </para>
297
298 @action: 
299
300
301 <!-- ##### FUNCTION gtk_action_block_activate_from ##### -->
302 <para>
303
304 </para>
305
306 @action: 
307 @proxy: 
308
309
310 <!-- ##### FUNCTION gtk_action_unblock_activate_from ##### -->
311 <para>
312
313 </para>
314
315 @action: 
316 @proxy: 
317
318
319 <!-- ##### FUNCTION gtk_action_get_accel_path ##### -->
320 <para>
321
322 </para>
323
324 @action: 
325 @Returns: 
326
327
328 <!-- ##### FUNCTION gtk_action_set_accel_path ##### -->
329 <para>
330
331 </para>
332
333 @action: 
334 @accel_path: 
335
336
337 <!-- ##### FUNCTION gtk_action_get_accel_closure ##### -->
338 <para>
339
340 </para>
341
342 @action: 
343 @Returns: 
344
345
346 <!-- ##### FUNCTION gtk_action_set_accel_group ##### -->
347 <para>
348
349 </para>
350
351 @action: 
352 @accel_group: 
353
354