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