#ifndef _WX_FONTMAPPER_H_
#define _WX_FONTMAPPER_H_
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(__APPLE__)
#pragma interface "fontmap.h"
#endif
// headers
// ----------------------------------------------------------------------------
+#if wxUSE_FONTMAP
+
#include "wx/fontenc.h" // for wxFontEncoding
+
#if wxUSE_GUI
#include "wx/fontutil.h" // for wxNativeEncodingInfo
#endif // wxUSE_GUI
// virtual dtor for a base class
virtual ~wxFontMapper();
+ // return instance of the wxFontMapper singleton
+ static wxFontMapper *Get();
+ // set the sigleton to 'mapper' instance and return previous one
+ static wxFontMapper *Set(wxFontMapper *mapper);
+
#if wxUSE_GUI
// find an alternative for the given encoding (which is supposed to not be
// available on this system). If successful, return TRUE and fill info
#if wxUSE_CONFIG
// config object and path (in it) to use
wxConfigBase *m_config;
+ bool m_configIsDummy;
#endif
wxString m_configRootPath;
#endif // wxUSE_GUI
friend class wxFontMapperPathChanger;
+
+private:
+ static wxFontMapper *sm_instance;
};
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// the default font mapper for wxWindows programs
-WXDLLEXPORT_DATA(extern wxFontMapper *) wxTheFontMapper;
+// do NOT use! This is for backward compatibility, use wxFontMapper::Get() instead
+#define wxTheFontMapper (wxFontMapper::Get())
+
+#endif // wxUSE_FONTMAP
#endif // _WX_FONTMAPPER_H_