File: fontenum.tex

package info (click to toggle)
wxwidgets2.8 2.8.10.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 239,052 kB
  • ctags: 289,550
  • sloc: cpp: 1,838,857; xml: 396,717; python: 282,506; ansic: 126,171; makefile: 51,406; sh: 14,581; asm: 299; sql: 258; lex: 194; perl: 139; yacc: 128; pascal: 95; php: 39; lisp: 38; tcl: 24; haskell: 20; java: 18; cs: 18; erlang: 17; ruby: 16; ada: 9; ml: 9; csh: 9
file content (116 lines) | stat: -rw-r--r-- 4,565 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Name:        fontenum.tex
%% Purpose:     wxFontEnumerator documentation
%% Author:      Vadim Zeitlin
%% Modified by:
%% Created:     03.11.99
%% RCS-ID:      $Id: fontenum.tex 39411 2006-05-29 00:03:36Z VZ $
%% Copyright:   (c) Vadim Zeitlin
%% License:     wxWindows license
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{\class{wxFontEnumerator}}\label{wxfontenumerator}

wxFontEnumerator enumerates either all available fonts on the system or only
the ones with given attributes - either only fixed-width (suited for use in
programs such as terminal emulators and the like) or the fonts available in
the given \helpref{encoding}{wxfontencodingoverview}.

To do this, you just have to call one of EnumerateXXX() functions - either 
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or 
\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} and the
corresponding callback (\helpref{OnFacename}{wxfontenumeratoronfacename} or 
\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding}) will be called
repeatedly until either all fonts satisfying the specified criteria are
exhausted or the callback returns false.

\wxheading{Virtual functions to override}

Either \helpref{OnFacename}{wxfontenumeratoronfacename} or 
\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden
depending on whether you plan to call 
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or 
\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. Of course,
if you call both of them, you should override both functions.

\wxheading{Derived from}

None

\wxheading{Include files}

<wx/fontenum.h>

\wxheading{See also}

\helpref{Font encoding overview}{wxfontencodingoverview}, 
\helpref{Font sample}{samplefont}, 
\helpref{wxFont}{wxfont}, 
\helpref{wxFontMapper}{wxfontmapper}



\latexignore{\rtfignore{\wxheading{Members}}}

\membersection{wxFontEnumerator::EnumerateFacenames}\label{wxfontenumeratorenumeratefacenames}

\func{virtual bool}{EnumerateFacenames}{
    \param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM},
    \param{bool }{fixedWidthOnly = false}}

Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which
supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of
fixed width (if \arg{fixedWidthOnly} is true).

Calling this function with default arguments will result in enumerating all
fonts available on the system.


\membersection{wxFontEnumerator::EnumerateEncodings}\label{wxfontenumeratorenumerateencodings}

\func{virtual bool}{EnumerateEncodings}{\param{const wxString\& }{font = ""}}

Call \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} for each
encoding supported by the given font - or for each encoding supported by at
least some font if {\it font} is not specified.


\membersection{wxFontEnumerator::GetEncodings}\label{wxfontenumeratorgetencodings}

\func{static wxArrayString}{GetEncodings}{\param{const wxString\&}{ facename = ""}}

Return array of strings containing all encodings found by 
\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}.


\membersection{wxFontEnumerator::GetFacenames}\label{wxfontenumeratorgetfacenames}

\func{static wxArrayString}{GetFacenames}{\param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM}, \param{bool }{fixedWidthOnly = false}}

Return array of strings containing all facenames found by 
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames}.


\membersection{wxFontEnumerator::IsValidFacename}\label{wxfontenumeratorisvalidfacename}

\func{static bool}{IsValidFacename}{\param{const wxString \&}{ facename}}

Returns \true if the given string is valid face name, i.e. it's the face name of an installed
font and it can safely be used with \helpref{wxFont::SetFaceName}{wxfontsetfacename}.


\membersection{wxFontEnumerator::OnFacename}\label{wxfontenumeratoronfacename}

\func{virtual bool}{OnFacename}{\param{const wxString\& }{font}}

Called by \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} for
each match. Return true to continue enumeration or false to stop it.


\membersection{wxFontEnumerator::OnFontEncoding}\label{wxfontenumeratoronfontencoding}

\func{virtual bool}{OnFontEncoding}{\param{const wxString\& }{font}, \param{const wxString\& }{encoding}}

Called by \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} for
each match. Return true to continue enumeration or false to stop it.