]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwinprs.tex
added wxWindow::AlwaysShowScrollbars() and its wxMac implementation
[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
704a4b75
VS
6\section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
7
f533a674 8This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
4a7ec775 9its main goal is to parse HTML input so that it can be displayed in
fa482912 10\helpref{wxHtmlWindow}{wxhtmlwindow}. It uses a special
704a4b75
VS
11\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}.
12
13\wxheading{Notes}
14
fa482912 15The product of parsing is a wxHtmlCell (resp. wxHtmlContainer) object.
704a4b75 16
704a4b75
VS
17\wxheading{Derived from}
18
19\helpref{wxHtmlParser}{wxhtmlparser}
20
9704b250
VS
21\wxheading{Include files}
22
23<wx/html/winpars.h>
24
a7af285d
VZ
25\wxheading{Library}
26
27\helpref{wxHtml}{librarieslist}
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
bc55e31b 39\func{}{wxHtmlWinParser}{\param{wxHtmlWindowInterface }{*wndIface}}
704a4b75
VS
40
41Constructor. Don't use the default one, use constructor with
bc55e31b
VS
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}).
704a4b75 45
559fe022 46\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
704a4b75 47
559fe022 48\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
704a4b75 49
559fe022 50Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
704a4b75 51
559fe022 52\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
704a4b75 53
559fe022 54\func{wxHtmlContainerCell*}{CloseContainer}{\void}
704a4b75 55
559fe022
VS
56Closes the container, sets actual container to the parent one
57and returns pointer to it (see \helpref{Overview}{cells}).
704a4b75 58
559fe022 59\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
704a4b75 60
559fe022 61\func{virtual wxFont*}{CreateCurrentFont}{\void}
704a4b75 62
fa482912
JS
63Creates font based on current setting (see
64\helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
65\helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
66\helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
67\helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
559fe022
VS
68\helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
69and returns pointer to it.
fa482912 70If the font was already created only a pointer is returned.
704a4b75 71
704a4b75 72
559fe022 73\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
704a4b75 74
559fe022 75\constfunc{const wxColour\&}{GetActualColor}{\void}
704a4b75 76
fa482912 77Returns actual text colour.
704a4b75 78
559fe022 79\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
704a4b75 80
559fe022 81\constfunc{int}{GetAlign}{\void}
704a4b75 82
559fe022 83Returns default horizontal alignment.
704a4b75 84
559fe022 85\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
704a4b75 86
559fe022 87\constfunc{int}{GetCharHeight}{\void}
704a4b75 88
f6bcfd97 89Returns (average) char height in standard font. It is used as DC-independent metrics.
704a4b75 90
fa482912 91{\bf Note:} This function doesn't return the {\it actual} height. If you want to
448af9a4 92know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
704a4b75 93
559fe022 94\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
704a4b75 95
559fe022 96\constfunc{int}{GetCharWidth}{\void}
704a4b75 97
f6bcfd97 98Returns average char width in standard font. It is used as DC-independent metrics.
704a4b75 99
fa482912 100{\bf Note:} This function doesn't return the {\it actual} width. If you want to
448af9a4 101know the height of the current font, call {\tt GetDC -> GetCharWidth()}
704a4b75 102
704a4b75
VS
103\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
104
105\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
106
2edb0bde 107Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
704a4b75
VS
108Common use:
109
110\begin{verbatim}
111m_WParser -> GetContainer() -> InsertCell(new ...);
112\end{verbatim}
113
559fe022 114\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
704a4b75 115
559fe022 116\func{wxDC*}{GetDC}{\void}
704a4b75 117
559fe022 118Returns pointer to the DC used during parsing.
704a4b75 119
b250d384
VS
120\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
121
122\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
123
124Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
fa482912 125to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
b250d384
VS
126and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
127
704a4b75
VS
128\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
129
130\constfunc{int}{GetFontBold}{\void}
131
cc81d32f 132Returns true if actual font is bold, false otherwise.
704a4b75 133
605d715d
VS
134\membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
135
136\constfunc{wxString}{GetFontFace}{\void}
137
138Returns actual font face name.
139
559fe022 140\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
704a4b75 141
559fe022 142\constfunc{int}{GetFontFixed}{\void}
704a4b75 143
cc81d32f 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
cc81d32f 150Returns true if actual font is italic, false otherwise.
704a4b75 151
559fe022 152\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
704a4b75 153
559fe022 154\constfunc{int}{GetFontSize}{\void}
704a4b75 155
559fe022 156Returns actual font size (HTML size varies from -2 to +4)
704a4b75
VS
157
158\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
159
160\constfunc{int}{GetFontUnderlined}{\void}
161
cc81d32f 162Returns true if actual font is underlined, false otherwise.
704a4b75 163
b250d384
VS
164\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
165
166\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
167
168Returns input encoding.
169
559fe022 170\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
704a4b75 171
846914d1 172\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
704a4b75 173
fa482912 174Returns actual hypertext link. (This value has a non-empty
f533a674 175\helpref{Href}{wxhtmllinkinfogethref} string
559fe022 176if the parser is between {\tt <A>} and {\tt </A>} tags,
f533a674 177wxEmptyString otherwise.)
704a4b75 178
559fe022 179\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
704a4b75 180
559fe022 181\constfunc{const wxColour\&}{GetLinkColor}{\void}
704a4b75 182
fa482912 183Returns the colour of hypertext link text.
b250d384
VS
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
559fe022 192\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
704a4b75 193
e03ca426 194\func{wxHtmlWindow*}{GetWindow}{\void}
704a4b75 195
559fe022
VS
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)
704a4b75 199
559fe022
VS
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
559fe022
VS
206\membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
207
208\func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
209
fa482912 210Sets actual text colour. Note: this DOESN'T change the colour!
559fe022 211You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
704a4b75
VS
212
213\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
214
215\func{void}{SetAlign}{\param{int }{a}}
216
fa482912 217Sets default horizontal alignment (see
f533a674 218\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
704a4b75
VS
219Alignment of newly opened container is set to this value.
220
605d715d
VS
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
fa482912 226wherever possible.
704a4b75 227
559fe022 228\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
704a4b75 229
605d715d
VS
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.)
704a4b75 237
559fe022 238\membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
704a4b75 239
559fe022 240\func{void}{SetFontBold}{\param{int }{x}}
704a4b75 241
cc81d32f 242Sets bold flag of actualfont. {\it x} is either true of false.
704a4b75 243
605d715d
VS
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
559fe022 252\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
704a4b75 253
559fe022 254\func{void}{SetFontFixed}{\param{int }{x}}
704a4b75 255
cc81d32f 256Sets fixed face flag of actualfont. {\it x} is either true of false.
704a4b75 257
559fe022 258\membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
704a4b75 259
559fe022 260\func{void}{SetFontItalic}{\param{int }{x}}
704a4b75 261
cc81d32f 262Sets italic flag of actualfont. {\it x} is either true of false.
704a4b75 263
559fe022 264\membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
704a4b75 265
559fe022
VS
266\func{void}{SetFontSize}{\param{int }{s}}
267
846914d1 268Sets actual font size (HTML size varies from 1 to 7)
559fe022
VS
269
270\membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
271
272\func{void}{SetFontUnderlined}{\param{int }{x}}
273
cc81d32f 274Sets underlined flag of actualfont. {\it x} is either true of false.
559fe022
VS
275
276\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
704a4b75 277
fbfb8bcc 278\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
559fe022 279
4eecf115
VS
280Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
281detailed description.
704a4b75 282
b250d384
VS
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
704a4b75
VS
291\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
292
846914d1 293\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
704a4b75 294
846914d1 295Sets actual hypertext link. Empty link is represented
f533a674 296by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
846914d1 297to wxEmptyString.
704a4b75 298
559fe022 299\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
704a4b75 300
559fe022 301\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
704a4b75 302
fa482912 303Sets colour of hypertext link.
f533a674 304