Add wxHAS_CONFIG_AS_{REG,FILE}CONFIG symbols

Sometimes it's useful to have some code used only if wxConfig is defined
as wxRegConfig or only if it is defined as wxFileConfig and testing for
these symbols is more clear than testing for the platform (and more
correct, considering that setting wxUSE_CONFIG_NATIVE to 0 may result in
wxFileConfig being used even under Windows).
This commit is contained in:
Vadim Zeitlin 2024-01-04 02:53:23 +01:00
parent 055c4cbed5
commit ebe0847932
4 changed files with 16 additions and 7 deletions

View file

@ -57,7 +57,9 @@ enum
with the registry under Windows or text-based config files under Unix.
To make writing the portable code even easier, wxWidgets provides a typedef
wxConfig which is mapped onto the native wxConfigBase implementation on the
given platform: i.e. wxRegConfig under Windows and wxFileConfig otherwise.
given platform: i.e. wxRegConfig under Windows (in this case
`wxHAS_CONFIG_AS_REGCONFIG` preprocessor symbol is defined) and
wxFileConfig otherwise (in this case `wxHAS_CONFIG_AS_FILECONFIG` is).
See @ref overview_config for a description of all features of this class.