]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/htwinprs.tex
interface headers reviewed
[wxWidgets.git] / docs / latex / wx / htwinprs.tex
1 %
2 % automatically generated by HelpGen from
3 % htmlwinparser.tex at 14/Mar/99 20:13:37
4 %
5
6 \section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
7
8 This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
9 its main goal is to parse HTML input so that it can be displayed in
10 \helpref{wxHtmlWindow}{wxhtmlwindow}. It uses a special
11 \helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}.
12
13 \wxheading{Notes}
14
15 The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
16
17 \wxheading{Derived from}
18
19 \helpref{wxHtmlParser}{wxhtmlparser}
20
21 \wxheading{Include files}
22
23 <wx/html/winpars.h>
24
25 \wxheading{Library}
26
27 \helpref{wxHtml}{librarieslist}
28
29 \wxheading{See Also}
30
31 \helpref{Handlers overview}{handlers}
32
33 \latexignore{\rtfignore{\wxheading{Members}}}
34
35 \membersection{wxHtmlWinParser::wxHtmlWinParser}\label{wxhtmlwinparserwxhtmlwinparser}
36
37 \func{}{wxHtmlWinParser}{\void}
38
39 \func{}{wxHtmlWinParser}{\param{wxHtmlWindowInterface }{*wndIface}}
40
41 Constructor. Don't use the default one, use constructor with
42 {\it wndIface} parameter ({\it wndIface} is a pointer to interface object for
43 the associated \helpref{wxHtmlWindow}{wxhtmlwindow} or other HTML rendering
44 window such as \helpref{wxHtmlListBox}{wxhtmllistbox}).
45
46 \membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
47
48 \func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
49
50 Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
51
52 \membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
53
54 \func{wxHtmlContainerCell*}{CloseContainer}{\void}
55
56 Closes the container, sets actual container to the parent one
57 and returns pointer to it (see \helpref{Overview}{cells}).
58
59 \membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
60
61 \func{virtual wxFont*}{CreateCurrentFont}{\void}
62
63 Creates font based on current setting (see
64 \helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
65 \helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
66 \helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
67 \helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
68 \helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
69 and returns pointer to it.
70 If the font was already created only a pointer is returned.
71
72
73 \membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
74
75 \constfunc{const wxColour\&}{GetActualColor}{\void}
76
77 Returns actual text colour.
78
79 \membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
80
81 \constfunc{int}{GetAlign}{\void}
82
83 Returns default horizontal alignment.
84
85 \membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
86
87 \constfunc{int}{GetCharHeight}{\void}
88
89 Returns (average) char height in standard font. It is used as DC-independent metrics.
90
91 {\bf Note:} This function doesn't return the {\it actual} height. If you want to
92 know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
93
94 \membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
95
96 \constfunc{int}{GetCharWidth}{\void}
97
98 Returns average char width in standard font. It is used as DC-independent metrics.
99
100 {\bf Note:} This function doesn't return the {\it actual} width. If you want to
101 know the height of the current font, call {\tt GetDC -> GetCharWidth()}
102
103 \membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
104
105 \constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
106
107 Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
108 Common use:
109
110 \begin{verbatim}
111 m_WParser -> GetContainer() -> InsertCell(new ...);
112 \end{verbatim}
113
114 \membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
115
116 \func{wxDC*}{GetDC}{\void}
117
118 Returns pointer to the DC used during parsing.
119
120 \membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
121
122 \constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
123
124 Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
125 to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
126 and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
127
128 \membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
129
130 \constfunc{int}{GetFontBold}{\void}
131
132 Returns true if actual font is bold, false otherwise.
133
134 \membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
135
136 \constfunc{wxString}{GetFontFace}{\void}
137
138 Returns actual font face name.
139
140 \membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
141
142 \constfunc{int}{GetFontFixed}{\void}
143
144 Returns true if actual font is fixed face, false otherwise.
145
146 \membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
147
148 \constfunc{int}{GetFontItalic}{\void}
149
150 Returns true if actual font is italic, false otherwise.
151
152 \membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
153
154 \constfunc{int}{GetFontSize}{\void}
155
156 Returns actual font size (HTML size varies from -2 to +4)
157
158 \membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
159
160 \constfunc{int}{GetFontUnderlined}{\void}
161
162 Returns true if actual font is underlined, false otherwise.
163
164 \membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
165
166 \constfunc{wxFontEncoding}{GetInputEncoding}{\void}
167
168 Returns input encoding.
169
170 \membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
171
172 \constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
173
174 Returns actual hypertext link. (This value has a non-empty
175 \helpref{Href}{wxhtmllinkinfogethref} string
176 if the parser is between {\tt <A>} and {\tt </A>} tags,
177 wxEmptyString otherwise.)
178
179 \membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
180
181 \constfunc{const wxColour\&}{GetLinkColor}{\void}
182
183 Returns the colour of hypertext link text.
184
185 \membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
186
187 \constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
188
189 Returns output encoding, i.e. closest match to document's input encoding
190 that is supported by operating system.
191
192 \membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
193
194 \func{wxHtmlWindow*}{GetWindow}{\void}
195
196 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
197 test if it is non-NULL. For example {\tt TITLE} handler sets window
198 title only if some window is associated, otherwise it does nothing)
199
200 \membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
201
202 \func{wxHtmlContainerCell*}{OpenContainer}{\void}
203
204 Opens new container and returns pointer to it (see \helpref{Overview}{cells}).
205
206 \membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
207
208 \func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
209
210 Sets actual text colour. Note: this DOESN'T change the colour!
211 You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
212
213 \membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
214
215 \func{void}{SetAlign}{\param{int }{a}}
216
217 Sets default horizontal alignment (see
218 \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
219 Alignment of newly opened container is set to this value.
220
221 \membersection{wxHtmlWinParser::SetContainer}\label{wxhtmlwinparsersetcontainer}
222
223 \func{wxHtmlContainerCell*}{SetContainer}{\param{wxHtmlContainerCell *}{c}}
224
225 Allows you to directly set opened container. This is not recommended - you should use OpenContainer
226 wherever possible.
227
228 \membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
229
230 \func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
231
232 Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
233 {\it pixel\_scale} can be used when rendering to high-resolution
234 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
235 HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
236 inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
237
238 \membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
239
240 \func{void}{SetFontBold}{\param{int }{x}}
241
242 Sets bold flag of actualfont. {\it x} is either true of false.
243
244 \membersection{wxHtmlWinParser::SetFontFace}\label{wxhtmlwinparsersetfontface}
245
246 \func{void}{SetFontFace}{\param{const wxString\& }{face}}
247
248 Sets current font face to {\it face}. This affects either fixed size
249 font or proportional, depending on context (whether the parser is
250 inside {\tt <TT>} tag or not).
251
252 \membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
253
254 \func{void}{SetFontFixed}{\param{int }{x}}
255
256 Sets fixed face flag of actualfont. {\it x} is either true of false.
257
258 \membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
259
260 \func{void}{SetFontItalic}{\param{int }{x}}
261
262 Sets italic flag of actualfont. {\it x} is either true of false.
263
264 \membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
265
266 \func{void}{SetFontSize}{\param{int }{s}}
267
268 Sets actual font size (HTML size varies from 1 to 7)
269
270 \membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
271
272 \func{void}{SetFontUnderlined}{\param{int }{x}}
273
274 Sets underlined flag of actualfont. {\it x} is either true of false.
275
276 \membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
277
278 \func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
279
280 Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
281 detailed description.
282
283 \membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
284
285 \func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
286
287 Sets input encoding. The parser uses this information to build conversion
288 tables from document's encoding to some encoding supported by operating
289 system.
290
291 \membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
292
293 \func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
294
295 Sets actual hypertext link. Empty link is represented
296 by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
297 to wxEmptyString.
298
299 \membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
300
301 \func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
302
303 Sets colour of hypertext link.
304