]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/htwinprs.tex
typo
[wxWidgets.git] / docs / latex / wx / htwinprs.tex
... / ...
CommitLineData
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
8This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
9its 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
15The 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
41Constructor. Don't use the default one, use constructor with
42{\it wndIface} parameter ({\it wndIface} is a pointer to interface object for
43the associated \helpref{wxHtmlWindow}{wxhtmlwindow} or other HTML rendering
44window such as \helpref{wxHtmlListBox}{wxhtmllistbox}).
45
46\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
47
48\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
49
50Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
51
52\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
53
54\func{wxHtmlContainerCell*}{CloseContainer}{\void}
55
56Closes the container, sets actual container to the parent one
57and returns pointer to it (see \helpref{Overview}{cells}).
58
59\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
60
61\func{virtual wxFont*}{CreateCurrentFont}{\void}
62
63Creates 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})
69and returns pointer to it.
70If 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
77Returns actual text colour.
78
79\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
80
81\constfunc{int}{GetAlign}{\void}
82
83Returns default horizontal alignment.
84
85\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
86
87\constfunc{int}{GetCharHeight}{\void}
88
89Returns (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
92know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
93
94\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
95
96\constfunc{int}{GetCharWidth}{\void}
97
98Returns 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
101know the height of the current font, call {\tt GetDC -> GetCharWidth()}
102
103\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
104
105\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
106
107Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
108Common use:
109
110\begin{verbatim}
111m_WParser -> GetContainer() -> InsertCell(new ...);
112\end{verbatim}
113
114\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
115
116\func{wxDC*}{GetDC}{\void}
117
118Returns pointer to the DC used during parsing.
119
120\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
121
122\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
123
124Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
125to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
126and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
127
128\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
129
130\constfunc{int}{GetFontBold}{\void}
131
132Returns true if actual font is bold, false otherwise.
133
134\membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
135
136\constfunc{wxString}{GetFontFace}{\void}
137
138Returns actual font face name.
139
140\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
141
142\constfunc{int}{GetFontFixed}{\void}
143
144Returns true if actual font is fixed face, false otherwise.
145
146\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
147
148\constfunc{int}{GetFontItalic}{\void}
149
150Returns true if actual font is italic, false otherwise.
151
152\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
153
154\constfunc{int}{GetFontSize}{\void}
155
156Returns actual font size (HTML size varies from -2 to +4)
157
158\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
159
160\constfunc{int}{GetFontUnderlined}{\void}
161
162Returns true if actual font is underlined, false otherwise.
163
164\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
165
166\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
167
168Returns input encoding.
169
170\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
171
172\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
173
174Returns actual hypertext link. (This value has a non-empty
175\helpref{Href}{wxhtmllinkinfogethref} string
176if the parser is between {\tt <A>} and {\tt </A>} tags,
177wxEmptyString otherwise.)
178
179\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
180
181\constfunc{const wxColour\&}{GetLinkColor}{\void}
182
183Returns the colour of hypertext link text.
184
185\membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
186
187\constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
188
189Returns output encoding, i.e. closest match to document's input encoding
190that is supported by operating system.
191
192\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
193
194\func{wxHtmlWindow*}{GetWindow}{\void}
195
196Returns associated window (wxHtmlWindow). This may be NULL! (You should always
197test if it is non-NULL. For example {\tt TITLE} handler sets window
198title only if some window is associated, otherwise it does nothing)
199
200\membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
201
202\func{wxHtmlContainerCell*}{OpenContainer}{\void}
203
204Opens 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
210Sets actual text colour. Note: this DOESN'T change the colour!
211You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
212
213\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
214
215\func{void}{SetAlign}{\param{int }{a}}
216
217Sets default horizontal alignment (see
218\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
219Alignment 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
225Allows you to directly set opened container. This is not recommended - you should use OpenContainer
226wherever possible.
227
228\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
229
230\func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
231
232Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
233{\it pixel\_scale} can be used when rendering to high-resolution
234DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
235HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
236inch 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
242Sets 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
248Sets current font face to {\it face}. This affects either fixed size
249font or proportional, depending on context (whether the parser is
250inside {\tt <TT>} tag or not).
251
252\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
253
254\func{void}{SetFontFixed}{\param{int }{x}}
255
256Sets 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
262Sets 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
268Sets 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
274Sets 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
280Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
281detailed description.
282
283\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
284
285\func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
286
287Sets input encoding. The parser uses this information to build conversion
288tables from document's encoding to some encoding supported by operating
289system.
290
291\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
292
293\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
294
295Sets actual hypertext link. Empty link is represented
296by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
297to wxEmptyString.
298
299\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
300
301\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
302
303Sets colour of hypertext link.
304