1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
   3 %% Purpose:     wxFontEnumerator documentation 
   4 %% Author:      Vadim Zeitlin 
   8 %% Copyright:   (c) Vadim Zeitlin 
   9 %% Licence:     wxWindows licence 
  10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
  12 \section{\class{wxFontEnumerator
}}\label{wxfontenumerator
} 
  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
}.
 
  19 To do this, you just have to call one of EnumerateXXX() functions - either 
 
  20 \helpref{EnumerateFacenames
}{wxfontenumeratorenumeratefacenames
} or 
 
  21 \helpref{EnumerateEncodings
}{wxfontenumeratorenumerateencodings
} and the
 
  22 corresponding callback ( 
 
  23 \helpref{OnFacename
}{wxFontEnumeratoronfacename
} or
 
  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.
 
  28 \wxheading{Virtual functions to override
} 
  30 Either 
\helpref{OnFacename
}{wxfontenumeratoronfacename
} or 
 
  31 \helpref{OnFontEncoding
}{wxfontenumeratoronfontencoding
} should be overridden
 
  32 depending on whether you plan to call 
 
  33 \helpref{EnumerateFacenames
}{wxfontenumeratorenumeratefacenames
} or 
 
  34 \helpref{EnumerateEncodings
}{wxfontenumeratorenumerateencodings
}. Of course,
 
  35 if you call both of them, you should override both functions.
 
  37 \wxheading{Derived from
} 
  41 \wxheading{Include files
} 
  47 \helpref{Font encoding overview
}{wxfontencodingoverview
}, 
 
  48 \helpref{Font sample
}{samplefont
}, 
 
  49 \helpref{wxFont
}{wxfont
}, 
 
  50 \helpref{wxFontMapper
}{wxfontmapper
} 
  52 \latexignore{\rtfignore{\wxheading{Members
}}} 
  54 \membersection{wxFontEnumerator::EnumerateFacenames
}\label{wxfontenumeratorenumeratefacenames
} 
  56 \func{virtual bool
}{EnumerateFacenames
}{ 
  57     \param{wxFontEncoding 
}{encoding = wxFONTENCODING
\_SYSTEM},
 
  58     \param{bool 
}{fixedWidthOnly = FALSE
}} 
  60 Call 
\helpref{OnFacename
}{wxfontenumeratoronfacename
} for each font which
 
  61 supports given encoding (only if it is not wxFONTENCODING
\_SYSTEM) and is of
 
  62 fixed width (if 
{\it fixedWidthOnly
} is TRUE).
 
  64 Calling this function with default arguments will result in enumerating all
 
  65 fonts available on the system.
 
  67 \membersection{wxFontEnumerator::EnumerateEncodings
}\label{wxfontenumeratorenumerateencodings
} 
  69 \func{virtual bool
}{EnumerateEncodings
}{\param{const wxString\& 
}{font = ""
}} 
  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.
 
  76 \membersection{wxFontEnumerator::GetEncodings
}\label{wxfontenumeratorgetencodings
} 
  78 \func{wxArrayString*
}{GetEncodings
}{\void} 
  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.
 
  85 \membersection{wxFontEnumerator::GetFacenames
}\label{wxfontenumeratorgetfacenames
} 
  87 \func{wxArrayString*
}{GetFacenames
}{\void} 
  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.
 
  95 \membersection{wxFontEnumerator::OnFacename
}\label{wxfontenumeratoronfacename
} 
  97 \func{virtual bool
}{OnFacename
}{\param{const wxString\& 
}{font
}} 
  99 Called by 
\helpref{EnumerateFacenames
}{wxfontenumeratorenumeratefacenames
} for
 
 100 each match. Return TRUE to continue enumeration or FALSE to stop it.
 
 102 \membersection{wxFontEnumerator::OnFontEncoding
}\label{wxfontenumeratoronfontencoding
} 
 104 \func{virtual bool
}{OnFontEncoding
}{ 
 105  \param{const wxString\& 
}{font
},
 
 106  \param{const wxString\& 
}{encoding
} 
 109 Called by 
\helpref{EnumerateEncodings
}{wxfontenumeratorenumerateencodings
} for
 
 110 each match. Return TRUE to continue enumeration or FALSE to stop it.