TBasicActionLink

[Properties (by Name)][Methods (by Name)][Events (by Name)]

Link between actions and action clients (e.g. controls)

Declaration

Source position: classesh.inc line 2152

Type
  TBasicActionLink = class (TObject)
  private
    FOnChange : TNotifyEvent;
  protected
    FAction : TBasicAction;
    procedure AssignClient(AClient: TObject);  Virtual;
    procedure Change;  Virtual;
    function IsOnExecuteLinked : Boolean;  Virtual;
    procedure SetAction(Value: TBasicAction);  Virtual;
    procedure SetOnExecute(Value: TNotifyEvent);  Virtual;
  public
    constructor Create(AClient: TObject);  Virtual;
    destructor Destroy;  Override;
    function Execute(AComponent: TComponent) : Boolean;  Virtual;
    function Update : Boolean;  Virtual;
    Action : TBasicAction;
    OnChange : TNotifyEvent;
  end
  ;

Description

TBasicActionLink links an Action to its clients. With each client for an action, a TBasicActionLink class is instantiated to handle the communication between the action and the client. It passes events between the action and its clients, and thus presents the action with a uniform interface to the clients.

An application programmer should never use a TBasicActionLink instance directly; They are created automatically when an action is associated with a component. Component programmers should create specialized descendants of TBasicActionLink which communicate changes in the action to the component.

Members

Member Type Visibility Description
Action Property public The action to which the link was assigned.
AssignClient Method protected Assigns a control (client) to the action link.
Change Method protected Executed whenever the Action is changed.
Create Method public Creates a new instance of the TBasicActionLink class
Destroy Method public Destroys the TBasicActionLink instance.
Execute Method public Calls the action's Execute method.
FAction Field protected The action with which this link is associated
FOnChange Field private
IsOnExecuteLinked Method protected Returns whether the client has it's OnExecute property linked.
OnChange Property public Event handler triggered when the action's properties change
SetAction Method protected Sets the action with which the actionlink is associated.
SetOnExecute Method protected Assigns the OnExecute handler to the client
Update Method public Calls the action's Update method

Inheritance

Class Description
TBasicActionLink Link between actions and action clients (e.g. controls)

See also

Name Description
TBasicAction Abstract base class for all Actions.
TBasicAction Abstract base class for all Actions.
TBasicAction Abstract base class for all Actions.
TNotifyEvent Standard event handler type.
TNotifyEvent Standard event handler type.