omgui::App Class Reference

#include <omgui/app.h>

List of all members.

Public Types

typedef std::vector< stringcmd_line

Public Member Functions

void close_toplevel_windows ()
const cmd_lineget_cmd_line ()
omgui::EventLoopget_event_loop ()
virtual bool init ()=0
void quit ()
void run ()
void set_cmd_line (const cmd_line &cmd)
virtual ~App ()

Static Public Member Functions

static void add_top_level (TopLevel *t)
static const TopLevelListget_top_level_widgets ()
static void remove_top_level (TopLevel *t)

Protected Member Functions

 App ()

Private Member Functions

void _quit ()
void gui_init ()

Private Attributes

cmd_line m_cmd
std::auto_ptr< omgui::EventLoopm_event_loop
 The event loop.


Member Typedef Documentation

typedef std::vector<string> omgui::App::cmd_line

Command line storage as a vector of strings


Constructor & Destructor Documentation

omgui::App::~App (  )  [virtual]

omgui::App::App (  )  [protected]


Member Function Documentation

void omgui::App::_quit (  )  [private]

Called by quit(). Must be implemented by an implementation. Its purpose is to notify an implementation that the application must terminate. It is called after all TopLevel widgets have been closed.

The purpose of this function is to notify the implementation that it should allow omgui::App::run() to return, terminating the application.

void omgui::App::add_top_level ( TopLevel t  )  [static]

Adds a TopLevel widget to the toplevel widget list

void omgui::App::close_toplevel_windows (  ) 

Closes all top level windows.

Todo:
call close() instead of destroy()

const App::cmd_line & omgui::App::get_cmd_line (  ) 

Returns:
Command line used to launch the application

omgui::EventLoop* omgui::App::get_event_loop (  ) 

Returns:
The event loop

const TopLevelList & omgui::App::get_top_level_widgets (  )  [static]

Returns:
A list containing all TopLevel widgets in the application. Note that the returned list is const. If you need to remove a TopLevel widget, use destroy() or close(). You cannot remove it directly from this list.

void omgui::App::gui_init (  )  [private]

Called by the constructor, and implemented by an implementation for port specific initialization.

If gui initialization fails for what ever reason (no X server for a *nix port), an exception will be thrown.

Todo:
throw exception

virtual bool omgui::App::init (  )  [pure virtual]

void omgui::App::quit (  ) 

Quits the application.

Firstly, this function sends the APP_QUITTING event. If this event is not vetoed, it will then iterate over all TopLevel widgets and close() them. If all windws are closed, the application will terminate.

Todo:
send APP_QUIT

void omgui::App::remove_top_level ( TopLevel t  )  [static]

Removes a TopLevel widget from the TopLevel widget list

void omgui::App::run (  ) 

Runs the main event loop.

void omgui::App::set_cmd_line ( const cmd_line cmd  ) 


Member Data Documentation

std::auto_ptr<omgui::EventLoop> omgui::App::m_event_loop [private]

The event loop.


doxygen SourceForge.net Logo