1
2@c %start of fragment
3
4@node GtkAction
5@chapter GtkAction
6An action which can be triggered by a menu or toolbar item
7
8@section Overview
9Actions represent operations that the user can be perform, along with some
10information how it should be presented in the interface. Each action provides
11methods to create icons, menu items and toolbar items representing itself.
12
13As well as the callback that is called when the action gets activated, the
14following also gets associated with the action: The action will also have some
15state information:
16
17a name (not translated, for path lookup)
18
19a label (translated, for display)
20
21an accelerator
22
23whether label indicates a stock id
24
25a tooltip (optional, translated)
26
27a toolbar label (optional, shorter than label)
28
29visible (shown/hidden)
30
31sensitive (enabled/disabled)
32
33Apart from regular actions, there are toggle actions, which can be toggled
34between two states and radio actions, of which only one in a group can be in the
35"active" state. Other actions can be implemented as @code{<gtk-action>}
36subclasses.
37
38Each action can have one or more proxy menu item, toolbar button or other proxy
39widgets. Proxies mirror the state of the action (text label, tooltip, icon,
40visible, sensitive, etc), and should change when the action's state changes.
41When the proxy is activated, it should activate its action.
42
43@section Usage
44@include defuns-gtkaction.xml.texi
45
46@c %end of fragment
47