X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d90072c22f3f7aff3991ef3187c67b2cdc5ea70..991d57f8443fc8a31c2ad3e3a8180af08a6394d6:/include/wx/app.h?ds=sidebyside diff --git a/include/wx/app.h b/include/wx/app.h index 1e0c5786ef..4fc847b33c 100644 --- a/include/wx/app.h +++ b/include/wx/app.h @@ -245,13 +245,22 @@ public: // debugging support // ----------------- +#ifdef __WXDEBUG__ // this function is called when an assert failure occurs, the base class // version does the normal processing (i.e. shows the usual assert failure // dialog box) // - // the arguments are the place where the assert occurred, the text of the + // the arguments are the location of the failed assert (func may be empty + // if the compiler doesn't support C99 __FUNCTION__), the text of the // assert itself and the user-specified message -#ifdef __WXDEBUG__ + virtual void OnAssertFailure(const wxChar *file, + int line, + const wxChar *func, + const wxChar *cond, + const wxChar *msg); + + // old version of the function without func parameter, for compatibility + // only, override OnAssertFailure() in the new code virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, @@ -494,10 +503,12 @@ public: // deactivated virtual void SetActive(bool isActive, wxWindow *lastFocus); +#if WXWIN_COMPATIBILITY_2_6 // OBSOLETE: don't use, always returns true // // returns true if the program is successfully initialized - bool Initialized() { return true; } + wxDEPRECATED( bool Initialized() ); +#endif // WXWIN_COMPATIBILITY_2_6 // perform standard OnIdle behaviour, ensure that this is always called void OnIdle(wxIdleEvent& event); @@ -540,6 +551,10 @@ protected: DECLARE_NO_COPY_CLASS(wxAppBase) }; +#if WXWIN_COMPATIBILITY_2_6 + inline bool wxAppBase::Initialized() { return true; } +#endif // WXWIN_COMPATIBILITY_2_6 + #endif // wxUSE_GUI // ---------------------------------------------------------------------------- @@ -555,8 +570,10 @@ protected: #include "wx/motif/app.h" #elif defined(__WXMGL__) #include "wx/mgl/app.h" - #elif defined(__WXGTK__) + #elif defined(__WXGTK20__) #include "wx/gtk/app.h" + #elif defined(__WXGTK__) + #include "wx/gtk1/app.h" #elif defined(__WXX11__) #include "wx/x11/app.h" #elif defined(__WXMAC__) @@ -683,4 +700,3 @@ extern wxAppConsole *wxCreateApp(); extern wxAppInitializer wxTheAppInitializer; #endif // _WX_APP_H_BASE_ -