Snoke
Application Class Reference

#include <application.h>

Collaboration diagram for Application:

Public Member Functions

void load (char *name)
 
void back ()
 
void add (char *name, Screen *screen)
 
void execute ()
 

Static Public Member Functions

static Applicationinstance ()
 

Private Member Functions

void focusFirst ()
 
 Application ()
 
 Application (const Application &)
 
Applicationoperator= (Application &)
 

Private Attributes

std::map< char *, Screen * > screens
 
std::list< Screen * > history
 
ScreencurrentScreen
 
WidgetcurrentWidget
 

Detailed Description

Singleton class manages stack of screens and navigation

Parameters
{map<Screen*>}screens - container with screens
{std::list<Widget*>}history - list of opened screens
{Screen*}currentScreen - current showed screen
{std::list<Widget*>::iterator}currentWidget - current focused widget

Definition at line 16 of file application.h.

Constructor & Destructor Documentation

Application::Application ( )
private

Plug for defending from redefining

Definition at line 100 of file application.cpp.

Application::Application ( const Application )
private

Member Function Documentation

void Application::add ( char *  name,
Screen screen 
)

Adds screen to the list of known screens

Parameters
{char*}name - name to identify screen
{Screen*}screen - pointer to screen

Definition at line 80 of file application.cpp.

void Application::back ( )

Loads previously opened screen

Parameters
{char*}name - screen name

Definition at line 67 of file application.cpp.

Here is the call graph for this function:

void Application::execute ( )

Runs the main event loop

Definition at line 15 of file application.cpp.

Here is the call graph for this function:

void Application::focusFirst ( )
private

Sets the start position of currentWidget and focuses it

Definition at line 6 of file application.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Application & Application::instance ( )
static

Singleton constructor

Returns
{Application&}

Definition at line 90 of file application.cpp.

void Application::load ( char *  name)

Loads screen

Parameters
{char*}name - screen name

Definition at line 55 of file application.cpp.

Here is the call graph for this function:

Application& Application::operator= ( Application )
private

Member Data Documentation

Screen* Application::currentScreen
private

Definition at line 25 of file application.h.

Widget* Application::currentWidget
private

Definition at line 26 of file application.h.

std::list<Screen*> Application::history
private

Definition at line 24 of file application.h.

std::map<char*, Screen*> Application::screens
private

Definition at line 23 of file application.h.


The documentation for this class was generated from the following files: