Index

Package: Simple_Listeners (generic)

Description

generic
    type Target (<>) is tagged limited private;
package Widgets.Buttons.Simple_Listeners is
The Simple_Button_Listener class provides a mechanism for registering any method of a class, matching a certain prototype, as a button action handler. The two handler prototypes are: a simple procedure in a target class, or a procedure that also accepts a Button_Action as an argument. Instantiate this package with the class and class-wide access type of an object that will handle button actions.

Classes

Target

type Target (<>) is tagged limited private;

Types

A_Handler1

type A_Handler1 is access
        procedure( object : not null access Target'Class );

A_Handler2

type A_Handler2 is access
        procedure( object : not null access Target'Class;
                   action : A_Button_Action );

Subprograms & Entries

Listener

function Listener
( id: Action_Id;
obj: access Target'Class;
handler: not null A_Handler1 ) return A_Button_Listener;
Invokes the 'handler' method of 'obj' for button actions matching 'id'.

Listener

function Listener
( id: Action_Id;
obj: access Target'Class;
handler: not null A_Handler2 ) return A_Button_Listener;
Invokes the 'handler' method of 'obj' for button actions matching 'id'.

Listener

function Listener
( obj: access Target'Class;
handler: not null A_Handler1 ) return A_Button_Listener;
Invokes the 'handler' method of 'obj' for Click button actions.

Listener

function Listener
( obj: access Target'Class;
handler: not null A_Handler2 ) return A_Button_Listener;
Invokes the 'handler' method of 'obj' for Click button actions.