]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkaction.sgml
65cbf4f156ad08d2cbe187d0e040d9fd0dff3ff7
[~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:is-important ##### -->
79 <para>
80
81 </para>
82
83 <!-- ##### ARG GtkAction:label ##### -->
84 <para>
85
86 </para>
87
88 <!-- ##### ARG GtkAction:name ##### -->
89 <para>
90
91 </para>
92
93 <!-- ##### ARG GtkAction:sensitive ##### -->
94 <para>
95
96 </para>
97
98 <!-- ##### ARG GtkAction:short-label ##### -->
99 <para>
100
101 </para>
102
103 <!-- ##### ARG GtkAction:stock-id ##### -->
104 <para>
105
106 </para>
107
108 <!-- ##### ARG GtkAction:tooltip ##### -->
109 <para>
110
111 </para>
112
113 <!-- ##### ARG GtkAction:visible ##### -->
114 <para>
115
116 </para>
117
118 <!-- ##### ARG GtkAction:visible-horizontal ##### -->
119 <para>
120
121 </para>
122
123 <!-- ##### ARG GtkAction:visible-overflown ##### -->
124 <para>
125
126 </para>
127
128 <!-- ##### ARG GtkAction:visible-vertical ##### -->
129 <para>
130
131 </para>
132
133 <!-- ##### FUNCTION gtk_action_new ##### -->
134 <para>
135
136 </para>
137
138 @name: 
139 @label: 
140 @tooltip: 
141 @stock_id: 
142 @Returns: 
143
144
145 <!-- ##### FUNCTION gtk_action_get_name ##### -->
146 <para>
147
148 </para>
149
150 @action: 
151 @Returns: 
152
153
154 <!-- ##### FUNCTION gtk_action_is_sensitive ##### -->
155 <para>
156
157 </para>
158
159 @action: 
160 @Returns: 
161
162
163 <!-- ##### FUNCTION gtk_action_get_sensitive ##### -->
164 <para>
165
166 </para>
167
168 @action: 
169 @Returns: 
170
171
172 <!-- ##### FUNCTION gtk_action_set_sensitive ##### -->
173 <para>
174
175 </para>
176
177 @action: 
178 @sensitive: 
179
180
181 <!-- ##### FUNCTION gtk_action_is_visible ##### -->
182 <para>
183
184 </para>
185
186 @action: 
187 @Returns: 
188
189
190 <!-- ##### FUNCTION gtk_action_get_visible ##### -->
191 <para>
192
193 </para>
194
195 @action: 
196 @Returns: 
197
198
199 <!-- ##### FUNCTION gtk_action_set_visible ##### -->
200 <para>
201
202 </para>
203
204 @action: 
205 @visible: 
206
207
208 <!-- ##### FUNCTION gtk_action_activate ##### -->
209 <para>
210
211 </para>
212
213 @action: 
214
215
216 <!-- ##### FUNCTION gtk_action_create_icon ##### -->
217 <para>
218
219 </para>
220
221 @action: 
222 @icon_size: 
223 @Returns: 
224
225
226 <!-- ##### FUNCTION gtk_action_create_menu_item ##### -->
227 <para>
228
229 </para>
230
231 @action: 
232 @Returns: 
233
234
235 <!-- ##### FUNCTION gtk_action_create_tool_item ##### -->
236 <para>
237
238 </para>
239
240 @action: 
241 @Returns: 
242
243
244 <!-- ##### FUNCTION gtk_action_connect_proxy ##### -->
245 <para>
246
247 </para>
248
249 @action: 
250 @proxy: 
251
252
253 <!-- ##### FUNCTION gtk_action_disconnect_proxy ##### -->
254 <para>
255
256 </para>
257
258 @action: 
259 @proxy: 
260
261
262 <!-- ##### FUNCTION gtk_action_get_proxies ##### -->
263 <para>
264
265 </para>
266
267 @action: 
268 @Returns: 
269
270
271 <!-- ##### FUNCTION gtk_action_connect_accelerator ##### -->
272 <para>
273
274 </para>
275
276 @action: 
277
278
279 <!-- ##### FUNCTION gtk_action_disconnect_accelerator ##### -->
280 <para>
281
282 </para>
283
284 @action: 
285
286
287 <!-- ##### FUNCTION gtk_action_block_activate_from ##### -->
288 <para>
289
290 </para>
291
292 @action: 
293 @proxy: 
294
295
296 <!-- ##### FUNCTION gtk_action_unblock_activate_from ##### -->
297 <para>
298
299 </para>
300
301 @action: 
302 @proxy: 
303
304
305 <!-- ##### FUNCTION gtk_action_get_accel_path ##### -->
306 <para>
307
308 </para>
309
310 @action: 
311 @Returns: 
312
313
314 <!-- ##### FUNCTION gtk_action_set_accel_path ##### -->
315 <para>
316
317 </para>
318
319 @action: 
320 @accel_path: 
321
322
323 <!-- ##### FUNCTION gtk_action_get_accel_closure ##### -->
324 <para>
325
326 </para>
327
328 @action: 
329 @Returns: 
330
331
332 <!-- ##### FUNCTION gtk_action_set_accel_group ##### -->
333 <para>
334
335 </para>
336
337 @action: 
338 @accel_group: 
339
340