]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/htwinprs.tex
plot 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
7 \section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
8
9 This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
10 its mail goal is to parse HTML input so that it can be displayed in
11 \helpref{wxHtmlWindow}{wxhtmlwindow}. It uses special
12 \helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}.
13
14 \wxheading{Notes}
15
16 \begin{enumerate}
17 \item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
18 \end{enumerate}
19
20 \wxheading{Derived from}
21
22 \helpref{wxHtmlParser}{wxhtmlparser}
23
24 \wxheading{See Also}
25
26 \helpref{Handlers overview}{handlers}
27
28 \latexignore{\rtfignore{\wxheading{Members}}}
29
30 \membersection{wxHtmlWinParser::wxHtmlWinParser}\label{wxhtmlwinparserwxhtmlwinparser}
31
32 \func{}{wxHtmlWinParser}{\void}
33
34 \func{}{wxHtmlWinParser}{\param{wxWindow }{*wnd}}
35
36 Constructor. Don't use the default one, use constructor with
37 {\it wnd} paremeter ({\it wnd} is pointer to associated \helpref{wxHtmlWindow}{wxhtmlwindow})
38
39 \membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
40
41 \func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
42
43 Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
44
45 \membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
46
47 \func{wxHtmlContainerCell*}{CloseContainer}{\void}
48
49 Closes the container, sets actual container to the parent one
50 and returns pointer to it (see \helpref{Overview}{cells}).
51
52 \membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
53
54 \func{virtual wxFont*}{CreateCurrentFont}{\void}
55
56 Creates font based on current setting (see
57 \helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
58 \helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
59 \helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
60 \helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
61 \helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
62 and returns pointer to it.
63 (If the font was already created only a pointer is returned.)
64
65
66 \membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
67
68 \constfunc{const wxColour\&}{GetActualColor}{\void}
69
70 Returns actual text color.
71
72 \membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
73
74 \constfunc{int}{GetAlign}{\void}
75
76 Returns default horizontal alignment.
77
78 \membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
79
80 \constfunc{int}{GetCharHeight}{\void}
81
82 Returns (average) char height in standard font. It's used as DC-independent metrics.
83
84 {\bf Note:} This function doesn't return {\it actual} height. If you want to
85 know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
86
87 \membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
88
89 \constfunc{int}{GetCharWidth}{\void}
90
91 Returns average char width in standard font. It's used as DC-independent metrics.
92
93 {\bf Note:} This function doesn't return {\it actual} width. If you want to
94 know the height of the current font, call {\tt GetDC -> GetCharWidth()}
95
96 \membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
97
98 \constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
99
100 Returns pointer to the currectly opened container (see \helpref{Overview}{cells}).
101 Common use:
102
103 \begin{verbatim}
104 m_WParser -> GetContainer() -> InsertCell(new ...);
105 \end{verbatim}
106
107 \membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
108
109 \func{wxDC*}{GetDC}{\void}
110
111 Returns pointer to the DC used during parsing.
112
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
135 \membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
136
137 \constfunc{int}{GetFontFixed}{\void}
138
139 Returns TRUE if actual font is fixed face, FALSE otherwise.
140
141 \membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
142
143 \constfunc{int}{GetFontItalic}{\void}
144
145 Returns TRUE if actual font is italic, FALSE otherwise.
146
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
167 \membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
168
169 \constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
170
171 Returns actual hypertext link. (This value has non-empty
172 \helpref{Href}{wxhtmllinkinfogethref} string
173 if the parser is between {\tt <A>} and {\tt </A>} tags,
174 wxEmptyString otherwise.)
175
176
177 \membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
178
179 \constfunc{const wxColour\&}{GetLinkColor}{\void}
180
181 Returns color of hypertext link text.
182
183
184 \membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
185
186 \constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
187
188 Returns output encoding, i.e. closest match to document's input encoding
189 that is supported by operating system.
190
191 \membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
192
193 \func{wxWindow*}{GetWindow}{\void}
194
195 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
196 test if it is non-NULL. For example {\tt TITLE} handler sets window
197 title only if some window is associated, otherwise it does nothing)
198
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
207 \membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
208
209 \func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
210
211 Sets actual text color. Note: this DOESN'T change the color!
212 You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
213
214 \membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
215
216 \func{void}{SetAlign}{\param{int }{a}}
217
218 Sets default horizontal alignment (see
219 \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
220 Alignment of newly opened container is set to this value.
221
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 whereever possible.
229
230
231 \membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
232
233 \func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
234
235 Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
236 {\it pixel\_scale} can be used when rendering to high-resolution
237 DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
238 HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
239 inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
240
241
242 \membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
243
244 \func{void}{SetFontBold}{\param{int }{x}}
245
246 Sets bold flag of actualfont. {\it x} is either TRUE of FALSE.
247
248 \membersection{wxHtmlWinParser::SetFontFace}\label{wxhtmlwinparsersetfontface}
249
250 \func{void}{SetFontFace}{\param{const wxString\& }{face}}
251
252 Sets current font face to {\it face}. This affects either fixed size
253 font or proportional, depending on context (whether the parser is
254 inside {\tt <TT>} tag or not).
255
256 \membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
257
258 \func{void}{SetFontFixed}{\param{int }{x}}
259
260 Sets fixed face flag of actualfont. {\it x} is either TRUE of FALSE.
261
262 \membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
263
264 \func{void}{SetFontItalic}{\param{int }{x}}
265
266 Sets italic flag of actualfont. {\it x} is either TRUE of FALSE.
267
268
269 \membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
270
271 \func{void}{SetFontSize}{\param{int }{s}}
272
273 Sets actual font size (HTML size varies from 1 to 7)
274
275 \membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
276
277 \func{void}{SetFontUnderlined}{\param{int }{x}}
278
279 Sets underlined flag of actualfont. {\it x} is either TRUE of FALSE.
280
281 \membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
282
283 \func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
284
285 Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
286
287
288 \membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
289
290 \func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
291
292 Sets input encoding. The parser uses this information to build conversion
293 tables from document's encoding to some encoding supported by operating
294 system.
295
296
297 \membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
298
299 \func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
300
301 Sets actual hypertext link. Empty link is represented
302 by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
303 to wxEmptyString.
304
305 \membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
306
307 \func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
308
309 Sets color of hypertext link.
310
311