Description
Actions represent operations that the user can perform, along with some
information on 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 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 Gtk_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.
Subprograms
-
procedure Gtk_New
(Action : out Gtk_Action;
Name : String;
Label : String;
Tooltip : String := "";
Stock_Id : String := "");
procedure Initialize
(Action : access Gtk_Action_Record'Class;
Name : String;
Label : String;
Tooltip : String := "";
Stock_Id : String := "");
-
function Convert (C_Object : System.Address) return Gtk_Action;
-
function Get_Type return GType;
-
procedure Activate (Action : access Gtk_Action_Record);
-
procedure Connect_Accelerator (Action : access Gtk_Action_Record);
procedure Disconnect_Accelerator (Action : access Gtk_Action_Record);
-
-
-
-
-
procedure Set_Accel_Path
(Action : access Gtk_Action_Record; Accel_Path : String);
function Get_Accel_Path (Action : access Gtk_Action_Record) return String;
-
function Get_Name (Action : access Gtk_Action_Record) return String;
-
procedure Set_Sensitive
(Action : access Gtk_Action_Record; Sensitive : Boolean);
function Get_Sensitive (Action : access Gtk_Action_Record) return Boolean;
-
function Is_Sensitive (Action : access Gtk_Action_Record) return Boolean;
-
procedure Set_Visible
(Action : access Gtk_Action_Record; Visible : Boolean);
function Get_Visible (Action : access Gtk_Action_Record) return Boolean;
-
function Is_Visible (Action : access Gtk_Action_Record) return Boolean;
Proxies
-
-
function Get_Proxies
(Action : access Gtk_Action_Record) return Gtk.Widget.Widget_SList.GSlist;
-