- virtual bool OnFontEncoding(const wxString& WXUNUSED(family),
- const wxString& WXUNUSED(encoding))
- { return FALSE; }
+ virtual bool OnFontEncoding(const wxString& WXUNUSED(facename),
+ const wxString& encoding)
+ {
+ if (m_Encodings == NULL) m_Encodings = new wxArrayString;
+ m_Encodings -> Add(encoding);
+ return true;
+ }
+
+ // convenience function that returns array of facenames. Cannot be called
+ // before EnumerateFacenames.
+ wxArrayString *GetFacenames()
+ { return m_Facenames; }
+
+ // convenience function that returns array of encodings.
+ // Cannot be called before EnumerateEncodings.
+ wxArrayString *GetEncodings()
+ { return m_Encodings; }
+
+ // virtual dtor for the base class
+ virtual ~wxFontEnumerator()
+ {
+ if (m_Facenames) delete m_Facenames;
+ if (m_Encodings) delete m_Encodings;
+ }
+
+private:
+ wxArrayString *m_Facenames, *m_Encodings;
+
+ DECLARE_NO_COPY_CLASS(wxFontEnumerator)