added wxFontMapper::Get/Set

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2002-04-06 15:04:27 +00:00
parent 5a224901b8
commit 142b3bc26a
25 changed files with 104 additions and 63 deletions

View File

@@ -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
@@ -180,6 +185,9 @@ protected:
#endif // wxUSE_GUI
friend class wxFontMapperPathChanger;
private:
static wxFontMapper *sm_instance;
};
// ----------------------------------------------------------------------------
@@ -187,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