X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..ccdcde00d9ae27ca20ff6c3c9495918a0ec725aa:/include/wx/fontmap.h?ds=inline diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index 9331241a2a..53edf7f17c 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -59,6 +59,11 @@ public: // 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 @@ -166,6 +171,7 @@ protected: #if wxUSE_CONFIG // config object and path (in it) to use wxConfigBase *m_config; + bool m_configIsDummy; #endif wxString m_configRootPath; @@ -179,6 +185,9 @@ protected: #endif // wxUSE_GUI friend class wxFontMapperPathChanger; + +private: + static wxFontMapper *sm_instance; }; // ---------------------------------------------------------------------------- @@ -186,7 +195,8 @@ protected: // ---------------------------------------------------------------------------- // 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