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