// wxFontMapperPathChanger: change the config path during our lifetime
// ----------------------------------------------------------------------------
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
class wxFontMapperPathChanger
{
#include "wx/fontutil.h" // for wxNativeEncodingInfo
#endif // wxUSE_GUI
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
class WXDLLIMPEXP_BASE wxConfigBase;
#endif // wxUSE_CONFIG
// return instance of the wxFontMapper singleton
static wxFontMapper *Get();
- // set the sigleton to 'mapper' instance and return previous one
+ // set the singleton to 'mapper' instance and return previous one
static wxFontMapper *Set(wxFontMapper *mapper);
-
// translates charset strings to encoding
// --------------------------------------
virtual wxFontEncoding CharsetToEncoding(const wxString& charset,
bool interactive = true);
-
// information about supported encodings
// -------------------------------------
// GetDefaultConfigPath()
// ----------------------------------------------------------------------
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// set the config object to use (may be NULL to use default)
void SetConfig(wxConfigBase *config) { m_config = config; }
protected:
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// get the config object we're using -- if it wasn't set explicitly, this
// function will use wxConfig::Get() to get the global one
wxConfigBase *GetConfig();
GetConfig()->SetPath(pathOld);
}
+#endif
+
// ----------------------------------------------------------------------------
// charset/encoding correspondence
// ----------------------------------------------------------------------------
return str;
}
-#endif // wxUSE_CONFIG
-
#endif // wxUSE_FONTMAP
encoding = GetEncoding(n);
}
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// save the result in the config now
wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH);
if ( path.IsOk() )
if ( wxGetNativeFontEncoding(encReplacement, info) &&
wxTestFontEncoding(*info) )
{
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// remember the mapping in the config
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
}
configEntry += encName;
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// do we have a font spec for this encoding?
wxString fontinfo;
wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH);
*info = retData.EncodingInfo();
info->encoding = retData.GetEncoding();
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
// remember this in the config
wxFontMapperPathChanger path(this,
FONTMAPPER_FONT_FROM_ENCODING_PATH);
// or selected to use equivalent encoding
//
// remember it to avoid asking the same question again later
-#if wxUSE_CONFIG
+#if wxUSE_CONFIG && wxUSE_FILECONFIG
wxFontMapperPathChanger path(this,
FONTMAPPER_FONT_FROM_ENCODING_PATH);
if ( path.IsOk() )