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