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();
};
#endif
-#ifndef wxUSE_NOGUI
+// the following log targets are only compiled in if the we're compiling the
+// 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)
+
+#if wxUSE_GUI
// log everything to a text window (GUI only of course)
class WXDLLEXPORT wxLogTextCtrl : public wxLog
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
// ----------------------------------------------------------------------------
#ifndef __TFILE__
- #define __XFILE__(x) _T(x)
+ #define __XFILE__(x) Tx)
#define __TFILE__ __XFILE__(__FILE__)
#endif
// 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))