1999-11-03 23:51:07 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
%% Name: fontenum.tex
|
|
|
|
%% Purpose: wxFontEnumerator documentation
|
|
|
|
%% Author: Vadim Zeitlin
|
|
|
|
%% Modified by:
|
|
|
|
%% Created: 03.11.99
|
|
|
|
%% RCS-ID: $Id$
|
|
|
|
%% Copyright: (c) Vadim Zeitlin
|
2005-02-22 15:09:56 +00:00
|
|
|
%% License: wxWindows license
|
1999-11-03 23:51:07 +00:00
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|
|
|
|
\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
|
1999-11-04 20:40:41 +00:00
|
|
|
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
|
1999-11-03 23:51:07 +00:00
|
|
|
\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} and the
|
2001-05-25 12:47:00 +00:00
|
|
|
corresponding callback (\helpref{OnFacename}{wxfontenumeratoronfacename} or
|
1999-11-03 23:51:07 +00:00
|
|
|
\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding}) will be called
|
2000-03-15 00:21:49 +00:00
|
|
|
repeatedly until either all fonts satisfying the specified criteria are
|
2003-01-18 00:16:34 +00:00
|
|
|
exhausted or the callback returns false.
|
1999-11-03 23:51:07 +00:00
|
|
|
|
|
|
|
\wxheading{Virtual functions to override}
|
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
Either \helpref{OnFacename}{wxfontenumeratoronfacename} or
|
1999-11-03 23:51:07 +00:00
|
|
|
\helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden
|
|
|
|
depending on whether you plan to call
|
1999-11-04 20:40:41 +00:00
|
|
|
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or
|
1999-11-03 23:51:07 +00:00
|
|
|
\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}
|
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
|
|
|
|
|
1999-11-03 23:51:07 +00:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
\membersection{wxFontEnumerator::EnumerateFacenames}\label{wxfontenumeratorenumeratefacenames}
|
1999-11-03 23:51:07 +00:00
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
\func{virtual bool}{EnumerateFacenames}{
|
1999-11-03 23:51:07 +00:00
|
|
|
\param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM},
|
2003-01-18 00:16:34 +00:00
|
|
|
\param{bool }{fixedWidthOnly = false}}
|
1999-11-03 23:51:07 +00:00
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which
|
1999-11-03 23:51:07 +00:00
|
|
|
supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of
|
2006-05-28 13:51:34 +00:00
|
|
|
fixed width (if \arg{fixedWidthOnly} is true).
|
1999-11-03 23:51:07 +00:00
|
|
|
|
|
|
|
Calling this function with default arguments will result in enumerating all
|
|
|
|
fonts available on the system.
|
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
|
1999-11-03 23:51:07 +00:00
|
|
|
\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.
|
|
|
|
|
1999-11-06 15:38:23 +00:00
|
|
|
|
|
|
|
\membersection{wxFontEnumerator::GetEncodings}\label{wxfontenumeratorgetencodings}
|
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
\func{static wxArrayString}{GetEncodings}{\param{const wxString\&}{ facename = ""}}
|
1999-11-06 15:38:23 +00:00
|
|
|
|
|
|
|
Return array of strings containing all encodings found by
|
2006-05-28 13:51:34 +00:00
|
|
|
\helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}.
|
|
|
|
|
1999-11-06 15:38:23 +00:00
|
|
|
|
|
|
|
\membersection{wxFontEnumerator::GetFacenames}\label{wxfontenumeratorgetfacenames}
|
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
\func{static wxArrayString}{GetFacenames}{\param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM}, \param{bool }{fixedWidthOnly = false}}
|
1999-11-06 15:38:23 +00:00
|
|
|
|
|
|
|
Return array of strings containing all facenames found by
|
2006-05-28 13:51:34 +00:00
|
|
|
\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames}.
|
1999-11-06 15:38:23 +00:00
|
|
|
|
|
|
|
|
2006-05-29 00:03:36 +00:00
|
|
|
\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}.
|
|
|
|
|
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
\membersection{wxFontEnumerator::OnFacename}\label{wxfontenumeratoronfacename}
|
1999-11-03 23:51:07 +00:00
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
\func{virtual bool}{OnFacename}{\param{const wxString\& }{font}}
|
1999-11-03 23:51:07 +00:00
|
|
|
|
1999-11-04 20:40:41 +00:00
|
|
|
Called by \helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} for
|
2003-01-18 00:16:34 +00:00
|
|
|
each match. Return true to continue enumeration or false to stop it.
|
1999-11-03 23:51:07 +00:00
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
|
1999-11-03 23:51:07 +00:00
|
|
|
\membersection{wxFontEnumerator::OnFontEncoding}\label{wxfontenumeratoronfontencoding}
|
|
|
|
|
2006-05-28 13:51:34 +00:00
|
|
|
\func{virtual bool}{OnFontEncoding}{\param{const wxString\& }{font}, \param{const wxString\& }{encoding}}
|
1999-11-03 23:51:07 +00:00
|
|
|
|
|
|
|
Called by \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} for
|
2003-01-18 00:16:34 +00:00
|
|
|
each match. Return true to continue enumeration or false to stop it.
|
1999-11-03 23:51:07 +00:00
|
|
|
|