]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/fontenum.h
02f94a893065273b9fea8d83e573eba28c85561b
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFontEnumerator class for getting available fonts
4 // Author: Julian Smart, Vadim Zeitlin
5 // Modified by: extended to enumerate more than just font families and work ot
6 // only on Windows (VZ)
9 // Copyright: (c) Julian Smart, Vadim Zeitlin
10 // Licence: wxWindows licence
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef _WX_FONTENUM_H_
14 #define _WX_FONTENUM_H_
17 #pragma interface "fontenum.h"
20 // ----------------------------------------------------------------------------
21 // wxFontEnumerator enumerates all available fonts on the system or only the
22 // fonts with given attributes
23 // ----------------------------------------------------------------------------
25 class wxFontEnumerator
28 // start enumerating font families - will result in OnFontFamily() being
29 // called for each available font family (unless it returns FALSE)
30 virtual bool EnumerateFamilies(bool fixedWidthOnly
= FALSE
);
32 // enumerate the different encodings either for given font family or for
33 // all font families - will result in OnFontEncoding() being called for
34 // each available (family, encoding) couple
35 virtual bool EnumerateEncodings(const wxString
& family
= T(""));
37 // callbacks which are called after one of EnumerateXXX() functions from
38 // above is invoked - all of them may return FALSE to stop enumeration or
39 // TRUE to continue with it
41 // called by EnumerateFamilies
42 virtual bool OnFontFamily(const wxString
& WXUNUSED(family
))
45 // called by EnumerateEncodings
46 virtual bool OnFontEncoding(const wxString
& WXUNUSED(family
),
47 const wxString
& WXUNUSED(encoding
))
51 #endif // _WX_FONTENUM_H_