]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/fontenum.tex
fall back on text value if no long/double value could be retrieved from the cell
[wxWidgets.git] / docs / latex / wx / fontenum.tex
CommitLineData
775a998e
VZ
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%% Licence: wxWindows licence
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
3c1866e8 20\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
775a998e
VZ
21\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} and the
22corresponding callback (
3c1866e8 23\helpref{OnFacename}{wxFontEnumeratoronfacename} or
775a998e
VZ
24\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding}) will be called
25repeatedly until either all fonts (satisfying the specified criteria) are
26exhausted or the callback returns FALSE.
27
28\wxheading{Virtual functions to override}
29
3c1866e8 30Either \helpref{OnFacename}{wxfontenumeratoronfacename} or
775a998e
VZ
31\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden
32depending on whether you plan to call
3c1866e8 33\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
775a998e
VZ
34\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. Of course,
35if you call both of them, you should override both functions.
36
37\wxheading{Derived from}
38
39None
40
41\wxheading{Include files}
42
43<wx/fontenum.h>
44
45\wxheading{See also}
46
47\helpref{Font encoding overview}{wxfontencodingoverview},
48\helpref{Font sample}{samplefont},
49\helpref{wxFont}{wxfont},
50\helpref{wxFontMapper}{wxfontmapper}
51
52\latexignore{\rtfignore{\wxheading{Members}}}
53
3c1866e8 54\membersection{wxFontEnumerator::EnumerateFacenames}\label{wxfontenumeratorenumeratefacenames}
775a998e 55
3c1866e8 56\func{virtual bool}{EnumerateFacenames}{
775a998e
VZ
57 \param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM},
58 \param{bool }{fixedWidthOnly = FALSE}}
59
3c1866e8 60Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which
775a998e
VZ
61supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of
62fixed width (if {\it fixedWidthOnly} is TRUE).
63
64Calling this function with default arguments will result in enumerating all
65fonts available on the system.
66
67\membersection{wxFontEnumerator::EnumerateEncodings}\label{wxfontenumeratorenumerateencodings}
68
69\func{virtual bool}{EnumerateEncodings}{\param{const wxString\& }{font = ""}}
70
71Call \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} for each
72encoding supported by the given font - or for each encoding supported by at
73least some font if {\it font} is not specified.
74
435151d7
VS
75
76\membersection{wxFontEnumerator::GetEncodings}\label{wxfontenumeratorgetencodings}
77
78\func{wxArrayString*}{GetEncodings}{\void}
79
80Return array of strings containing all encodings found by
81\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. This is convenience function. It is
82based on default implementation of \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} so don't expect
83it to work if you overwrite that method.
84
85\membersection{wxFontEnumerator::GetFacenames}\label{wxfontenumeratorgetfacenames}
86
87\func{wxArrayString*}{GetFacenames}{\void}
88
89Return array of strings containing all facenames found by
90\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames}. This is convenience function. It is
91based on default implementation of \helpref{OnFacename}{wxfontenumeratoronfacename} so don't expect
92it to work if you overwrite that method.
93
94
3c1866e8 95\membersection{wxFontEnumerator::OnFacename}\label{wxfontenumeratoronfacename}
775a998e 96
3c1866e8 97\func{virtual bool}{OnFacename}{\param{const wxString\& }{font}}
775a998e 98
3c1866e8 99Called by \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} for
775a998e
VZ
100each match. Return TRUE to continue enumeration or FALSE to stop it.
101
102\membersection{wxFontEnumerator::OnFontEncoding}\label{wxfontenumeratoronfontencoding}
103
104\func{virtual bool}{OnFontEncoding}{
cd77c085
JS
105 \param{const wxString\& }{font},
106 \param{const wxString\& }{encoding}
775a998e
VZ
107}
108
109Called by \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} for
110each match. Return TRUE to continue enumeration or FALSE to stop it.
111