+class WXDLLIMPEXP_BASE wxAppConsole : public wxEvtHandler
+{
+public:
+ // ctor and dtor
+ wxAppConsole();
+ virtual ~wxAppConsole();
+
+
+ // the virtual functions which may/must be overridden in the derived class
+ // -----------------------------------------------------------------------
+
+ // This is the very first function called for a newly created wxApp object,
+ // it is used by the library to do the global initialization. If, for some
+ // reason, you must override it (instead of just overriding OnInit(), as
+ // usual, for app-specific initializations), do not forget to call the base
+ // class version!
+ virtual bool Initialize(int& argc, wxChar **argv);
+
+ // This gives wxCocoa a chance to call OnInit() with a memory pool in place
+ virtual bool CallOnInit() { return OnInit(); }
+
+ // Called before OnRun(), this is a good place to do initialization -- if
+ // anything fails, return false from here to prevent the program from
+ // continuing. The command line is normally parsed here, call the base
+ // class OnInit() to do it.
+ virtual bool OnInit();
+
+ // this is here only temporary hopefully (FIXME)
+ virtual bool OnInitGui() { return true; }
+
+ // This is the replacement for the normal main(): all program work should
+ // be done here. When OnRun() returns, the programs starts shutting down.
+ virtual int OnRun() = 0;
+
+ // This is only called if OnInit() returned true so it's a good place to do
+ // any cleanup matching the initializations done there.
+ virtual int OnExit();
+
+ // This is the very last function called on wxApp object before it is
+ // destroyed. If you override it (instead of overriding OnExit() as usual)
+ // do not forget to call the base class version!
+ virtual void CleanUp();
+
+ // Called when a fatal exception occurs, this function should take care not
+ // to do anything which might provoke a nested exception! It may be
+ // overridden if you wish to react somehow in non-default way (core dump
+ // under Unix, application crash under Windows) to fatal program errors,
+ // however extreme care should be taken if you don't want this function to
+ // crash.
+ virtual void OnFatalException() { }
+
+#if wxUSE_EXCEPTIONS
+ // function called if an uncaught exception is caught inside the main
+ // event loop: it may return true to continue running the event loop or
+ // false to stop it (in the latter case it may rethrow the exception as
+ // well)
+ virtual bool OnExceptionInMainLoop();
+
+ // Called when an unhandled C++ exception occurs inside OnRun(): note that
+ // the exception type is lost by now, so if you really want to handle the
+ // exception you should override OnRun() and put a try/catch around
+ // MainLoop() call there
+ virtual void OnUnhandledException() { }
+#endif // wxUSE_EXCEPTIONS
+
+ // Called from wxExit() function, should terminate the application a.s.a.p.
+ virtual void Exit();