Index

Package: Actions

Description

package Actions is
Copyright (c) 2012 Kevin Wellwood All rights reserved. This source code is distributed under the Modified BSD License. For terms and conditions, see license.txt.

Classes

Action (abstract)

type Action is abstract new Object with private;

Ancestors:

Immediate Children:

Primitive operations:

Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Represents a specific instance of an action that occurred relative to a widget in the GUI, such as a click at a certain location on a widget, a toggle or press of a button, etc.

Simple_Action_Listener (abstract)

type Simple_Action_Listener is abstract new Limited_Object with null record;

Ancestors:

Immediate Children:

Widgets.Buttons.Simple_Listeners.Simple_Button_Listener
Widgets.Menu_Enumerations.Simple_Listeners.Simple_Enum_Listener
Widgets.Progress_Boards.Simple_Listeners.Simple_PBoard_Listener
Widgets.Simple_Key_Listeners.Simple_Key_Listener

Primitive operations:

Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.To_String (Inherited)
A Simple_Action_Listener is the abstract base class for light weight action listener objects that simply pass along an Action to an appropriate handler procedure. A Simple_Action_Listener is intended to be owned and deleted by the widget with which it is registered.

Types

Action_Id

type Action_Id is private;
Represents a type of action that can occur to a widget, such as a click, toggle, press, etc.

Action_Listener (abstract)

type Action_Listener is limited interface;
An interface from which all concrete Action_Listener interfaces are to be inherited from. This interface does not define any procedures because it is not used directly. The Action_Listener interface is useful for storing instances of different implementors of Action_Listeners in a common container.

A_Action_Listener

type A_Action_Listener is access all Action_Listener'Class;

Subprograms & Entries

=

function "="
( l, r: Action_Id ) return Boolean;

To_Action_Id

function To_Action_Id
( actName: String ) return Action_Id;
Converts 'actName' to its corresponding Action_Id value using a string hashing function.

Construct

procedure Construct
( this: access Action;
id: Action_Id;
source: not null access Widgets.Widget'Class );
All Actions have a type (represented by an Action_Id) and the widget that reported the action. Additional information about the action may be included, depending on the concrete Action class. A concrete Action class represents a set of action types that all share the same kind of action information, or come from the same class of Widget.

Get_Id

function Get_Id
( this: not null access Action'Class ) return Action_Id;
Returns the identity of the action. This is the specific type of action that occured at the source widget, like Click, Input_Entered, etc.

Get_Source

function Get_Source
( this: not null access Action'Class ) return access Widgets.Widget'Class;
Returns a reference to the widget that reported the action.