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