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