X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/775a998ed0b5332053b4e3ac850a00dd9727e670..3cc305b2b4a0674c56c84d7088cfd70676b850f0:/docs/latex/wx/fontenum.tex diff --git a/docs/latex/wx/fontenum.tex b/docs/latex/wx/fontenum.tex index 396ff626c2..3605bf7e7c 100644 --- a/docs/latex/wx/fontenum.tex +++ b/docs/latex/wx/fontenum.tex @@ -6,7 +6,7 @@ %% Created: 03.11.99 %% RCS-ID: $Id$ %% Copyright: (c) Vadim Zeitlin -%% Licence: wxWindows licence +%% License: wxWindows license %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{\class{wxFontEnumerator}}\label{wxfontenumerator} @@ -17,20 +17,19 @@ 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{EnumerateFamilies}{wxfontenumeratorenumeratefamilies} or +\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings} and the -corresponding callback ( -\helpref{OnFontFamily}{wxFontEnumeratoronfontfamily} or +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. +repeatedly until either all fonts satisfying the specified criteria are +exhausted or the callback returns false. \wxheading{Virtual functions to override} -Either \helpref{OnFontFamily}{wxfontenumeratoronfontfamily} or +Either \helpref{OnFacename}{wxfontenumeratoronfacename} or \helpref{OnFontEncoding}{wxfontenumeratoronfontencoding} should be overridden depending on whether you plan to call -\helpref{EnumerateFamilies}{wxfontenumeratorenumeratefamilies} or +\helpref{EnumerateFacenames}{wxfontenumeratorenumeratefacenames} or \helpref{EnumerateEncodings}{wxfontenumeratorenumerateencodings}. Of course, if you call both of them, you should override both functions. @@ -42,6 +41,10 @@ None +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{See also} \helpref{Font encoding overview}{wxfontencodingoverview}, @@ -49,21 +52,24 @@ None \helpref{wxFont}{wxfont}, \helpref{wxFontMapper}{wxfontmapper} + + \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxFontEnumerator::EnumerateFamilies}\label{wxfontenumeratorenumeratefamilies} +\membersection{wxFontEnumerator::EnumerateFacenames}\label{wxfontenumeratorenumeratefacenames} -\func{virtual bool}{EnumerateFamilies}{ +\func{virtual bool}{EnumerateFacenames}{ \param{wxFontEncoding }{encoding = wxFONTENCODING\_SYSTEM}, - \param{bool }{fixedWidthOnly = FALSE}} + \param{bool }{fixedWidthOnly = false}} -Call \helpref{OnFontFamily}{wxfontenumeratoronfontfamily} for each font which +Call \helpref{OnFacename}{wxfontenumeratoronfacename} for each font which supports given encoding (only if it is not wxFONTENCODING\_SYSTEM) and is of -fixed width (if {\it fixedWidthOnly} is TRUE). +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 = ""}} @@ -72,21 +78,43 @@ 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::OnFontFamily}\label{wxfontenumeratoronfontfamily} -\func{virtual bool}{OnFontFamily}{\param{const wxString\& }{font}} +\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. -Called by \helpref{EnumerateFamilies}{wxfontenumeratorenumeratefamilies} 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} -} +\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. - +each match. Return true to continue enumeration or false to stop it.