-// Represents the application. Derive OnInit and declare
-// a new App object to start application
-class WXDLLEXPORT wxApp: public wxEvtHandler
-{
- DECLARE_DYNAMIC_CLASS(wxApp)
- wxApp(void);
- inline ~wxApp(void) {}
-
- static void SetInitializerFunction(wxAppInitializerFunction fn) { m_appInitFn = fn; }
- static wxAppInitializerFunction GetInitializerFunction(void) { return m_appInitFn; }
-
- virtual int MainLoop(void);
- void ExitMainLoop(void);
- bool Initialized(void);
- virtual bool Pending(void) ;
- virtual void Dispatch(void) ;
-
- virtual void OnIdle(wxIdleEvent& event);
-
-// Generic
- virtual bool OnInit(void) { return FALSE; };
-
- // No specific tasks to do here.
- virtual bool OnInitGui(void) { return TRUE; }
-
- // Called to set off the main loop
- virtual int OnRun(void) { return MainLoop(); };
- virtual int OnExit(void) { return 0; };
- inline void SetPrintMode(int mode) { m_printMode = mode; }
- inline int GetPrintMode(void) const { return m_printMode; }
-
- inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; }
- inline bool GetExitOnFrameDelete(void) const { return m_exitOnFrameDelete; }
-
-/*
- inline void SetShowFrameOnInit(bool flag) { m_showOnInit = flag; }
- inline bool GetShowFrameOnInit(void) const { return m_showOnInit; }
-*/
-
- inline wxString GetAppName(void) const {
- if (m_appName != "")
- return m_appName;
- else return m_className;
- }
-
- inline void SetAppName(const wxString& name) { m_appName = name; };
- inline wxString GetClassName(void) const { return m_className; }
- inline void SetClassName(const wxString& name) { m_className = name; }
- wxWindow *GetTopWindow(void) const ;
- inline void SetTopWindow(wxWindow *win) { m_topWindow = win; }
-
- inline void SetWantDebugOutput(bool flag) { m_wantDebugOutput = flag; }
- inline bool GetWantDebugOutput(void) { return m_wantDebugOutput; }
-
- // Send idle event to all top-level windows.
- // Returns TRUE if more idle time is requested.
- bool SendIdleEvents(void);
-
- // Send idle event to window and all subwindows
- // Returns TRUE if more idle time is requested.
- bool SendIdleEvents(wxWindow* win);
-
- inline void SetAuto3D(bool flag) { m_auto3D = flag; }
- inline bool GetAuto3D(void) const { return m_auto3D; }
-
- // Creates a log object
- virtual wxLog* CreateLogTarget();
-
-#if USE_WXCONFIG
- // override this function to create a global wxConfig object of different
- // than default type (right now the default implementation returns NULL)
- virtual wxConfig* CreateConfig() { return NULL; }
-#endif //USE_WXCONFIG