GtkAction
An action which can be triggered by a menu or toolbar item.
Object Hierarchy
Direct Subclasses
Description
Actions are basically some operation that you want the user to perform.
Hence, actions are usually linked to some event that triggers it. Each
action provides methods to create icons, menu items and toolbar items that
represent itself.
GtkAction allows you to create such actions, use
methods to represent it, and actually perform that action when the event
occurs. The following may be associated with an action:
- A name (This is not transalated and is for internal use of the
programmer)
- A label (Translated and displayed on the screen)
- An accelerator (The "shortcut-key" that triggers the action)
- Whether or not the label indicates a stock ID
- A tooltip (Translated and displyed on mouse over)
- A toolbar label (Translated and shorter than a label)
- The Callback (Function that specifies the action to be
performed
The action will also have certain state information attached to it:
- Visible (Show or Hide the action)
- Sensitive (Enable or Disable the action)
Each action may have one or more proxies, such as menu items, toolbar
buttons or other such proxy widgets. Proxies basically mirror the state
of the action (text label, tooltip, icon, visible etc.) and should change
when the action's state changes. When the proxy is activated, it should
activate its action (through the associated callback).
See also:
GtkToggleAction and
GtkRadioAction.
Constructors
GtkAction (string
name, string
label, string
tooltip, string
stock_id);
--
Creates an action associated to the various parameters.
Signals
"activate"
Emitted when the action is triggered (or activated!)