]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/htwinprs.tex
toplevel code transferred to wxTopLevelWindow
[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 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
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{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{wxWindow }{*wnd}}
36
37Constructor. 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
44Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
45
46\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
47
48\func{wxHtmlContainerCell*}{CloseContainer}{\void}
49
50Closes the container, sets actual container to the parent one
51and returns pointer to it (see \helpref{Overview}{cells}).
52
53\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
54
55\func{virtual wxFont*}{CreateCurrentFont}{\void}
56
57Creates 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})
63and returns pointer to it.
64If 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
71Returns actual text colour.
72
73\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
74
75\constfunc{int}{GetAlign}{\void}
76
77Returns default horizontal alignment.
78
79\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
80
81\constfunc{int}{GetCharHeight}{\void}
82
83Returns (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
86know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
87
88\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
89
90\constfunc{int}{GetCharWidth}{\void}
91
92Returns 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
95know the height of the current font, call {\tt GetDC -> GetCharWidth()}
96
97\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
98
99\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
100
101Returns pointer to the currectly opened container (see \helpref{Overview}{cells}).
102Common use:
103
104\begin{verbatim}
105m_WParser -> GetContainer() -> InsertCell(new ...);
106\end{verbatim}
107
108\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
109
110\func{wxDC*}{GetDC}{\void}
111
112Returns pointer to the DC used during parsing.
113
114\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
115
116\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
117
118Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
119to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
120and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
121
122\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
123
124\constfunc{int}{GetFontBold}{\void}
125
126Returns TRUE if actual font is bold, FALSE otherwise.
127
128\membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
129
130\constfunc{wxString}{GetFontFace}{\void}
131
132Returns actual font face name.
133
134\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
135
136\constfunc{int}{GetFontFixed}{\void}
137
138Returns TRUE if actual font is fixed face, FALSE otherwise.
139
140\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
141
142\constfunc{int}{GetFontItalic}{\void}
143
144Returns TRUE if actual font is italic, FALSE otherwise.
145
146\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
147
148\constfunc{int}{GetFontSize}{\void}
149
150Returns actual font size (HTML size varies from -2 to +4)
151
152\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
153
154\constfunc{int}{GetFontUnderlined}{\void}
155
156Returns TRUE if actual font is underlined, FALSE otherwise.
157
158\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
159
160\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
161
162Returns input encoding.
163
164\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
165
166\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
167
168Returns actual hypertext link. (This value has a non-empty
169\helpref{Href}{wxhtmllinkinfogethref} string
170if the parser is between {\tt <A>} and {\tt </A>} tags,
171wxEmptyString otherwise.)
172
173\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
174
175\constfunc{const wxColour\&}{GetLinkColor}{\void}
176
177Returns the colour of hypertext link text.
178
179\membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
180
181\constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
182
183Returns output encoding, i.e. closest match to document's input encoding
184that is supported by operating system.
185
186\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
187
188\func{wxWindow*}{GetWindow}{\void}
189
190Returns associated window (wxHtmlWindow). This may be NULL! (You should always
191test if it is non-NULL. For example {\tt TITLE} handler sets window
192title only if some window is associated, otherwise it does nothing)
193
194\membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
195
196\func{wxHtmlContainerCell*}{OpenContainer}{\void}
197
198Opens 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
204Sets actual text colour. Note: this DOESN'T change the colour!
205You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
206
207\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
208
209\func{void}{SetAlign}{\param{int }{a}}
210
211Sets default horizontal alignment (see
212\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
213Alignment 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
219Allows you to directly set opened container. This is not recommended - you should use OpenContainer
220wherever possible.
221
222\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
223
224\func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
225
226Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
227{\it pixel\_scale} can be used when rendering to high-resolution
228DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
229HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
230inch 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
236Sets 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
242Sets current font face to {\it face}. This affects either fixed size
243font or proportional, depending on context (whether the parser is
244inside {\tt <TT>} tag or not).
245
246\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
247
248\func{void}{SetFontFixed}{\param{int }{x}}
249
250Sets 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
256Sets 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
262Sets 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
268Sets underlined flag of actualfont. {\it x} is either TRUE of FALSE.
269
270\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
271
272\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
273
274Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
275
276\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
277
278\func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
279
280Sets input encoding. The parser uses this information to build conversion
281tables from document's encoding to some encoding supported by operating
282system.
283
284\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
285
286\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
287
288Sets actual hypertext link. Empty link is represented
289by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
290to wxEmptyString.
291
292\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
293
294\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
295
296Sets colour of hypertext link.
297