From 6a06dd8df2db19e3e646f2d3c8f696168e98f846 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 26 May 1998 15:15:22 +0000 Subject: [PATCH] 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 --- include/wx/gtk/app.h | 7 +++++++ include/wx/gtk/setup.h | 7 ++++++- include/wx/gtk1/app.h | 7 +++++++ include/wx/gtk1/setup.h | 7 ++++++- 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/include/wx/gtk/app.h b/include/wx/gtk/app.h index 11af9c4903..6e79190ab4 100644 --- a/include/wx/gtk/app.h +++ b/include/wx/gtk/app.h @@ -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; diff --git a/include/wx/gtk/setup.h b/include/wx/gtk/setup.h index aafc14035f..8f2b73a8d8 100644 --- a/include/wx/gtk/setup.h +++ b/include/wx/gtk/setup.h @@ -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 diff --git a/include/wx/gtk1/app.h b/include/wx/gtk1/app.h index 11af9c4903..6e79190ab4 100644 --- a/include/wx/gtk1/app.h +++ b/include/wx/gtk1/app.h @@ -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; diff --git a/include/wx/gtk1/setup.h b/include/wx/gtk1/setup.h index aafc14035f..8f2b73a8d8 100644 --- a/include/wx/gtk1/setup.h +++ b/include/wx/gtk1/setup.h @@ -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 -- 2.47.2