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