X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1b8d4d841979b9fed749e1f8a18abc58975a4d9..594f0f5bf1355fb8d58f403d3ebacc1c1767c429:/include/wx/confbase.h diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 584d4de71c..25b97678b8 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -19,9 +19,6 @@ #endif #include "wx/defs.h" - -#if wxUSE_CONFIG - #include "wx/string.h" // ---------------------------------------------------------------------------- @@ -44,6 +41,10 @@ #define wxCONFIG_IMMUTABLE_PREFIX _T('!') #endif +#if wxUSE_CONFIG + +#include "wx/string.h" + /// should we use registry instead of configuration files under Windows? // (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's // FALSE) or wxRegConfig (if it's true and we're under Win32) or wxIniConfig @@ -188,7 +189,11 @@ public: virtual bool Write(const wxString& key, double value); virtual bool Write(const wxString& key, bool value); - // permanently writes all changes + // we have to provide a separate version for C strings as otherwise they + // would be converted to bool and not to wxString as expected! + virtual bool Write(const wxString& key, const wxChar *value); + + // permanently writes all changes virtual bool Flush(bool bCurrentOnly = FALSE) = 0; // renaming, all functions return FALSE on failure (probably because the new @@ -298,21 +303,19 @@ private: #endif // wxUSE_CONFIG -// ---------------------------------------------------------------------------- -// various helper global functions (defined even if !wxUSE_CONFIG) -// ---------------------------------------------------------------------------- - /* Replace environment variables ($SOMETHING) with their values. The format is $VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and '_' only. '$' must be escaped ('\$') in order to be taken literally. - */ -extern WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz); +*/ + +WXDLLEXPORT wxString wxExpandEnvVars(const wxString &sz); /* Split path into parts removing '..' in progress */ -extern WXDLLEXPORT void wxSplitPath(wxArrayString& aParts, const wxChar *sz); +WXDLLEXPORT void wxSplitPath(wxArrayString& aParts, const wxChar *sz); + #endif // _WX_CONFIG_H_