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:

Actions.Construct (Inherited)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.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:

Add_Listener
Construct (overriding Widgets.Construct)
Draw_Content
Get_Min_Height (overriding Widgets.Get_Min_Height)
Get_Min_Width (overriding Widgets.Get_Min_Width)
Objects.Construct (Inherited)
On_Blur (overriding Widgets.On_Blur)
On_Disabled (overriding Widgets.On_Disabled)
On_Enabled (overriding Widgets.On_Enabled)
On_Focus (overriding Widgets.On_Focus)
On_Key_Press (overriding Widgets.On_Key_Press)
Processes.Get_Process_Name (Inherited)
Processes.Tick (Inherited)
Tick
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Delete (Inherited)
Widgets.Draw (Inherited)
Widgets.Draw_Content (Inherited)
Widgets.Find_Widget_At (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Process_Name (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Handle_Rooted (Inherited)
Widgets.Handle_Shown (Inherited)
Widgets.Is_Rooted (Inherited)
Widgets.Is_Showing (Inherited)
Widgets.On_Click (Inherited)
Widgets.On_Descendant_Shown (Inherited)
Widgets.On_Enter (Inherited)
Widgets.On_Exit (Inherited)
Widgets.On_Key_Release (Inherited)
Widgets.On_Key_Typed (Inherited)
Widgets.On_Mouse_Held (Inherited)
Widgets.On_Mouse_Move (Inherited)
Widgets.On_Mouse_Press (Inherited)
Widgets.On_Mouse_Release (Inherited)
Widgets.On_Mouse_Scroll (Inherited)
Widgets.On_Resize (Inherited)
Widgets.On_Rooted (Inherited)
Widgets.On_Shown (Inherited)
Widgets.Pack (Inherited)
Widgets.Set_Border (Inherited)
Widgets.Set_Color (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.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

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.