X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd85fc6b89333821b22ae76808914d8e1d508095..bd73863347c81c1b41b3a7684f0219d44d1c53d2:/include/wx/log.h?ds=sidebyside diff --git a/include/wx/log.h b/include/wx/log.h index 31f283dfdb..c000ac1274 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -132,6 +132,13 @@ public: bool HasPendingMessages() const { return m_bHasMessages; } // only one sink is active at each moment + // flush the active target if any + static void FlushActive() + { + wxLog *log = GetActiveTarget(); + if ( log ) + log->Flush(); + } // get current log target, will call wxApp::CreateLogTarget() to // create one if none exists static wxLog *GetActiveTarget(); @@ -245,7 +252,7 @@ protected: // GUI part (andnot just the base one) of the library, they're implemented in // src/generic/logg.cpp *and not src/common/log.cpp unlike all the rest) -#ifndef wxUSE_NOGUI +#if wxUSE_GUI // log everything to a text window (GUI only of course) class WXDLLEXPORT wxLogTextCtrl : public wxLog @@ -338,7 +345,7 @@ private: wxLogFrame *m_pLogFrame; // the log frame }; -#endif // wxUSE_NOGUI +#endif // wxUSE_GUI // ---------------------------------------------------------------------------- // /dev/null log target: suppress logging until this object goes out of scope @@ -464,7 +471,7 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // ---------------------------------------------------------------------------- #ifndef __TFILE__ - #define __XFILE__(x) _T(x) + #define __XFILE__(x) Tx) #define __TFILE__ __XFILE__(__FILE__) #endif @@ -473,12 +480,12 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // will take us immediately to the place of the failed API #ifdef __VISUALC__ #define wxLogApiError(api, rc) \ - wxLogDebug(_T("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ + wxLogDebug(wxT("%s(%d): '%s' failed with error 0x%08lx (%s)."), \ __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc)) #else // !VC++ #define wxLogApiError(api, rc) \ - wxLogDebug(_T("In file %s at line %d: '%s' failed with " \ + wxLogDebug(wxT("In file %s at line %d: '%s' failed with " \ "error 0x%08lx (%s)."), \ __TFILE__, __LINE__, api, \ rc, wxSysErrorMsg(rc))