X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/589f0e3e6070d8d1e6649b410f318ec2aa98ae4e..06c545a70377ea25f2263b2d2fa432db67d8b619:/include/wx/msw/app.h diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h index fd8fb8e815..85a0e6cd34 100644 --- a/include/wx/msw/app.h +++ b/include/wx/msw/app.h @@ -18,6 +18,7 @@ #include "wx/defs.h" #include "wx/object.h" +#include "wx/event.h" class WXDLLEXPORT wxFrame; class WXDLLEXPORT wxWindow; @@ -54,8 +55,10 @@ class WXDLLEXPORT wxApp: public wxEvtHandler virtual void Dispatch() ; void OnIdle(wxIdleEvent& event); + void OnEndSession(wxCloseEvent& event); + void OnQueryEndSession(wxCloseEvent& event); -// Generic + // Generic virtual bool OnInit() { return FALSE; }; // No specific tasks to do here. @@ -65,14 +68,18 @@ class WXDLLEXPORT wxApp: public wxEvtHandler virtual int OnRun() { return MainLoop(); }; virtual int OnExit() { return 0; } + // called when a fatal exception occurs, this function should take care not + // to do anything which might provoke a nested exception! + virtual void OnFatalException() { } + inline void SetPrintMode(int mode) { m_printMode = mode; } inline int GetPrintMode() const { return m_printMode; } inline void SetExitOnFrameDelete(bool flag) { m_exitOnFrameDelete = flag; } inline bool GetExitOnFrameDelete() const { return m_exitOnFrameDelete; } - inline wxString GetAppName() const { - if (m_appName != "") + inline const wxString& GetAppName() const { + if (m_appName != _T("")) return m_appName; else return m_className; } @@ -137,6 +144,9 @@ public: virtual bool ProcessMessage(WXMSG* pMsg); void DeletePendingObjects(); bool ProcessIdle(); +#if wxUSE_THREADS + void ProcessPendingEvents(); +#endif int GetComCtl32Version() const; public: