]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwinprs.tex
Reversed the meaning of black and white in wxRegion::ConvertToBitmap
[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
2edb0bde 38{\it wnd} parameter ({\it wnd} is pointer to associated \helpref{wxHtmlWindow}{wxhtmlwindow})
704a4b75 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
2edb0bde 101Returns pointer to the currently opened container (see \helpref{Overview}{cells}).
704a4b75
VS
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
cc81d32f 126Returns true if actual font is bold, false otherwise.
704a4b75 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
cc81d32f 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
cc81d32f 144Returns true if actual font is italic, false otherwise.
704a4b75 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
cc81d32f 156Returns true if actual font is underlined, false otherwise.
704a4b75 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
cc81d32f 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
cc81d32f 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
cc81d32f 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
cc81d32f 268Sets underlined flag of actualfont. {\it x} is either true of false.
559fe022
VS
269
270\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
704a4b75 271
4eecf115 272\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes = NULL}}
559fe022 273
4eecf115
VS
274Sets fonts. See \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} for
275detailed description.
704a4b75 276
b250d384
VS
277\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
278
279\func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
280
281Sets input encoding. The parser uses this information to build conversion
282tables from document's encoding to some encoding supported by operating
283system.
284
704a4b75
VS
285\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
286
846914d1 287\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
704a4b75 288
846914d1 289Sets actual hypertext link. Empty link is represented
f533a674 290by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
846914d1 291to wxEmptyString.
704a4b75 292
559fe022 293\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
704a4b75 294
559fe022 295\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
704a4b75 296
fa482912 297Sets colour of hypertext link.
f533a674 298