X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03147cd08e78ba8a709ee019a8a51ac6b57e6f32..1ccabb813a537c2541f88eb39a83f964d2d42f00:/include/wx/log.h diff --git a/include/wx/log.h b/include/wx/log.h index 5ea8d6f649..d7d62303dc 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: log.h +// Name: wx/log.h // Purpose: Assorted wxLogXXX functions, and wxLog (sink for logs) // Author: Vadim Zeitlin // Modified by: @@ -264,30 +264,6 @@ protected: #endif // wxUSE_STD_IOSTREAM -// 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 - -#if wxUSE_TEXTCTRL - -// log everything to a text window (GUI only of course) -class WXDLLEXPORT wxLogTextCtrl : public wxLog -{ -public: - wxLogTextCtrl(wxTextCtrl *pTextCtrl); - -private: - // implement sink function - virtual void DoLogString(const wxChar *szString, time_t t); - - // the control we use - wxTextCtrl *m_pTextCtrl; -}; - -#endif // wxUSE_TEXTCTRL - // ---------------------------------------------------------------------------- // /dev/null log target: suppress logging until this object goes out of scope // ---------------------------------------------------------------------------- @@ -368,9 +344,35 @@ private: class WXDLLEXPORT wxLogPassThrough : public wxLogChain { public: - wxLogPassThrough() : wxLogChain(this) { } + wxLogPassThrough(); +}; + +// ---------------------------------------------------------------------------- +// 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 + +#if wxUSE_TEXTCTRL + +// log everything to a text window (GUI only of course) +class WXDLLEXPORT wxLogTextCtrl : public wxLog +{ +public: + wxLogTextCtrl(wxTextCtrl *pTextCtrl); + +private: + // implement sink function + virtual void DoLogString(const wxChar *szString, time_t t); + + // the control we use + wxTextCtrl *m_pTextCtrl; }; +#endif // wxUSE_TEXTCTRL + // ---------------------------------------------------------------------------- // GUI log target, the default one for wxWindows programs // ---------------------------------------------------------------------------- @@ -541,11 +543,6 @@ DECLARE_LOG_FUNCTION2(SysError, long lErrCode); // debug only logging functions: use them with API name and error code // ---------------------------------------------------------------------------- -#ifndef __TFILE__ - #define __XFILE__(x) Tx) - #define __TFILE__ __XFILE__(__FILE__) -#endif - #ifdef __WXDEBUG__ // make life easier for people using VC++ IDE: clicking on the message // will take us immediately to the place of the failed API