Index

Package: Applications

Description

package Applications is

Classes

Application (abstract)

type Application is abstract new Object with private;

Ancestors:

Immediate Children:

Applications.Keen.Keen_Application

Primitive operations:

Adjust (overriding Objects.Adjust)
Construct (overriding Objects.Construct)
Delete (overriding Objects.Delete)
Get_Window_Title
Init
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)

References:

applications.ads:20:10 (declaration)
applications.adb:158:37 (reference)
applications.adb:169:36 (reference)
applications.adb:200:40 (reference)
applications.adb:215:37 (reference)
applications.adb:223:48 (reference)
applications.adb:235:42 (reference)
applications.adb:532:34 (reference)
applications.adb:562:49 (reference)
applications.ads:21:38 (reference)
applications.ads:39:36 (reference)
applications.ads:44:38 (reference)
applications.ads:47:48 (reference)
applications.ads:52:46 (reference)
applications.ads:57:34 (reference)
applications.ads:62:34 (reference)
applications.ads:67:49 (reference)
applications.ads:88:10 (full declaration)
applications.ads:105:37 (reference)
applications.ads:107:40 (reference)
applications.ads:109:37 (reference)
applications.ads:113:42 (reference)
applications-keen.adb:25:9 (reference)
applications-keen.ads:8:34 (reference)
An Application is a global singleton class that implements an application's initialization, runtime and shutdown behavior, and provides some meta information about it. If an application's initialization fails, it will not be run or closed.

Types

A_Application

type A_Application is access all Application'Class;

References:

applications.ads:21:10 (declaration)
applications.adb:50:37 (reference)
applications.adb:57:29 (reference)
applications.adb:63:20 (reference)
applications.adb:71:37 (reference)
applications.adb:99:29 (reference)
applications.adb:117:15 (reference)
applications.adb:137:37 (reference)
applications.adb:138:15 (reference)
applications.adb:264:28 (reference)
applications.adb:265:50 (reference)
applications.adb:293:27 (reference)
applications.adb:571:37 (reference)
applications.ads:30:37 (reference)
applications.ads:120:37 (reference)
applications.ads:126:46 (reference)
engine.adb:16:16 (reference)
applications-keen.adb:13:40 (reference)
applications-keen.adb:14:25 (reference)

Constants & Global variables

NO_ERROR

NO_ERROR                   : constant := 0;

References:

applications.ads:13:5 (declaration)
applications.adb:563:44 (reference)
applications.ads:68:44 (reference)
applications.ads:101:38 (reference)
Several predefined values returned by Run

ERROR_UNEXPECTED_EXCEPTION

ERROR_UNEXPECTED_EXCEPTION : constant := 1;

References:

applications.ads:14:5 (declaration)
processes-managers.adb:429:35 (reference)

INIT_EXCEPTION

INIT_EXCEPTION : exception;

References:

applications.ads:73:5 (declaration)
applications.adb:251:23 (reference)
applications.adb:258:23 (reference)
applications.adb:430:23 (reference)
applications.adb:442:23 (reference)
applications.adb:457:23 (reference)
applications.adb:464:23 (reference)
applications.adb:474:23 (reference)
applications.adb:500:23 (reference)
This can be raised by initialization code in other packages to indicate that application initialization has failed. This exception is not raised by the Application class.

USE_ERROR

USE_ERROR : exception;

References:

applications.ads:78:5 (declaration)
applications.adb:81:27 (reference)
applications.adb:536:19 (reference)
applications.adb:538:19 (reference)
This can be raised by the application class to indicate that it is being misused. For example, calling Stop before calling Init will result in a USE_ERROR exception.

Subprograms & Entries

Create_Application

procedure Create_Application;

References:

applications.ads:27:15 (declaration)
applications.adb:116:15 (body)
applications.adb:123:9 (label)

Calls:

Applications.Create defined at applications.adb:50:19
Applications.Get defined at applications.adb:57:18
Forces creation of the global application without returning a reference. If the application already exists, nothing will change.

Get_Application

function Get_Application return A_Application;

References:

applications.ads:30:14 (declaration)
applications.adb:137:14 (body)
applications.adb:145:9 (label)
engine.adb:19:16 (reference)
game_views.adb:187:13 (reference)
processes-managers.adb:429:13 (reference)
widgets-buttons-checkboxes.adb:29:41 (reference)
widgets-buttons-checkboxes.adb:123:22 (reference)
widgets-buttons-checkboxes.adb:142:22 (reference)
widgets-buttons-checkboxes.adb:183:31 (reference)
widgets-buttons.adb:73:41 (reference)
widgets-buttons.adb:131:22 (reference)
widgets-buttons.adb:152:22 (reference)
widgets-buttons.adb:213:26 (reference)
widgets-containers-panels-popups.adb:62:47 (reference)
widgets-containers-panels-popups.adb:85:28 (reference)
widgets-containers-panels.adb:16:38 (reference)
widgets-containers-panels.adb:66:28 (reference)
widgets-containers-panels.adb:76:37 (reference)
widgets-containers-panels.adb:110:22 (reference)
widgets-containers-panels.adb:134:22 (reference)
widgets-containers-panels.adb:172:46 (reference)
widgets-containers-panels.adb:197:19 (reference)
widgets-containers-panels.adb:210:54 (reference)
widgets-containers-panels.adb:237:54 (reference)
widgets-containers-pulldown_menus.adb:58:9 (reference)
widgets-containers-scroll_panes.adb:153:38 (reference)
widgets-containers.adb:135:24 (reference)
widgets-input_boxes.adb:78:37 (reference)
widgets-input_boxes.adb:195:37 (reference)
widgets-input_boxes.adb:377:37 (reference)
widgets-labels.adb:42:37 (reference)
widgets-labels.adb:75:22 (reference)
widgets-labels.adb:96:22 (reference)
widgets-labels.adb:141:26 (reference)
widgets-menu_items-menu_checkboxes.adb:39:39 (reference)
widgets-menu_items.adb:49:29 (reference)
widgets-menu_items.adb:87:39 (reference)
widgets-menu_items.adb:139:41 (reference)
widgets-menu_items.adb:156:20 (reference)
widgets-menubars.adb:47:30 (reference)
widgets-menubars.adb:94:41 (reference)
widgets-menubars.adb:284:49 (reference)
widgets-scrollbars.adb:77:40 (reference)
widgets-scrollbars.adb:187:40 (reference)
widgets.adb:166:37 (reference)
widgets.adb:323:28 (reference)
game_views-keen.adb:574:41 (reference)

Called by:

Engine.Engine_Main defined at engine.ads:9:14
Game_Views.Handle_Event defined at game_views.ads:123:15
Game_Views.Keen.Set_Loading_Text defined at game_views-keen.ads:107:15
Processes.Managers.Ticker_Task defined at processes-managers.ads:131:15
Widgets.Buttons.Checkboxes.Draw_Content defined at widgets-buttons-checkboxes.ads:27:15
Widgets.Buttons.Checkboxes.Get_Min_Height defined at widgets-buttons-checkboxes.ads:29:14
Widgets.Buttons.Checkboxes.Get_Min_Width defined at widgets-buttons-checkboxes.ads:31:14
Widgets.Buttons.Checkboxes.Set_Check_Icon defined at widgets-buttons-checkboxes.ads:14:15
Widgets.Buttons.Draw_Content defined at widgets-buttons.ads:114:15
Widgets.Buttons.Get_Min_Height defined at widgets-buttons.ads:116:14
Widgets.Buttons.Get_Min_Width defined at widgets-buttons.ads:118:14
Widgets.Buttons.Set_Icon defined at widgets-buttons.ads:56:15
Widgets.Construct defined at widgets.ads:499:15
Widgets.Containers.Draw defined at widgets-containers.ads:66:15
Widgets.Containers.Panels.Construct defined at widgets-containers-panels.ads:38:15
Widgets.Containers.Panels.Draw_Content defined at widgets-containers-panels.ads:45:15
Widgets.Containers.Panels.Get_Min_Height defined at widgets-containers-panels.ads:49:14
Widgets.Containers.Panels.Get_Min_Width defined at widgets-containers-panels.ads:53:14
Widgets.Containers.Panels.Make_Child_Layout defined at widgets-containers-panels.adb:10:15
Widgets.Containers.Panels.Popups.Get_Min_Height defined at widgets-containers-panels-popups.ads:39:14
Widgets.Containers.Panels.Popups.Get_Min_Width defined at widgets-containers-panels-popups.ads:41:14
Widgets.Containers.Panels.Set_Border defined at widgets-containers-panels.ads:16:15
Widgets.Containers.Panels.Set_Icon defined at widgets-containers-panels.ads:22:15
Widgets.Containers.Panels.Set_Icon defined at widgets-containers-panels.ads:22:15
Widgets.Containers.Panels.Set_Title defined at widgets-containers-panels.ads:24:15
Widgets.Containers.Pulldown_Menus.Draw_Content defined at widgets-containers-pulldown_menus.ads:36:15
Widgets.Containers.Scroll_Panes.Draw_Content defined at widgets-containers-scroll_panes.ads:49:15
Widgets.Draw defined at widgets.ads:100:15
Widgets.Input_Boxes.Adjust_Visible_Text defined at widgets-input_boxes.ads:115:15
Widgets.Input_Boxes.Draw_Content defined at widgets-input_boxes.ads:130:15
Widgets.Input_Boxes.Handle_Mouse_Press defined at widgets-input_boxes.ads:141:15
Widgets.Labels.Draw_Content defined at widgets-labels.ads:45:15
Widgets.Labels.Get_Min_Height defined at widgets-labels.ads:47:14
Widgets.Labels.Get_Min_Width defined at widgets-labels.ads:49:14
Widgets.Labels.Set_Icon defined at widgets-labels.ads:22:15
Widgets.Menu_Items.Box_Size defined at widgets-menu_items.ads:99:14
Widgets.Menu_Items.Draw_Content defined at widgets-menu_items.ads:103:15
Widgets.Menu_Items.Get_Min_Height defined at widgets-menu_items.ads:107:14
Widgets.Menu_Items.Get_Min_Width defined at widgets-menu_items.ads:109:14
Widgets.Menu_Items.Menu_Checkboxes.Draw_Content defined at widgets-menu_items-menu_checkboxes.ads:29:15
Widgets.Menubars.Add defined at widgets-menubars.ads:17:15
Widgets.Menubars.Draw_Content defined at widgets-menubars.ads:59:15
Widgets.Menubars.Set_Parent defined at widgets-menubars.ads:75:15
Widgets.Scrollbars.Draw_Content defined at widgets-scrollbars.ads:72:15
Widgets.Scrollbars.Draw_Content defined at widgets-scrollbars.ads:55:15

Calls:

Applications.Create defined at applications.adb:50:19
Applications.Get defined at applications.adb:57:18
Returns a reference to the global application, creating it if necessary.

Delete_Application

procedure Delete_Application;

References:

applications.ads:33:15 (declaration)
applications.adb:128:15 (body)
applications.adb:131:9 (label)
engine.adb:27:9 (reference)

Called by:

Engine.Engine_Main defined at engine.ads:9:14

Calls:

Applications.Delete defined at applications.adb:54:19
Deletes the global application if it exists.

Close

procedure Close
( this: access Application );

References:

applications.ads:39:15 (declaration)
applications.adb:169:15 (body)
applications.adb:195:9 (label)
engine.adb:24:17 (dispatching call)

Called by:

Engine.Engine_Main defined at engine.ads:9:14
Closes the application after initialization. Do not call this if the application didn't successfully initialize.

Get_Name (abstract)

function Get_Name
( this: access Application )
return String is abstract;

References:

applications.ads:44:14 (declaration)
applications.adb:264:48 (dispatching call)
applications.adb:265:70 (dispatching call)

Called by:

Init defined at applications.ads:113:14
Init defined at applications.ads:113:14
Returns the short name of the application. This is used to determine the names of application-specific files, etc. Special characters should be avoided.

Get_Theme

function Get_Theme
( this: not null access Application'Class )
return A_Theme;

References:

applications.ads:47:14 (declaration)
applications.adb:223:14 (body)
applications.adb:229:9 (label)
applications.ads:48:27 (reference)
widgets-buttons-checkboxes.adb:29:57 (reference)
widgets-buttons-checkboxes.adb:123:38 (reference)
widgets-buttons-checkboxes.adb:142:38 (reference)
widgets-buttons-checkboxes.adb:183:47 (reference)
widgets-buttons.adb:73:57 (reference)
widgets-buttons.adb:131:38 (reference)
widgets-buttons.adb:152:38 (reference)
widgets-buttons.adb:213:42 (reference)
widgets-containers-panels-popups.adb:62:63 (reference)
widgets-containers-panels-popups.adb:85:44 (reference)
widgets-containers-panels.adb:16:54 (reference)
widgets-containers-panels.adb:66:44 (reference)
widgets-containers-panels.adb:76:53 (reference)
widgets-containers-panels.adb:110:38 (reference)
widgets-containers-panels.adb:134:38 (reference)
widgets-containers-panels.adb:172:62 (reference)
widgets-containers-panels.adb:197:35 (reference)
widgets-containers-panels.adb:210:70 (reference)
widgets-containers-panels.adb:237:70 (reference)
widgets-containers-pulldown_menus.adb:58:25 (reference)
widgets-containers-scroll_panes.adb:153:54 (reference)
widgets-containers.adb:135:40 (reference)
widgets-input_boxes.adb:78:53 (reference)
widgets-input_boxes.adb:195:53 (reference)
widgets-input_boxes.adb:377:53 (reference)
widgets-labels.adb:42:53 (reference)
widgets-labels.adb:75:38 (reference)
widgets-labels.adb:96:38 (reference)
widgets-labels.adb:141:42 (reference)
widgets-menu_items-menu_checkboxes.adb:39:55 (reference)
widgets-menu_items.adb:49:45 (reference)
widgets-menu_items.adb:87:55 (reference)
widgets-menu_items.adb:139:57 (reference)
widgets-menu_items.adb:156:36 (reference)
widgets-menubars.adb:47:46 (reference)
widgets-menubars.adb:94:57 (reference)
widgets-menubars.adb:284:65 (reference)
widgets-scrollbars.adb:77:56 (reference)
widgets-scrollbars.adb:187:56 (reference)
widgets.adb:166:53 (reference)
widgets.adb:323:44 (reference)
game_views-keen.adb:574:57 (reference)

Called by:

Game_Views.Keen.Set_Loading_Text defined at game_views-keen.ads:107:15
Widgets.Buttons.Checkboxes.Draw_Content defined at widgets-buttons-checkboxes.ads:27:15
Widgets.Buttons.Checkboxes.Get_Min_Height defined at widgets-buttons-checkboxes.ads:29:14
Widgets.Buttons.Checkboxes.Get_Min_Width defined at widgets-buttons-checkboxes.ads:31:14
Widgets.Buttons.Checkboxes.Set_Check_Icon defined at widgets-buttons-checkboxes.ads:14:15
Widgets.Buttons.Draw_Content defined at widgets-buttons.ads:114:15
Widgets.Buttons.Get_Min_Height defined at widgets-buttons.ads:116:14
Widgets.Buttons.Get_Min_Width defined at widgets-buttons.ads:118:14
Widgets.Buttons.Set_Icon defined at widgets-buttons.ads:56:15
Widgets.Construct defined at widgets.ads:499:15
Widgets.Containers.Draw defined at widgets-containers.ads:66:15
Widgets.Containers.Panels.Construct defined at widgets-containers-panels.ads:38:15
Widgets.Containers.Panels.Draw_Content defined at widgets-containers-panels.ads:45:15
Widgets.Containers.Panels.Get_Min_Height defined at widgets-containers-panels.ads:49:14
Widgets.Containers.Panels.Get_Min_Width defined at widgets-containers-panels.ads:53:14
Widgets.Containers.Panels.Make_Child_Layout defined at widgets-containers-panels.adb:10:15
Widgets.Containers.Panels.Popups.Get_Min_Height defined at widgets-containers-panels-popups.ads:39:14
Widgets.Containers.Panels.Popups.Get_Min_Width defined at widgets-containers-panels-popups.ads:41:14
Widgets.Containers.Panels.Set_Border defined at widgets-containers-panels.ads:16:15
Widgets.Containers.Panels.Set_Icon defined at widgets-containers-panels.ads:22:15
Widgets.Containers.Panels.Set_Icon defined at widgets-containers-panels.ads:22:15
Widgets.Containers.Panels.Set_Title defined at widgets-containers-panels.ads:24:15
Widgets.Containers.Pulldown_Menus.Draw_Content defined at widgets-containers-pulldown_menus.ads:36:15
Widgets.Containers.Scroll_Panes.Draw_Content defined at widgets-containers-scroll_panes.ads:49:15
Widgets.Draw defined at widgets.ads:100:15
Widgets.Input_Boxes.Adjust_Visible_Text defined at widgets-input_boxes.ads:115:15
Widgets.Input_Boxes.Draw_Content defined at widgets-input_boxes.ads:130:15
Widgets.Input_Boxes.Handle_Mouse_Press defined at widgets-input_boxes.ads:141:15
Widgets.Labels.Draw_Content defined at widgets-labels.ads:45:15
Widgets.Labels.Get_Min_Height defined at widgets-labels.ads:47:14
Widgets.Labels.Get_Min_Width defined at widgets-labels.ads:49:14
Widgets.Labels.Set_Icon defined at widgets-labels.ads:22:15
Widgets.Menu_Items.Box_Size defined at widgets-menu_items.ads:99:14
Widgets.Menu_Items.Draw_Content defined at widgets-menu_items.ads:103:15
Widgets.Menu_Items.Get_Min_Height defined at widgets-menu_items.ads:107:14
Widgets.Menu_Items.Get_Min_Width defined at widgets-menu_items.ads:109:14
Widgets.Menu_Items.Menu_Checkboxes.Draw_Content defined at widgets-menu_items-menu_checkboxes.ads:29:15
Widgets.Menubars.Add defined at widgets-menubars.ads:17:15
Widgets.Menubars.Draw_Content defined at widgets-menubars.ads:59:15
Widgets.Menubars.Set_Parent defined at widgets-menubars.ads:75:15
Widgets.Scrollbars.Draw_Content defined at widgets-scrollbars.ads:72:15
Widgets.Scrollbars.Draw_Content defined at widgets-scrollbars.ads:55:15
Returns the application's Theme for UI widgets.

Get_Window_Title (abstract)

function Get_Window_Title
( this: access Application )
return String is abstract;

References:

applications.ads:52:14 (declaration)
applications.adb:78:46 (dispatching call)
applications.adb:293:47 (dispatching call)

Called by:

Applications.Create defined at applications.adb:50:19
Init defined at applications.ads:113:14
Returns the title text at the top of the application's window if it's a graphical application.

Init (abstract)

function Init
( this: access Application )
return Boolean is abstract;

References:

applications.ads:57:14 (declaration)
engine.adb:22:16 (dispatching call)

Called by:

Engine.Engine_Main defined at engine.ads:9:14
Initializes the application, returning True on success. If initialization fails, Close should not be called because whatever was partially initialized before the failure ws be finalized before returning.

Run

procedure Run
( this: access Application;
returnCode: in out Integer );

References:

applications.ads:62:15 (declaration)
applications.adb:532:15 (body)
applications.adb:558:9 (label)
engine.adb:23:17 (dispatching call)

Called by:

Engine.Engine_Main defined at engine.ads:9:14
Executes the application runtime. 'returnCode' contains the numeric code that should be returned to the OS on exit. This procedure will block until Stop is called to end application execution.

Stop

procedure Stop
( this: not null access Application'Class;
errorCode: Integer := NO_ERROR );

References:

applications.ads:67:15 (declaration)
applications.adb:562:15 (body)
applications.adb:567:9 (label)
game_views.adb:187:29 (reference)
processes-managers.adb:429:29 (reference)

Called by:

Game_Views.Handle_Event defined at game_views.ads:123:15
Processes.Managers.Ticker_Task defined at processes-managers.ads:131:15
Stops the running application. This will cause the thread that called Run to return. The value of 'errorCode' determines the value of 'returnCode' that will be returned from Run.