Description
An action which can be triggered by a menu or toolbar itemMethods and Functions
gtkActionNew(name = NULL, label = NULL, tooltip = NULL, stock.id = NULL)
gtkActionGetName(object)
gtkActionIsSensitive(object)
gtkActionGetSensitive(object)
gtkActionSetSensitive(object, sensitive)
gtkActionIsVisible(object)
gtkActionGetVisible(object)
gtkActionSetVisible(object, visible)
gtkActionActivate(object)
gtkActionCreateIcon(object, icon.size)
gtkActionCreateMenuItem(object)
gtkActionCreateToolItem(object)
gtkActionCreateMenu(object)
gtkActionConnectProxy(object, proxy)
gtkActionDisconnectProxy(object, proxy)
gtkActionGetProxies(object)
gtkActionConnectAccelerator(object)
gtkActionDisconnectAccelerator(object)
gtkActionBlockActivateFrom(object, proxy)
gtkActionUnblockActivateFrom(object, proxy)
gtkActionGetAccelPath(object)
gtkActionSetAccelPath(object, accel.path)
gtkActionGetAccelClosure(object)
gtkActionSetAccelGroup(object, accel.group)
gtkAction(name = NULL, label = NULL, tooltip = NULL, stock.id = NULL)
Hierarchy
GObject
+----GtkAction
+----GtkToggleAction
+----GtkRecentActionDetailed Description
Actions represent operations that the user can be perform, along with
some information how it should be presented in the interface. Each action
provides methods to create icons, menu items and toolbar items representing
itself.
As well as the callback that is called when the action gets activated, the
following also gets associated with the action:
- a name (not translated, for path lookup)
- a label (translated, for display)
- an accelerator
- whether label indicates a stock id
- a tooltip (optional, translated)
- a toolbar label (optional, shorter than label)
The action will also have some state information:
- visible (shown/hidden)
- sensitive (enabled/disabled)
Apart from regular actions, there are GtkToggleAction, which can be toggled between two states and GtkRadioAction, of which only one in a group
can be in the "active" state. Other actions can be implemented as GtkAction
subclasses.
Each action can have one or more proxy menu item, toolbar button or
other proxy widgets. Proxies mirror the state of the action (text
label, tooltip, icon, visible, sensitive, etc), and should change when
the action's state changes. When the proxy is activated, it should
activate its action.Convenient Construction
gtkAction
is the equivalent of gtkActionNew
.References
http://developer.gnome.org/doc/API/2.0/gtk/GtkAction.html