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