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