Index

Package: Input_Boxes

Description

package Widgets.Input_Boxes is

Classes

Input_Action

type Input_Action is new Action with private;

Ancestors:

Primitive operations:

Actions.Construct (Inherited)
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)

Input_Box

type Input_Box is new Widget with private;

Ancestors:

Primitive operations:

Add_Listener
Add_Listener
Construct (overriding Widgets.Construct)
Dispatch_Action
Draw_Content (overriding Widgets.Draw_Content)
Handle_Key_Held (overriding Widgets.Handle_Key_Held)
Handle_Key_Press (overriding Widgets.Handle_Key_Press)
Handle_Key_Release (overriding Widgets.Handle_Key_Release)
Handle_Mouse_Press (overriding Widgets.Handle_Mouse_Press)
Objects.Construct (Inherited)
Pack (overriding Widgets.Pack)
Remove_Listener
Set_Constraint
Set_Max_Length
Widgets.Activate_Popup (Inherited)
Widgets.Bring_To_Front (Inherited)
Widgets.Deactivate_Popup (Inherited)
Widgets.Delete (Inherited)
Widgets.Draw (Inherited)
Widgets.Find_Widget (Inherited)
Widgets.Get_Color (Inherited)
Widgets.Get_Min_Height (Inherited)
Widgets.Get_Min_Width (Inherited)
Widgets.Get_View (Inherited)
Widgets.Get_Window (Inherited)
Widgets.Handle_Ancestor_Hidden (Inherited)
Widgets.Handle_Ancestor_Unhidden (Inherited)
Widgets.Handle_Blur (Inherited)
Widgets.Handle_Click (Inherited)
Widgets.Handle_Descendant_Hidden (Inherited)
Widgets.Handle_Descendant_Unhidden (Inherited)
Widgets.Handle_Enter (Inherited)
Widgets.Handle_Exit (Inherited)
Widgets.Handle_Focus (Inherited)
Widgets.Handle_Mouse_Held (Inherited)
Widgets.Handle_Mouse_Move (Inherited)
Widgets.Handle_Mouse_Release (Inherited)
Widgets.Handle_Mouse_Scroll (Inherited)
Widgets.Handle_Resize (Inherited)
Widgets.Set_Color (Inherited)
Widgets.Set_Dirty (Inherited)
Widgets.Set_Enabled (Inherited)
Widgets.Set_Focused (Inherited)
Widgets.Set_Parent (Inherited)
Widgets.Set_Visible (Inherited)
Widgets.Set_Zoom (Inherited)
Widgets.To_String (Inherited)
Widgets.Translate_To_Content (Inherited)
Widgets.Translate_To_Window (Inherited)

Types

A_Input_Action

type A_Input_Action is access all Input_Action'Class;

Input_Listener (abstract)

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

A_Input_Listener

type A_Input_Listener is access all Input_Listener'Class;

A_Input_Handler

type A_Input_Handler is
        access procedure( action : A_Input_Action );

A_Constrain_Func

type A_Constrain_Func is
        access function( curstr, newstr : String ) return String;
the returned string is constrained according to the function's logic curstr: the current value newstr: the new value to constrain

A_Input_Box

type A_Input_Box is access all Input_Box'Class;

Constants & Global variables

Subprograms & Entries

Handle_Action (abstract)

procedure Handle_Action
( this: access Input_Listener;
action: A_Input_Action ) is abstract;

Create_Input_Box

function Create_Input_Box
( view: not null access Game_Views.Game_View'Class;
id: String ) return A_Input_Box;

Add_Listener

procedure Add_Listener
( this: access Input_Box;
listener: not null A_Input_Listener );

Add_Listener

procedure Add_Listener
( this: access Input_Box;
handler: not null A_Input_Handler );

Get_Text

function Get_Text
( this: access Input_Box ) return String;

Remove_Listener

procedure Remove_Listener
( this: access Input_Box;
listener: not null A_Input_Listener );

Set_Constraint

procedure Set_Constraint
( this: access Input_Box;
constraint: A_Constrain_Func );

Set_Max_Length

procedure Set_Max_Length
( this: access Input_Box;
maxlen: Positive );

Set_Text

procedure Set_Text
( this: access Input_Box;
text: String );