compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 1999-06-01 22:46:59 +00:00
parent 717226c9c9
commit 546db2a8f8
4 changed files with 35 additions and 14 deletions

View File

@ -16,6 +16,25 @@
#pragma interface "log.h"
#endif
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxLogFrame;
class WXDLLEXPORT wxFrame;
// ----------------------------------------------------------------------------
// types
// ----------------------------------------------------------------------------
typedef unsigned long wxTraceMask;
typedef unsigned long wxLogLevel;
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#if wxUSE_LOG
#include <time.h> // for time_t
@ -68,17 +87,6 @@ enum
#define wxTraceOleCalls 0x0100 // OLE interface calls
#endif
typedef unsigned long wxTraceMask;
typedef unsigned long wxLogLevel;
// ----------------------------------------------------------------------------
// forward declarations
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxLogFrame;
class WXDLLEXPORT wxFrame;
#if wxUSE_IOSTREAMH
// N.B. BC++ doesn't have istream.h, ostream.h
# include <iostream.h>
@ -376,10 +384,9 @@ extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
// log functions do nothing at all
#define DECLARE_LOG_FUNCTION(level) \
inline void WXDLLEXPORT wxLog##level(const wxChar * WXUNUSED(szFormat), ...) {}
inline void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...) {}
#define DECLARE_LOG_FUNCTION2(level, arg1) \
inline void WXDLLEXPORT wxLog##level(WXUNUSED(arg1), \
const wxChar *WXUNUSED(szFormat), ...) {}
inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {}
#endif // wxUSE_LOG/!wxUSE_LOG

View File

@ -18,6 +18,7 @@
#include "wx/defs.h"
#include "wx/event.h"
#include "wx/dynarray.h"
class WXDLLEXPORT wxMenuItem;
class WXDLLEXPORT wxMenuBar;

View File

@ -172,6 +172,13 @@
#define wxUSE_SOCKETS 0
// Set to 1 to use socket classes
// these settings can't be set to 0 for now
#define wxUSE_INTL 1
#define wxUSE_LOG 1
#define wxUSE_VALIDATORS 1
#define wxUSE_ACCEL 1
#define wxUSE_SASH 1
/*
* Finer detail
*

View File

@ -416,6 +416,7 @@ void wxApp::CleanUp()
{
//// COMMON CLEANUP
#if wxUSE_LOG
// flush the logged messages if any and install a 'safer' log target: the
// default one (wxLogGui) can't be used after the resources are freed just
// below and the user suppliedo ne might be even more unsafe (using any
@ -424,6 +425,7 @@ void wxApp::CleanUp()
// this will flush the old messages if any
delete wxLog::SetActiveTarget(new wxLogStderr);
#endif // wxUSE_LOG
// One last chance for pending objects to be cleaned up
wxTheApp->DeletePendingObjects();
@ -529,8 +531,10 @@ void wxApp::CleanUp()
// wxDebugContext::SetStream(NULL, NULL);
#endif
#if wxUSE_LOG
// do it as the very last thing because everything else can log messages
delete wxLog::SetActiveTarget(NULL);
#endif // wxUSE_LOG
}
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
@ -944,10 +948,12 @@ void wxApp::OnIdle(wxIdleEvent& event)
// 'Garbage' collection of windows deleted with Close().
DeletePendingObjects();
#if wxUSE_LOG
// flush the logged messages if any
wxLog *pLog = wxLog::GetActiveTarget();
if ( pLog != NULL && pLog->HasPendingMessages() )
pLog->Flush();
#endif // wxUSE_LOG
// Send OnIdle events to all windows
if ( SendIdleEvents() )