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