minor changes and bug corrections (interface unchanged)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-08-03 22:49:01 +00:00
parent 0be4095abb
commit 275bf4c13a
5 changed files with 54 additions and 42 deletions

View File

@@ -88,13 +88,16 @@ public:
// static functions
// sets the config object, returns the previous pointer
static wxConfigBase *Set(wxConfigBase *pConfig);
// get the config object, creates it on demand
// get the config object, creates it on demand unless DontCreateOnDemand
// was called
static wxConfigBase *Get() { if ( !ms_pConfig ) Create(); return ms_pConfig; }
// create a new config object: this function will create the "best"
// implementation of wxConfig available for the current platform, see
// comments near definition wxCONFIG_WIN32_NATIVE for details. It returns
// the created object and also sets it as ms_pConfig.
static wxConfigBase *Create();
// should Get() try to create a new log object if the current one is NULL?
static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; }
// ctor & virtual dtor
// environment variable expansion is on by default
@@ -211,6 +214,7 @@ private:
// static variables
static wxConfigBase *ms_pConfig;
static bool ms_bAutoCreate;
};
// ----------------------------------------------------------------------------
@@ -228,4 +232,5 @@ private:
#define wxConfig wxFileConfig
#endif
#endif //_wxCONFIG_H
#endif //_wxCONFIG_H

View File

@@ -74,7 +74,8 @@ public:
bool HasPendingMessages() const { return m_bHasMessages; }
// only one sink is active at each moment
// get current log target
// get current log target, will call wxApp::CreateLogTarget() to create one
// if
static wxLog *GetActiveTarget();
// change log target, pLogger = NULL disables logging,
// returns the previous log target
@@ -90,6 +91,9 @@ public:
void SetTimeStampFormat(const char *szTF) { m_szTimeFormat = szTF; }
// trace mask (see wxTraceXXX constants for details)
static void SetTraceMask(wxTraceMask ulMask) { ms_ulTraceMask = ulMask; }
// should GetActiveTarget() try to create a new log object if the current
// is NULL?
static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; }
// accessors
// gets the verbose status
@@ -119,8 +123,8 @@ protected:
private:
// static variables
// ----------------
static wxLog *ms_pLogger; // currently active log sink
static bool ms_bInitialized; // any log targets created?
static wxLog *ms_pLogger; // currently active log sink
static bool ms_bAutoCreate; // automatically create new log targets?
static wxTraceMask ms_ulTraceMask; // controls wxLogTrace behaviour
};