virtual ~wxFontMapperBase();
// return instance of the wxFontMapper singleton
-#if wxUSE_GUI
- // GUI code needs to know it's a wxFontMapper because there
- // are additional methods in the subclass.
- static wxFontMapper *Get();
-#else
// wxBase code only cares that it's a wxFontMapperBase
static wxFontMapperBase *Get();
-#endif
// set the singleton to 'mapper' instance and return previous one
static wxFontMapper *Set(wxFontMapper *mapper);
// the title for the dialogs (note that default is quite reasonable)
void SetDialogTitle(const wxString& title) { m_titleDialog = title; }
+ // GUI code needs to know it's a wxFontMapper because there
+ // are additional methods in the subclass.
+ static wxFontMapper *Get();
protected:
// GetAltForEncoding() helper: tests for the existence of the given
{
}
+/* static */
+// Declared as returning wxFontMapper when wxUSE_GUI=1. Unfortunately, it's
+// only implemented in wxBase library. Note that if the last resort
+// is taken and GUI code tries to treat it as a real wxFontMapper
+// then you'd be in trouble.
+wxFontMapper *wxFontMapper::Get()
+{
+ return (wxFontMapper*)wxFontMapperBase::Get();
+}
+
wxFontEncoding
wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive)
{