new compile option added: USE_WXCONFIG. If it's 1, wxApp has a virtual

wxConfig *CreateConfig() function which can be overloaded to create a global
config object (current implementation simply returns NULL for now).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-05-26 15:15:22 +00:00
parent 1fa9e86daf
commit 6a06dd8df2
4 changed files with 26 additions and 2 deletions

View File

@@ -24,6 +24,7 @@
class wxApp;
class wxLog;
class wxConfig; // it's not used #if !USE_WXCONFIG, but fwd decl doesn't harm
//-----------------------------------------------------------------------------
// global data
@@ -97,6 +98,12 @@ class wxApp: public wxEvtHandler
// user-defined classv (default implementation creates a wxLogGui object)
virtual wxLog *CreateLogTarget();
#if USE_WXCONFIG
// override this function to create a global wxConfig object of different
// than default type (right now the default implementation returns NULL)
virtual wxConfig *CreateConfig() { return NULL; }
#endif
bool m_initialized;
bool m_exitOnFrameDelete;
gint m_idleTag;

View File

@@ -176,6 +176,11 @@
* Use wxTree
*/
/*
* Use wxConfig profile management classes (wxFileConfig only under Unix)
*/
#define USE_WXCONFIG 1
/********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** DEBUGGING FEATURES ****************************/
@@ -188,7 +193,7 @@
/*
* Enables debugging: memory tracing, assert, etc.
*/
/* #undef DEBUG */
#define DEBUG 1
/*
* Enables debugging version of wxObject::new and wxObject::delete (IF DEBUG)
* WARNING: this code may not work with all architectures, especially

View File

@@ -24,6 +24,7 @@
class wxApp;
class wxLog;
class wxConfig; // it's not used #if !USE_WXCONFIG, but fwd decl doesn't harm
//-----------------------------------------------------------------------------
// global data
@@ -97,6 +98,12 @@ class wxApp: public wxEvtHandler
// user-defined classv (default implementation creates a wxLogGui object)
virtual wxLog *CreateLogTarget();
#if USE_WXCONFIG
// override this function to create a global wxConfig object of different
// than default type (right now the default implementation returns NULL)
virtual wxConfig *CreateConfig() { return NULL; }
#endif
bool m_initialized;
bool m_exitOnFrameDelete;
gint m_idleTag;

View File

@@ -176,6 +176,11 @@
* Use wxTree
*/
/*
* Use wxConfig profile management classes (wxFileConfig only under Unix)
*/
#define USE_WXCONFIG 1
/********************** DO NOT CHANGE BELOW THIS POINT **********************/
/**************************** DEBUGGING FEATURES ****************************/
@@ -188,7 +193,7 @@
/*
* Enables debugging: memory tracing, assert, etc.
*/
/* #undef DEBUG */
#define DEBUG 1
/*
* Enables debugging version of wxObject::new and wxObject::delete (IF DEBUG)
* WARNING: this code may not work with all architectures, especially