X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df693ed65cb3897397de903ddfc0318635eb5bd2..106f0d98f88a701b4c9ea7e2419d7ee6c66de13b:/interface/wx/config.h diff --git a/interface/wx/config.h b/interface/wx/config.h index 65a6c1d1a8..7fc1911798 100644 --- a/interface/wx/config.h +++ b/interface/wx/config.h @@ -3,13 +3,13 @@ // Purpose: interface of wxConfigBase // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @class wxConfigBase - wxConfigBase defines the basic interface of all config classes. It can not + wxConfigBase defines the basic interface of all config classes. It cannot be used by itself (it is an abstract base class) and you will always use one of its derivations: wxFileConfig, wxRegConfig or any other. @@ -312,7 +312,7 @@ public: @n The @c wxCONFIG_USE_NO_ESCAPE_CHARACTERS style can be helpful if your config file must be read or written to by a non-wxWidgets program (which might not understand the escape characters). Note, however, - that if @c wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is is + that if @c wxCONFIG_USE_NO_ESCAPE_CHARACTERS style is used, it is now your application's responsibility to ensure that there is no newline or other illegal characters in a value, before writing that value to the file. @@ -763,7 +763,7 @@ public: /** Delete the whole underlying object (disk file, registry key, ...). - Primarly for use by uninstallation routine. + Primarily for use by uninstallation routine. */ virtual bool DeleteAll() = 0; @@ -845,10 +845,26 @@ public: /** - Create a new config object: this function will create the "best" - implementation of wxConfig available for the current platform, see - comments near the definition of wxCONFIG_WIN32_NATIVE for details. It - returns the created object and also sets it as the current one. + Create a new config object and sets it as the current one. + + This function will create the most appropriate implementation of + wxConfig available for the current platform. By default this means that + the system registry will be used for storing the configuration + information under MSW and a file under the user home directory (see + wxStandardPaths::GetUserConfigDir()) elsewhere. + + If you prefer to use the configuration files everywhere, you can define + @c wxUSE_CONFIG_NATIVE to 0 when compiling wxWidgets. Or you can simply + always create wxFileConfig explicitly. + + Finally, if you want to create a custom wxConfig subclass you may + change this function behaviour by overriding wxAppTraits::CreateConfig() + to create it. An example when this could be useful could be an + application which could be installed either normally (in which case the + default behaviour of using wxRegConfig is appropriate) or in a + "portable" way in which case a wxFileConfig with a file in the program + directory would be used and the choice would be done in CreateConfig() + at run-time. */ static wxConfigBase* Create();