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