]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwinprs.tex
[ 1564113 ] wxComboCtrl and wxODComboBox documentation update
[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
704a4b75
VS
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
bc55e31b 35\func{}{wxHtmlWinParser}{\param{wxHtmlWindowInterface }{*wndIface}}
704a4b75
VS
36
37Constructor. Don't use the default one, use constructor with
bc55e31b
VS
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}).
704a4b75 41
559fe022 42\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
704a4b75 43
559fe022 44\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
704a4b75 45
559fe022 46Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
704a4b75 47
559fe022 48\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
704a4b75 49
559fe022 50\func{wxHtmlContainerCell*}{CloseContainer}{\void}
704a4b75 51
559fe022
VS
52Closes the container, sets actual container to the parent one
53and returns pointer to it (see \helpref{Overview}{cells}).
704a4b75 54
559fe022 55\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
704a4b75 56
559fe022 57\func{virtual wxFont*}{CreateCurrentFont}{\void}
704a4b75 58
fa482912
JS
59Creates font based on current setting (see
60\helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
61\helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
62\helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
63\helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
559fe022
VS
64\helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
65and returns pointer to it.
fa482912 66If the font was already created only a pointer is returned.
704a4b75 67
704a4b75 68
559fe022 69\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
704a4b75 70
559fe022 71\constfunc{const wxColour\&}{GetActualColor}{\void}
704a4b75 72
fa482912 73Returns actual text colour.
704a4b75 74
559fe022 75\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
704a4b75 76
559fe022 77\constfunc{int}{GetAlign}{\void}
704a4b75 78
559fe022 79Returns default horizontal alignment.
704a4b75 80
559fe022 81\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
704a4b75 82
559fe022 83\constfunc{int}{GetCharHeight}{\void}
704a4b75 84
f6bcfd97 85Returns (average) char height in standard font. It is used as DC-independent metrics.
704a4b75 86
fa482912 87{\bf Note:} This function doesn't return the {\it actual} height. If you want to
448af9a4 88know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
704a4b75 89
559fe022 90\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
704a4b75 91
559fe022 92\constfunc{int}{GetCharWidth}{\void}
704a4b75 93
f6bcfd97 94Returns average char width in standard font. It is used as DC-independent metrics.
704a4b75 95
fa482912 96{\bf Note:} This function doesn't return the {\it actual} width. If you want to
448af9a4 97know the height of the current font, call {\tt GetDC -> GetCharWidth()}
704a4b75 98
704a4b75
VS
99\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
100
101\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
102
2edb0bde 103Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
704a4b75
VS
104Common use:
105
106\begin{verbatim}
107m_WParser -> GetContainer() -> InsertCell(new ...);
108\end{verbatim}
109
559fe022 110\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
704a4b75 111
559fe022 112\func{wxDC*}{GetDC}{\void}
704a4b75 113
559fe022 114Returns pointer to the DC used during parsing.
704a4b75 115
b250d384
VS
116\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
117
118\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
119
120Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
fa482912 121to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
b250d384
VS
122and \helpref{output encoding}{wxhtmlwinparsergetoutputencoding}.
123
704a4b75
VS
124\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
125
126\constfunc{int}{GetFontBold}{\void}
127
cc81d32f 128Returns true if actual font is bold, false otherwise.
704a4b75 129
605d715d
VS
130\membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface}
131
132\constfunc{wxString}{GetFontFace}{\void}
133
134Returns actual font face name.
135
559fe022 136\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
704a4b75 137
559fe022 138\constfunc{int}{GetFontFixed}{\void}
704a4b75 139
cc81d32f 140Returns true if actual font is fixed face, false otherwise.
704a4b75
VS
141
142\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
143
144\constfunc{int}{GetFontItalic}{\void}
145
cc81d32f 146Returns true if actual font is italic, false otherwise.
704a4b75 147
559fe022 148\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
704a4b75 149
559fe022 150\constfunc{int}{GetFontSize}{\void}
704a4b75 151
559fe022 152Returns actual font size (HTML size varies from -2 to +4)
704a4b75
VS
153
154\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
155
156\constfunc{int}{GetFontUnderlined}{\void}
157
cc81d32f 158Returns true if actual font is underlined, false otherwise.
704a4b75 159
b250d384
VS
160\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
161
162\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
163
164Returns input encoding.
165
559fe022 166\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
704a4b75 167
846914d1 168\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
704a4b75 169
fa482912 170Returns actual hypertext link. (This value has a non-empty
f533a674 171\helpref{Href}{wxhtmllinkinfogethref} string
559fe022 172if the parser is between {\tt <A>} and {\tt </A>} tags,
f533a674 173wxEmptyString otherwise.)
704a4b75 174
559fe022 175\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
704a4b75 176
559fe022 177\constfunc{const wxColour\&}{GetLinkColor}{\void}
704a4b75 178
fa482912 179Returns the colour of hypertext link text.
b250d384
VS
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
559fe022 188\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
704a4b75 189
e03ca426 190\func{wxHtmlWindow*}{GetWindow}{\void}
704a4b75 191
559fe022
VS
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)
704a4b75 195
559fe022
VS
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
559fe022
VS
202\membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
203
204\func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
205
fa482912 206Sets actual text colour. Note: this DOESN'T change the colour!
559fe022 207You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
704a4b75
VS
208
209\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
210
211\func{void}{SetAlign}{\param{int }{a}}
212
fa482912 213Sets default horizontal alignment (see
f533a674 214\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
704a4b75
VS
215Alignment of newly opened container is set to this value.
216
605d715d
VS
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
fa482912 222wherever possible.
704a4b75 223
559fe022 224\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
704a4b75 225
605d715d
VS
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.)
704a4b75 233
559fe022 234\membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
704a4b75 235
559fe022 236\func{void}{SetFontBold}{\param{int }{x}}
704a4b75 237
cc81d32f 238Sets bold flag of actualfont. {\it x} is either true of false.
704a4b75 239
605d715d
VS
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
559fe022 248\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
704a4b75 249
559fe022 250\func{void}{SetFontFixed}{\param{int }{x}}
704a4b75 251
cc81d32f 252Sets fixed face flag of actualfont. {\it x} is either true of false.
704a4b75 253
559fe022 254\membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
704a4b75 255
559fe022 256\func{void}{SetFontItalic}{\param{int }{x}}
704a4b75 257
cc81d32f 258Sets italic flag of actualfont. {\it x} is either true of false.
704a4b75 259
559fe022 260\membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
704a4b75 261
559fe022
VS
262\func{void}{SetFontSize}{\param{int }{s}}
263
846914d1 264Sets actual font size (HTML size varies from 1 to 7)
559fe022
VS
265
266\membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
267
268\func{void}{SetFontUnderlined}{\param{int }{x}}
269
cc81d32f 270Sets underlined flag of actualfont. {\it x} is either true of false.
559fe022
VS
271
272\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
704a4b75 273
fbfb8bcc 274\func{void}{SetFonts}{\param{const wxString\& }{normal\_face}, \param{const wxString\& }{fixed\_face}, \param{const int }{*sizes = NULL}}
559fe022 275
4eecf115
VS
276Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
277detailed description.
704a4b75 278
b250d384
VS
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
704a4b75
VS
287\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
288
846914d1 289\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
704a4b75 290
846914d1 291Sets actual hypertext link. Empty link is represented
f533a674 292by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
846914d1 293to wxEmptyString.
704a4b75 294
559fe022 295\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
704a4b75 296
559fe022 297\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
704a4b75 298
fa482912 299Sets colour of hypertext link.
f533a674 300