Index

Package: Simple_Listeners (generic)

Description

generic
    type Target (<>) is tagged limited private;
package Widgets.Menu_Items.Simple_Listeners is
The Simple_Menu_Listener class provides a mechanism for registering any method of a class, matching a certain prototype, as a menu action handler. Instantiate this package with the class and class-wide access type of an object that will handle menu 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_Menu_Action );

Subprograms & Entries

Listener

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

Listener

function Listener
( obj: access Target'Class;
handler: not null A_Handler ) return A_Menu_Listener;
Invokes the 'handler' method of 'obj' for Menu_Selected actions.