| ||||||||||||
| ||||||||||||
| ||||||||||||
Description | ||||||||||||
An action which can be triggered by a menu or toolbar item
| ||||||||||||
Synopsis | ||||||||||||
Detail | ||||||||||||
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:
The action will also have some state information:
Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the "active" state. Other actions can be implemented as Action 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. | ||||||||||||
Class Hierarchy | ||||||||||||
| GObject | +----Action | +----ToggleAction | ||||||||||||
Types | ||||||||||||
data Action | ||||||||||||
| ||||||||||||
class GObjectClass o => ActionClass o | ||||||||||||
| ||||||||||||
castToAction :: GObjectClass obj => obj -> Action | ||||||||||||
Constructors | ||||||||||||
actionNew | ||||||||||||
| ||||||||||||
Methods | ||||||||||||
actionGetName :: ActionClass self => self -> IO String | ||||||||||||
Returns the name of the action. | ||||||||||||
actionIsSensitive | ||||||||||||
| ||||||||||||
actionGetSensitive | ||||||||||||
| ||||||||||||
actionSetSensitive | ||||||||||||
| ||||||||||||
actionIsVisible | ||||||||||||
| ||||||||||||
actionGetVisible | ||||||||||||
| ||||||||||||
actionSetVisible | ||||||||||||
| ||||||||||||
actionActivate :: ActionClass self => self -> IO () | ||||||||||||
Emits the "activate" signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated. It can also be used to manually activate an action. | ||||||||||||
actionCreateMenuItem | ||||||||||||
| ||||||||||||
actionCreateToolItem | ||||||||||||
| ||||||||||||
actionConnectProxy | ||||||||||||
| ||||||||||||
actionDisconnectProxy | ||||||||||||
| ||||||||||||
actionGetProxies :: ActionClass self => self -> IO [Widget] | ||||||||||||
Returns the proxy widgets for an action. | ||||||||||||
actionConnectAccelerator :: ActionClass self => self -> IO () | ||||||||||||
Installs the accelerator for action if action has an accel path and group. See actionSetAccelPath and actionSetAccelGroup Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn't remove the accelerator until actionDisconnectAccelerator has been called as many times. | ||||||||||||
actionDisconnectAccelerator :: ActionClass self => self -> IO () | ||||||||||||
Undoes the effect of one call to actionConnectAccelerator. | ||||||||||||
actionGetAccelPath | ||||||||||||
| ||||||||||||
actionSetAccelPath | ||||||||||||
| ||||||||||||
actionSetAccelGroup :: ActionClass self => self -> AccelGroup -> IO () | ||||||||||||
Sets the AccelGroup in which the accelerator for this action will be installed. | ||||||||||||
Attributes | ||||||||||||
actionName :: ActionClass self => Attr self String | ||||||||||||
A unique name for the action. Default value: "" | ||||||||||||
actionLabel :: ActionClass self => Attr self String | ||||||||||||
The label used for menu items and buttons that activate this action. Default value: "" | ||||||||||||
actionShortLabel :: ActionClass self => Attr self String | ||||||||||||
A shorter label that may be used on toolbar buttons. Default value: "" | ||||||||||||
actionTooltip :: ActionClass self => Attr self (Maybe String) | ||||||||||||
A tooltip for this action. Default value: Nothing | ||||||||||||
actionStockId :: ActionClass self => Attr self (Maybe String) | ||||||||||||
The stock icon displayed in widgets representing this action. Default value: Nothing | ||||||||||||
actionVisibleHorizontal :: ActionClass self => Attr self Bool | ||||||||||||
Whether the toolbar item is visible when the toolbar is in a horizontal orientation. Default value: True | ||||||||||||
actionVisibleOverflown :: ActionClass self => Attr self Bool | ||||||||||||
When True, toolitem proxies for this action are represented in the toolbar overflow menu. Default value: True
| ||||||||||||
actionVisibleVertical :: ActionClass self => Attr self Bool | ||||||||||||
Whether the toolbar item is visible when the toolbar is in a vertical orientation. Default value: True | ||||||||||||
actionIsImportant :: ActionClass self => Attr self Bool | ||||||||||||
Whether the action is considered important. When True, toolitem proxies for this action show text in ToolbarBothHoriz mode. Default value: False | ||||||||||||
actionHideIfEmpty :: ActionClass self => Attr self Bool | ||||||||||||
When True, empty menu proxies for this action are hidden. Default value: True | ||||||||||||
actionSensitive :: ActionClass self => Attr self Bool | ||||||||||||
Whether the action is enabled. Default value: True
| ||||||||||||
actionVisible :: ActionClass self => Attr self Bool | ||||||||||||
Whether the action is visible. Default value: True
| ||||||||||||
actionAccelPath :: ActionClass self => ReadWriteAttr self (Maybe String) String | ||||||||||||
'accelPath' property. See actionGetAccelPath and actionSetAccelPath
| ||||||||||||
Signals | ||||||||||||
onActionActivate :: ActionClass self => self -> IO () -> IO (ConnectId self) | ||||||||||||
The "activate" signal is emitted when the action is activated. | ||||||||||||
afterActionActivate :: ActionClass self => self -> IO () -> IO (ConnectId self) | ||||||||||||
Produced by Haddock version 0.7 |