Index

Package: Simple_Key_Listeners (generic)

Description

generic
    type Target (<>) is tagged limited private;
package Widgets.Simple_Key_Listeners is
The Simple_Key_Listener class provides a mechanism for registering any method of a class, matching a certain prototype, as a key action handler. Instantiate this package with the class and class-wide access type of an object that will handle key actions.

Classes

Target

type Target (<>) is tagged limited private;

Types

A_Handler

type A_Handler is access
        procedure( object : not null access Target'Class;
                   action : A_Key_Action );

Subprograms & Entries

Listener

function Listener
( key: Integer;
modifiers: Modifiers_Pattern;
id: Action_Id;
obj: access Target'Class;
handler: A_Handler ) return A_Key_Listener;
Creates a new Key_Listener object to forward 'id' actions from key 'key' with modifier keys matching 'modifiers' to the 'handler' method of 'obj'.

Listener

function Listener
( key: Integer;
id: Action_Id;
obj: access Target'Class;
handler: A_Handler ) return A_Key_Listener;
Creates a new Key_Listener object to forward 'id' actions from key 'key' to the 'handler' method of 'obj'.