wxCities3DApp

The main application class.  Part of the wxWidgets application infrastructure.  Creates and maintains the wxMainFrame, the top level frame for the main application window.  Switches the menus when a SettlersView game window is open and when it closes.  Handles starting and stopping the GameEngine.

Derived From

wxApp (see http://www.wxwindows.org/manuals/2.4.2/wx30.htm)

Project

Cities3D

Include

app.h

Summary
The main application class.
Returns the application object itself.
Shows the application menu in the frame.
Shows the game menu in the frame.
Initializes the application.
Exits the application.
The wxMainFrame, the top-level frame in the application.

Public

Summary
Returns the application object itself.
Shows the application menu in the frame.
Shows the game menu in the frame.
Initializes the application.
Exits the application.

Static Functions

app

static wxCities3DApp &app()

Returns the application object itself.  Available anywhere in the application.

Returns

A reference to the application itself.

Functions

ShowAppMenu

void ShowAppMenu()

Shows the application menu in the frame.

ShowGameMenu

void ShowGameMenu()

Shows the game menu in the frame.

Virtual Functions

OnInit

virtual bool OnInit()

Initializes the application.  Creates the wxMainFrame.  Sets the application icon.  Centers the window on screen and creates the menu bar.  Calls ShowAppMenu to set the application menu and then starts up the GameEngine.  Runs the wxSplashDialog and proceeds from the results.

Returns

A bool indicating success initialization of the application.  If false, the application is terminated.

OnExit

virtual int OnExit()

Exits the application.  Stops the GameEngine.

Returns

The value returned by wxApp::OnExit()

Private

Summary
The wxMainFrame, the top-level frame in the application.

Variables

mFrame

wxMainFrame *mFrame

The wxMainFrame, the top-level frame in the application.

static wxCities3DApp &app()
Returns the application object itself.
void ShowAppMenu()
Shows the application menu in the frame.
void ShowGameMenu()
Shows the game menu in the frame.
virtual bool OnInit()
Initializes the application.
virtual int OnExit()
Exits the application.
wxMainFrame *mFrame
The wxMainFrame, the top-level frame in the application.
The top-level frame window.
The main game window.
The engine that drives the game.
Cities3D is a cross-platform implementation of the board game Settlers of Catan with all expansions, including Seafarers, and Cities & Knights.
Still volatile.