projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some OS/2 updates
[wxWidgets.git]
/
include
/
wx
/
fontmap.h
diff --git
a/include/wx/fontmap.h
b/include/wx/fontmap.h
index 43285146c03632e6c7323cbd5131c433a67c714b..53edf7f17c7fedaf4111ae5b48f07779762004cf 100644
(file)
--- a/
include/wx/fontmap.h
+++ b/
include/wx/fontmap.h
@@
-20,7
+20,10
@@
// headers
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
+#if wxUSE_FONTMAP
+
#include "wx/fontenc.h" // for wxFontEncoding
#include "wx/fontenc.h" // for wxFontEncoding
+
#if wxUSE_GUI
#include "wx/fontutil.h" // for wxNativeEncodingInfo
#endif // wxUSE_GUI
#if wxUSE_GUI
#include "wx/fontutil.h" // for wxNativeEncodingInfo
#endif // wxUSE_GUI
@@
-56,6
+59,11
@@
public:
// virtual dtor for a base class
virtual ~wxFontMapper();
// 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_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
@@
-163,6
+171,7
@@
protected:
#if wxUSE_CONFIG
// config object and path (in it) to use
wxConfigBase *m_config;
#if wxUSE_CONFIG
// config object and path (in it) to use
wxConfigBase *m_config;
+ bool m_configIsDummy;
#endif
wxString m_configRootPath;
#endif
wxString m_configRootPath;
@@
-176,6
+185,9
@@
protected:
#endif // wxUSE_GUI
friend class wxFontMapperPathChanger;
#endif // wxUSE_GUI
friend class wxFontMapperPathChanger;
+
+private:
+ static wxFontMapper *sm_instance;
};
// ----------------------------------------------------------------------------
};
// ----------------------------------------------------------------------------
@@
-183,6
+195,9
@@
protected:
// ----------------------------------------------------------------------------
// the default font mapper for wxWindows programs
// ----------------------------------------------------------------------------
// 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_
#endif // _WX_FONTMAPPER_H_