]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/fontenum.tex
Always draw the selection of selected items, not just when they have
[wxWidgets.git] / docs / latex / wx / fontenum.tex
... / ...
CommitLineData
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: fontenum.tex
3%% Purpose: wxFontEnumerator documentation
4%% Author: Vadim Zeitlin
5%% Modified by:
6%% Created: 03.11.99
7%% RCS-ID: $Id$
8%% Copyright: (c) Vadim Zeitlin
9%% License: wxWindows license
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxFontEnumerator}}\label{wxfontenumerator}
13
14wxFontEnumerator enumerates either all available fonts on the system or only
15the ones with given attributes - either only fixed-width (suited for use in
16programs such as terminal emulators and the like) or the fonts available in
17the given \helpref{encoding}{wxfontencodingoverview}.
18
19To do this, you just have to call one of EnumerateXXX() functions - either
20\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
21\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} and the
22corresponding callback (\helpref{OnFacename}{wxfontenumeratoronfacename} or
23\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding}) will be called
24repeatedly until either all fonts satisfying the specified criteria are
25exhausted or the callback returns false.
26
27\wxheading{Virtual functions to override}
28
29Either \helpref{OnFacename}{wxfontenumeratoronfacename} or
30\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden
31depending on whether you plan to call
32\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
33\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. Of course,
34if you call both of them, you should override both functions.
35
36\wxheading{Derived from}
37
38None
39
40\wxheading{Include files}
41
42<wx/fontenum.h>
43
44\wxheading{See also}
45
46\helpref{Font encoding overview}{wxfontencodingoverview},
47\helpref{Font sample}{samplefont},
48\helpref{wxFont}{wxfont},
49\helpref{wxFontMapper}{wxfontmapper}
50
51
52
53\latexignore{\rtfignore{\wxheading{Members}}}
54
55\membersection{wxFontEnumerator::EnumerateFacenames}\label{wxfontenumeratorenumeratefacenames}
56
57\func{virtual bool}{EnumerateFacenames}{
58 \param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM},
59 \param{bool }{fixedWidthOnly = false}}
60
61Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which
62supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of
63fixed width (if \arg{fixedWidthOnly} is true).
64
65Calling this function with default arguments will result in enumerating all
66fonts available on the system.
67
68
69\membersection{wxFontEnumerator::EnumerateEncodings}\label{wxfontenumeratorenumerateencodings}
70
71\func{virtual bool}{EnumerateEncodings}{\param{const wxString\& }{font = ""}}
72
73Call \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} for each
74encoding supported by the given font - or for each encoding supported by at
75least some font if {\it font} is not specified.
76
77
78\membersection{wxFontEnumerator::GetEncodings}\label{wxfontenumeratorgetencodings}
79
80\func{static wxArrayString}{GetEncodings}{\param{const wxString\&}{ facename = ""}}
81
82Return array of strings containing all encodings found by
83\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}.
84
85
86\membersection{wxFontEnumerator::GetFacenames}\label{wxfontenumeratorgetfacenames}
87
88\func{static wxArrayString}{GetFacenames}{\param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM}, \param{bool }{fixedWidthOnly = false}}
89
90Return array of strings containing all facenames found by
91\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames}.
92
93
94\membersection{wxFontEnumerator::IsValidFacename}\label{wxfontenumeratorisvalidfacename}
95
96\func{static bool}{IsValidFacename}{\param{const wxString \&}{ facename}}
97
98Returns \true if the given string is valid face name, i.e. it's the face name of an installed
99font and it can safely be used with \helpref{wxFont::SetFaceName}{wxfontsetfacename}.
100
101
102\membersection{wxFontEnumerator::OnFacename}\label{wxfontenumeratoronfacename}
103
104\func{virtual bool}{OnFacename}{\param{const wxString\& }{font}}
105
106Called by \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} for
107each match. Return true to continue enumeration or false to stop it.
108
109
110\membersection{wxFontEnumerator::OnFontEncoding}\label{wxfontenumeratoronfontencoding}
111
112\func{virtual bool}{OnFontEncoding}{\param{const wxString\& }{font}, \param{const wxString\& }{encoding}}
113
114Called by \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} for
115each match. Return true to continue enumeration or false to stop it.
116