From: Julian Smart Date: Thu, 1 Aug 2002 19:54:55 +0000 (+0000) Subject: Applied patch [ 588734 ] Makes ProcessIdle() virtual X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/90a1a975d4f1c07b53e0f70df7cde32ab1d84f53 Applied patch [ 588734 ] Makes ProcessIdle() virtual git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index 9bbb2f2f5c..983a6c8901 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -255,6 +255,9 @@ wxMSW: - fixed a condition where a thread can hang during message/event processing - increased space between wxRadioBox label and first radio button +- don't fail to register remaining window classes if one fails to register +- set window proc for non-control windows to avoid problems + with multiple wxWindows apps running simultaneously wxGTK: diff --git a/docs/latex/wx/tapp.tex b/docs/latex/wx/tapp.tex index 8bef4289fa..563b3d085b 100644 --- a/docs/latex/wx/tapp.tex +++ b/docs/latex/wx/tapp.tex @@ -11,8 +11,8 @@ returns a boolean value which indicates whether processing should continue (TRUE You call \helpref{wxApp::SetTopWindow}{wxappsettopwindow} to let wxWindows know about the top window. -Note that the program's command line arguments, represented by {\it -argc} and {\it argv}, are available from within wxApp member functions. +Note that the program's command line arguments, represented by {\it argc} +and {\it argv}, are available from within wxApp member functions. An application closes by destroying all windows. Because all frames must be destroyed for the application to exit, it is advisable to use parent @@ -37,8 +37,9 @@ IMPLEMENT_APP(DerivedApp) bool DerivedApp::OnInit() { - wxFrame *the_frame = new wxFrame(NULL, argv[0]); + wxFrame *the_frame = new wxFrame(NULL, ID_MYFRAME, argv[0]); ... + the_frame->Show(TRUE); SetTopWindow(the_frame); return TRUE; diff --git a/include/wx/app.h b/include/wx/app.h index 68eeec84ef..8324651d60 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -151,6 +151,8 @@ public: // Override: rarely. virtual void OnFatalException() { } + virtual bool ProcessIdle() = 0; + // the worker functions - usually not used directly by the user code // ----------------------------------------------------------------- diff --git a/include/wx/gtk/app.h b/include/wx/gtk/app.h index cdb4c4cb73..3beaf8806b 100644 --- a/include/wx/gtk/app.h +++ b/include/wx/gtk/app.h @@ -47,6 +47,7 @@ public: virtual bool Pending(); virtual void Dispatch(); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); // implementation only from now on void OnIdle( wxIdleEvent &event ); @@ -57,7 +58,6 @@ public: static bool InitialzeVisual(); static void CleanUp(); - bool ProcessIdle(); void DeletePendingObjects(); #ifdef __WXDEBUG__ diff --git a/include/wx/gtk1/app.h b/include/wx/gtk1/app.h index cdb4c4cb73..3beaf8806b 100644 --- a/include/wx/gtk1/app.h +++ b/include/wx/gtk1/app.h @@ -47,6 +47,7 @@ public: virtual bool Pending(); virtual void Dispatch(); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); // implementation only from now on void OnIdle( wxIdleEvent &event ); @@ -57,7 +58,6 @@ public: static bool InitialzeVisual(); static void CleanUp(); - bool ProcessIdle(); void DeletePendingObjects(); #ifdef __WXDEBUG__ diff --git a/include/wx/mac/app.h b/include/wx/mac/app.h index 5f269ffc05..6cac7e556d 100644 --- a/include/wx/mac/app.h +++ b/include/wx/mac/app.h @@ -53,6 +53,7 @@ class WXDLLEXPORT wxApp: public wxAppBase virtual bool Pending() ; virtual void Dispatch() ; virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); virtual void SetPrintMode(int mode) { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } @@ -87,7 +88,6 @@ public: virtual bool OnInit(); void DeletePendingObjects(); - bool ProcessIdle(); bool IsExiting() { return !m_keepGoing ; } public: diff --git a/include/wx/mgl/app.h b/include/wx/mgl/app.h index ec6c5a703f..ea6fa45bcc 100644 --- a/include/wx/mgl/app.h +++ b/include/wx/mgl/app.h @@ -47,6 +47,7 @@ public: virtual bool Initialized(); virtual bool Pending(); virtual void Dispatch(); + virtual bool ProcessIdle(); // implementation only from now on void OnIdle(wxIdleEvent &event); @@ -56,7 +57,7 @@ public: static bool Initialize(); static void CleanUp(); - bool ProcessIdle(); + virtual bool ProcessIdle(); void DeletePendingObjects(); virtual bool Yield(bool onlyIfNeeded = FALSE); diff --git a/include/wx/motif/app.h b/include/wx/motif/app.h index f80b97c121..650736e9c3 100644 --- a/include/wx/motif/app.h +++ b/include/wx/motif/app.h @@ -54,6 +54,7 @@ public: virtual bool Pending(); virtual void Dispatch(); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); virtual bool OnInitGui(); @@ -93,7 +94,6 @@ public: static void CleanUp(); void DeletePendingObjects(); - bool ProcessIdle(); // Motif-specific WXAppContext GetAppContext() const { return m_appContext; } diff --git a/include/wx/msw/app.h b/include/wx/msw/app.h index 852a5b50e7..c85dcc4b83 100644 --- a/include/wx/msw/app.h +++ b/include/wx/msw/app.h @@ -42,6 +42,7 @@ public: virtual bool Pending(); virtual void Dispatch(); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); virtual void SetPrintMode(int mode) { m_printMode = mode; } virtual int GetPrintMode() const { return m_printMode; } @@ -97,7 +98,6 @@ public: // --------------- void DeletePendingObjects(); - bool ProcessIdle(); #if wxUSE_RICHEDIT // initialize the richedit DLL of (at least) given version, return TRUE if diff --git a/include/wx/os2/app.h b/include/wx/os2/app.h index b198140509..fe2486b853 100644 --- a/include/wx/os2/app.h +++ b/include/wx/os2/app.h @@ -77,6 +77,7 @@ public: virtual bool Pending(void) ; virtual void Dispatch(void); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(void); virtual void SetPrintMode(int mode) { m_nPrintMode = mode; } virtual int GetPrintMode(void) const { return m_nPrintMode; } @@ -129,7 +130,6 @@ public: virtual bool DoMessage(void); virtual bool ProcessMessage(WXMSG* pMsg); void DeletePendingObjects(void); - bool ProcessIdle(void); public: int m_nCmdShow; diff --git a/include/wx/x11/app.h b/include/wx/x11/app.h index 77927b4f49..c1e44dad6e 100644 --- a/include/wx/x11/app.h +++ b/include/wx/x11/app.h @@ -55,6 +55,7 @@ public: virtual bool Pending(); virtual void Dispatch(); virtual bool Yield(bool onlyIfNeeded = FALSE); + virtual bool ProcessIdle(); virtual bool OnInitGui(); @@ -87,7 +88,6 @@ public: static void CleanUp(); void DeletePendingObjects(); - bool ProcessIdle(); WXWindow GetTopLevelWidget() const { return m_topLevelWidget; } WXColormap GetMainColormap(WXDisplay* display);