]>
Commit | Line | Data |
---|---|---|
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 | ||
14 | wxFontEnumerator enumerates either all available fonts on the system or only | |
15 | the ones with given attributes - either only fixed-width (suited for use in | |
16 | programs such as terminal emulators and the like) or the fonts available in | |
17 | the given \helpref{encoding}{wxfontencodingoverview}. | |
18 | ||
19 | To 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 |
22 | corresponding callback ( | |
3c1866e8 | 23 | \helpref{OnFacename}{wxFontEnumeratoronfacename} or |
775a998e VZ |
24 | \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding}) will be called |
25 | repeatedly until either all fonts (satisfying the specified criteria) are | |
26 | exhausted or the callback returns FALSE. | |
27 | ||
28 | \wxheading{Virtual functions to override} | |
29 | ||
3c1866e8 | 30 | Either \helpref{OnFacename}{wxfontenumeratoronfacename} or |
775a998e VZ |
31 | \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden |
32 | depending on whether you plan to call | |
3c1866e8 | 33 | \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or |
775a998e VZ |
34 | \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. Of course, |
35 | if you call both of them, you should override both functions. | |
36 | ||
37 | \wxheading{Derived from} | |
38 | ||
39 | None | |
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 | 60 | Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which |
775a998e VZ |
61 | supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of |
62 | fixed width (if {\it fixedWidthOnly} is TRUE). | |
63 | ||
64 | Calling this function with default arguments will result in enumerating all | |
65 | fonts available on the system. | |
66 | ||
67 | \membersection{wxFontEnumerator::EnumerateEncodings}\label{wxfontenumeratorenumerateencodings} | |
68 | ||
69 | \func{virtual bool}{EnumerateEncodings}{\param{const wxString\& }{font = ""}} | |
70 | ||
71 | Call \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} for each | |
72 | encoding supported by the given font - or for each encoding supported by at | |
73 | least 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 | ||
80 | Return array of strings containing all encodings found by | |
81 | \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. This is convenience function. It is | |
82 | based on default implementation of \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} so don't expect | |
83 | it to work if you overwrite that method. | |
84 | ||
85 | \membersection{wxFontEnumerator::GetFacenames}\label{wxfontenumeratorgetfacenames} | |
86 | ||
87 | \func{wxArrayString*}{GetFacenames}{\void} | |
88 | ||
89 | Return array of strings containing all facenames found by | |
90 | \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames}. This is convenience function. It is | |
91 | based on default implementation of \helpref{OnFacename}{wxfontenumeratoronfacename} so don't expect | |
92 | it 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 | 99 | Called by \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} for |
775a998e VZ |
100 | each 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 | ||
109 | Called by \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} for | |
110 | each match. Return TRUE to continue enumeration or FALSE to stop it. | |
111 |