+#include "wx/fontutil.h"
+#include "wx/fontenum.h"
+#include "wx/fontmap.h"
+
+#include "wx/msw/private.h"
+
+// ----------------------------------------------------------------------------
+// private classes
+// ----------------------------------------------------------------------------
+
+// the helper class which calls ::EnumFontFamilies() and whose OnFont() is
+// called from the callback passed to this function and, in its turn, calls the
+// appropariate wxFontEnumerator method
+class wxFontEnumeratorHelper
+{
+public:
+ wxFontEnumeratorHelper(wxFontEnumerator *fontEnum);
+
+ // control what exactly are we enumerating
+ // we enumerate fonts with given enocding
+ bool SetEncoding(wxFontEncoding encoding);
+ // we enumerate fixed-width fonts
+ void SetFixedOnly(bool fixedOnly) { m_fixedOnly = fixedOnly; }
+ // we enumerate the encodings available in this family
+ void SetFamily(const wxString& family);
+
+ // call to start enumeration
+ void DoEnumerate();
+
+ // called by our font enumeration proc
+ bool OnFont(const LPLOGFONT lf, const LPTEXTMETRIC tm) const;
+
+private:
+ // the object we forward calls to OnFont() to
+ wxFontEnumerator *m_fontEnum;
+
+ // if != -1, enum only fonts which have this encoding
+ int m_charset;
+
+ // if not empty, enum only the fonts with this facename
+ wxString m_facename;
+
+ // if not empty, enum only the fonts in this family
+ wxString m_family;