Index

Package: Menu_Enumerations

Description

package Widgets.Menu_Enumerations 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

Enum_Action

type Enum_Action is new Action with private;

Ancestors:

Primitive operations:

Adjust (Inherited)
Construct (Inherited)
Construct (Inherited)
Construct
Delete (Inherited)
Object_Read (Inherited)
Object_Write (Inherited)
To_String (Inherited)
Represents a widget action involving an Menu_Enumeration such as a selection changed event.

Menu_Enumeration

type Menu_Enumeration is new Widget and Animated with private;

Ancestors:

Primitive operations:

Activate_Popup (Inherited)
Add_Listener
Bring_To_Front (Inherited)
Construct (overriding Construct)
Construct (Inherited)
Delete (Inherited)
Draw (Inherited)
Draw_Content
Draw_Content (Inherited)
Find_Widget_At (Inherited)
Get_Color (Inherited)
Get_Min_Height (overriding Get_Min_Height)
Get_Min_Width (overriding Get_Min_Width)
Get_Process_Name (Inherited)
Get_Process_Name (Inherited)
Get_View (Inherited)
Get_Window (Inherited)
Handle_Blur (overriding Handle_Blur)
Handle_Click (Inherited)
Handle_Descendant_Shown (Inherited)
Handle_Disabled (overriding Handle_Disabled)
Handle_Enabled (overriding Handle_Enabled)
Handle_Enter (Inherited)
Handle_Exit (Inherited)
Handle_Focus (overriding Handle_Focus)
Handle_Key_Held (Inherited)
Handle_Key_Press (overriding Handle_Key_Press)
Handle_Key_Release (Inherited)
Handle_Mouse_Held (Inherited)
Handle_Mouse_Move (Inherited)
Handle_Mouse_Press (Inherited)
Handle_Mouse_Release (Inherited)
Handle_Mouse_Scroll (Inherited)
Handle_Resize (Inherited)
Handle_Rooted (Inherited)
Handle_Shown (Inherited)
Is_Rooted (Inherited)
Is_Showing (Inherited)
Pack (Inherited)
Set_Color (Inherited)
Set_Dirty (Inherited)
Set_Parent (Inherited)
Set_Zoom (Inherited)
Tick (Inherited)
Tick
To_String (Inherited)
Translate_To_Content (Inherited)
Translate_To_Window (Inherited)
A Menu_Enumeration for Keen is a simple select-enumeration widget designed to match the look and feel of the options in the menus, with an animated glowing dot next to the focus menu item.

Types

A_Enum_Action

type A_Enum_Action is access all Enum_Action'Class;

Enum_Listener (abstract)

type Enum_Listener is limited interface and Action_Listener;
This is the interface to implement in order to listen to enum actions. When an enum action occurs, the listener will be notified of the type of action performed and the Menu_Enumeration box that performed the action.

A_Enum_Listener

type A_Enum_Listener is access all Enum_Listener'Class;

A_Menu_Enumeration

type A_Menu_Enumeration is access all Menu_Enumeration'Class;

Constants & Global variables

Changed (Action_Id)

Changed : constant Action_Id;

Subprograms & Entries

Get_Index

function Get_Index
( this: not null access Enum_Action'Class ) return Natural;

Get_Text

function Get_Text
( this: not null access Enum_Action'Class ) return String;

Handle_Action (abstract)

procedure Handle_Action
( this: access Enum_Listener;
action: A_Enum_Action ) is abstract;
Handles the enum action 'action'.

Create_Menu_Enum

function Create_Menu_Enum
( view: not null access Game_Views.Game_View'Class;
id: String ) return A_Menu_Enumeration;
Creates a new menu enumeration.

Add_Listener

procedure Add_Listener
( this: access Menu_Enumeration;
listener: not null A_Enum_Listener );

Add_Option

procedure Add_Option
( this: not null access Menu_Enumeration'Class;
text: String );

Get_Index

function Get_Index
( this: not null access Menu_Enumeration'Class ) return Natural;

Get_Text

function Get_Text
( this: not null access Menu_Enumeration'Class ) return String;

Set_Index

procedure Set_Index
( this: not null access Menu_Enumeration'Class;
index: Positive;
fireAction: Boolean := True );
If the index does not exist, nothing will happen. Set 'fireAction' to True to dispatch a Changed action if the index changes.