]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwinprs.tex
added CentreOnScreen(), updated the docs to clear this mess a bit
[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
b250d384 6
704a4b75
VS
7\section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
8
f533a674 9This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
704a4b75 10its mail goal is to parse HTML input so that it can be displayed in
f533a674 11\helpref{wxHtmlWindow}{wxhtmlwindow}. It uses special
704a4b75
VS
12\helpref{wxHtmlWinTagHandler}{wxhtmlwintaghandler}.
13
14\wxheading{Notes}
15
16\begin{enumerate}
17\item Product of parsing is wxHtmlCell (resp. wxHtmlContainer) object.
704a4b75
VS
18\end{enumerate}
19
704a4b75
VS
20\wxheading{Derived from}
21
22\helpref{wxHtmlParser}{wxhtmlparser}
23
24\wxheading{See Also}
25
26\helpref{Handlers overview}{handlers}
27
28\latexignore{\rtfignore{\wxheading{Members}}}
29
30\membersection{wxHtmlWinParser::wxHtmlWinParser}\label{wxhtmlwinparserwxhtmlwinparser}
31
32\func{}{wxHtmlWinParser}{\void}
33
34\func{}{wxHtmlWinParser}{\param{wxWindow }{*wnd}}
35
36Constructor. Don't use the default one, use constructor with
37{\it wnd} paremeter ({\it wnd} is pointer to associated \helpref{wxHtmlWindow}{wxhtmlwindow})
38
559fe022 39\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
704a4b75 40
559fe022 41\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
704a4b75 42
559fe022 43Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
704a4b75 44
559fe022 45\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
704a4b75 46
559fe022 47\func{wxHtmlContainerCell*}{CloseContainer}{\void}
704a4b75 48
559fe022
VS
49Closes the container, sets actual container to the parent one
50and returns pointer to it (see \helpref{Overview}{cells}).
704a4b75 51
559fe022 52\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
704a4b75 53
559fe022 54\func{virtual wxFont*}{CreateCurrentFont}{\void}
704a4b75 55
f533a674 56Creates font based on current setting (see
559fe022
VS
57\helpref{SetFontSize}{wxhtmlwinparsersetfontsize},
58\helpref{SetFontBold}{wxhtmlwinparsersetfontbold},
59\helpref{SetFontItalic}{wxhtmlwinparsersetfontitalic},
60\helpref{SetFontFixed}{wxhtmlwinparsersetfontfixed},
61\helpref{SetFontUnderlined}{wxhtmlwinparsersetfontunderlined})
62and returns pointer to it.
63(If the font was already created only a pointer is returned.)
704a4b75 64
704a4b75 65
559fe022 66\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
704a4b75 67
559fe022 68\constfunc{const wxColour\&}{GetActualColor}{\void}
704a4b75 69
559fe022 70Returns actual text color.
704a4b75 71
559fe022 72\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
704a4b75 73
559fe022 74\constfunc{int}{GetAlign}{\void}
704a4b75 75
559fe022 76Returns default horizontal alignment.
704a4b75 77
559fe022 78\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
704a4b75 79
559fe022 80\constfunc{int}{GetCharHeight}{\void}
704a4b75 81
559fe022 82Returns (average) char height in standard font. It's used as DC-independent metrics.
704a4b75 83
448af9a4
JS
84{\bf Note:} This function doesn't return {\it actual} height. If you want to
85know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
704a4b75 86
559fe022 87\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
704a4b75 88
559fe022 89\constfunc{int}{GetCharWidth}{\void}
704a4b75 90
559fe022 91Returns average char width in standard font. It's used as DC-independent metrics.
704a4b75 92
448af9a4
JS
93{\bf Note:} This function doesn't return {\it actual} width. If you want to
94know the height of the current font, call {\tt GetDC -> GetCharWidth()}
704a4b75 95
704a4b75
VS
96\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
97
98\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
99
100Returns pointer to the currectly opened container (see \helpref{Overview}{cells}).
101Common use:
102
103\begin{verbatim}
104m_WParser -> GetContainer() -> InsertCell(new ...);
105\end{verbatim}
106
559fe022 107\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
704a4b75 108
559fe022 109\func{wxDC*}{GetDC}{\void}
704a4b75 110
559fe022 111Returns pointer to the DC used during parsing.
704a4b75 112
b250d384
VS
113
114\membersection{wxHtmlWinParser::GetEncodingConverter}\label{wxhtmlwinparsergetencodingconverter}
115
116\constfunc{wxEncodingConverter *}{GetEncodingConverter}{\void}
117
118Returns \helpref{wxEncodingConverter}{wxencodingconverter} class used
119to do conversion between \helpref{input encoding}{wxhtmlwinparsergetinputencoding}
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
134
559fe022 135\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
704a4b75 136
559fe022 137\constfunc{int}{GetFontFixed}{\void}
704a4b75 138
559fe022 139Returns TRUE if actual font is fixed face, FALSE otherwise.
704a4b75
VS
140
141\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
142
143\constfunc{int}{GetFontItalic}{\void}
144
145Returns TRUE if actual font is italic, FALSE otherwise.
146
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
158Returns TRUE if actual font is underlined, FALSE otherwise.
159
b250d384
VS
160\membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding}
161
162\constfunc{wxFontEncoding}{GetInputEncoding}{\void}
163
164Returns input encoding.
165
166
559fe022 167\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
704a4b75 168
846914d1 169\constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void}
704a4b75 170
f533a674
RD
171Returns actual hypertext link. (This value has non-empty
172\helpref{Href}{wxhtmllinkinfogethref} string
559fe022 173if the parser is between {\tt <A>} and {\tt </A>} tags,
f533a674 174wxEmptyString otherwise.)
704a4b75 175
704a4b75 176
559fe022 177\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
704a4b75 178
559fe022 179\constfunc{const wxColour\&}{GetLinkColor}{\void}
704a4b75 180
559fe022 181Returns color of hypertext link text.
704a4b75 182
b250d384
VS
183
184\membersection{wxHtmlWinParser::GetOutputEncoding}\label{wxhtmlwinparsergetoutputencoding}
185
186\constfunc{wxFontEncoding}{GetOutputEncoding}{\void}
187
188Returns output encoding, i.e. closest match to document's input encoding
189that is supported by operating system.
190
559fe022 191\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
704a4b75 192
559fe022 193\func{wxWindow*}{GetWindow}{\void}
704a4b75 194
559fe022
VS
195Returns associated window (wxHtmlWindow). This may be NULL! (You should always
196test if it is non-NULL. For example {\tt TITLE} handler sets window
197title only if some window is associated, otherwise it does nothing)
704a4b75 198
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
605d715d 206
559fe022
VS
207\membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
208
209\func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
210
f533a674 211Sets actual text color. Note: this DOESN'T change the color!
559fe022 212You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
704a4b75
VS
213
214\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
215
216\func{void}{SetAlign}{\param{int }{a}}
217
f533a674
RD
218Sets default horizontal alignment (see
219\helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.)
704a4b75
VS
220Alignment of newly opened container is set to this value.
221
605d715d
VS
222
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
228whereever possible.
229
704a4b75 230
559fe022 231\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
704a4b75 232
605d715d
VS
233\func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel\_scale = 1.0}}
234
235Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
236{\it pixel\_scale} can be used when rendering to high-resolution
237DCs (e.g. printer) to adjust size of pixel metrics. (Many dimensions in
238HTML are given in pixels -- e.g. image sizes. 300x300 image would be only one
239inch wide on typical printer. With pixel\_scale = 3.0 it would be 3 inches.)
704a4b75 240
704a4b75 241
559fe022 242\membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
704a4b75 243
559fe022 244\func{void}{SetFontBold}{\param{int }{x}}
704a4b75 245
559fe022 246Sets bold flag of actualfont. {\it x} is either TRUE of FALSE.
704a4b75 247
605d715d
VS
248\membersection{wxHtmlWinParser::SetFontFace}\label{wxhtmlwinparsersetfontface}
249
250\func{void}{SetFontFace}{\param{const wxString\& }{face}}
251
252Sets current font face to {\it face}. This affects either fixed size
253font or proportional, depending on context (whether the parser is
254inside {\tt <TT>} tag or not).
255
559fe022 256\membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
704a4b75 257
559fe022 258\func{void}{SetFontFixed}{\param{int }{x}}
704a4b75 259
559fe022 260Sets fixed face flag of actualfont. {\it x} is either TRUE of FALSE.
704a4b75 261
559fe022 262\membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
704a4b75 263
559fe022 264\func{void}{SetFontItalic}{\param{int }{x}}
704a4b75 265
559fe022 266Sets italic flag of actualfont. {\it x} is either TRUE of FALSE.
704a4b75 267
605d715d 268
559fe022 269\membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
704a4b75 270
559fe022
VS
271\func{void}{SetFontSize}{\param{int }{s}}
272
846914d1 273Sets actual font size (HTML size varies from 1 to 7)
559fe022
VS
274
275\membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
276
277\func{void}{SetFontUnderlined}{\param{int }{x}}
278
279Sets underlined flag of actualfont. {\it x} is either TRUE of FALSE.
280
281\membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
704a4b75 282
8eb2940f 283\func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
559fe022
VS
284
285Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
704a4b75 286
b250d384
VS
287
288\membersection{wxHtmlWinParser::SetInputEncoding}\label{wxhtmlwinparsersetinputencoding}
289
290\func{void}{SetInputEncoding}{\param{wxFontEncoding }{enc}}
291
292Sets input encoding. The parser uses this information to build conversion
293tables from document's encoding to some encoding supported by operating
294system.
295
296
704a4b75
VS
297\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
298
846914d1 299\func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
704a4b75 300
846914d1 301Sets actual hypertext link. Empty link is represented
f533a674 302by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
846914d1 303to wxEmptyString.
704a4b75 304
559fe022 305\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
704a4b75 306
559fe022 307\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
704a4b75 308
559fe022 309Sets color of hypertext link.
22d6efa8 310
f533a674 311