#include <AgentsApp.h>
Public Member Functions | |
virtual bool | OnInit () |
Creates the application main window. | |
virtual void | HandleEvent (wxEvtHandler *handler, wxEventFunction func, wxEvent &event) const |
Handles selected event by invoking selected event function. | |
virtual bool | OnExceptionInMainLoop () |
This function is called if an unhandled exception occurs inside the main application event loop. | |
virtual void | OnUnhandledException () |
This function is called when an unhandled C++ exception occurs inside OnRun(). | |
virtual void | OnFatalException () |
This function may be called if something fatal happens. | |
Private Attributes | |
AgentsFrame * | frame |
Main frame. |
void GUI::AgentsApp::HandleEvent | ( | wxEvtHandler * | handler, | |
wxEventFunction | func, | |||
wxEvent & | event | |||
) | const [virtual] |
Handles selected event by invoking selected event function.
handler | Event handler | |
func | Event function that will be invoked | |
event | Event to be handled |
This function simply invokes the given method func of the specified event handler handler with the event as parameter. It exists solely to allow to catch the C++ exceptions which could be thrown by all event handlers in the application in one place: if you want to do this, override this function in your wxApp-derived class and add try/catch clause(s) to it.
bool GUI::AgentsApp::OnExceptionInMainLoop | ( | ) | [virtual] |
This function is called if an unhandled exception occurs inside the main application event loop.
3rd-level exception handling: we get all the exceptions occurring in any event handler here
void GUI::AgentsApp::OnFatalException | ( | ) | [virtual] |
This function may be called if something fatal happens.
And now for something different: this function is called in case of a crash (e.g. dereferencing null pointer, division by 0, ...)
bool GUI::AgentsApp::OnInit | ( | ) | [virtual] |
Creates the application main window.
void GUI::AgentsApp::OnUnhandledException | ( | ) | [virtual] |
This function is called when an unhandled C++ exception occurs inside OnRun().
4th, and final, level exception handling: whenever an unhandled exception is caught, this function is called
AgentsFrame* GUI::AgentsApp::frame [private] |
Main frame.