Index

Package: Game_Views

Description

package Game_Views is

Classes

Game_View (abstract)

type Game_View is abstract new Limited_Object and Event_Listener and Process with private;

Ancestors:

Immediate Children:

Game_Views.Keen.Keen_View

Primitive operations:

Construct (overriding Objects.Construct)
Delete (overriding Objects.Delete)
Events.Listeners.To_String (Inherited)
Get_Process_Name
Handle_Close_Request
Handle_Event (overriding Events.Listeners.Handle_Event)
Handle_Loading
Handle_Paused
Objects.To_String (Inherited)
Processes.Get_Process_Name (Inherited)
Processes.Tick (Inherited)
Tick

Types

A_Game_View

type A_Game_View is access all Game_View'Class;

Constants & Global variables

DUPLICATE_ID

DUPLICATE_ID,
    ID_NOT_FOUND : exception;

ID_NOT_FOUND

ID_NOT_FOUND : exception;

Subprograms & Entries

Create_Game_View

function Create_Game_View
( xres, yres: Positive;
scale: Positive ) return A_Game_View;

Attach

procedure Attach
( this: access Game_View;
process: not null A_Process );
Attachs a process to the view's process manager.

Detach

procedure Detach
( this: access Game_View;
process: not null A_Process );
Detaches a process from the view's process manager.

Get_Corral

function Get_Corral
( this: not null access Game_View'Class ) return A_Corral;
Returns the view's corral. The view creates its corral at construction so this will never return null.

Get_Widget

function Get_Widget
( this: access Game_View;
id: String ) return A_Widget;
Returns a widget in the registry by id. Raises exception ID_NOT_FOUND if the widget does not exist.

Get_Window

function Get_Window
( this: access Game_View ) return A_Window;
Returns the view's Window widget. This may return null if the window has not yet been set.

Register

procedure Register
( this: access Game_View;
widget: not null A_Widget );
Adds a widget to the view's widget registry. Raises exception DUPLICATE_ID if a widget with the same id already exists.

Set_Window

procedure Set_Window
( this: access Game_View;
window: in out A_Window );
Sets the view's Window widget. If window is null, the view's window will be removed. The view's Renderer is deleted and recreated when the window is changed. If this procedure raises an exception, the view will be left left without a window and the given 'window' will remain unchanged.

Start

procedure Start
( this: access Game_View );
Starts the game view, attaching it to the framework. This will attach event listeners, processes, start the view's subsystems (audio, etc) and begin running the view's process manager.

Stop

procedure Stop
( this: access Game_View );
Stops the game view, detaching it from the framework. This must be called after Start and before deleting the object.

Unregister

procedure Unregister
( this: access Game_View;
id: String );
Removes a widget from the view's registry. If the widget was not previously registered, nothing happens.

Delete

procedure Delete
( this: in out A_Game_View );