]>
Commit | Line | Data |
---|---|---|
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 | 9 | This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and |
704a4b75 | 10 | its 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 | ||
9704b250 VS |
24 | |
25 | \wxheading{Include files} | |
26 | ||
27 | <wx/html/winpars.h> | |
28 | ||
704a4b75 VS |
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 | ||
559fe022 | 44 | \membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule} |
704a4b75 | 45 | |
559fe022 | 46 | \func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}} |
704a4b75 | 47 | |
559fe022 | 48 | Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler. |
704a4b75 | 49 | |
559fe022 | 50 | \membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer} |
704a4b75 | 51 | |
559fe022 | 52 | \func{wxHtmlContainerCell*}{CloseContainer}{\void} |
704a4b75 | 53 | |
559fe022 VS |
54 | Closes the container, sets actual container to the parent one |
55 | and returns pointer to it (see \helpref{Overview}{cells}). | |
704a4b75 | 56 | |
559fe022 | 57 | \membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont} |
704a4b75 | 58 | |
559fe022 | 59 | \func{virtual wxFont*}{CreateCurrentFont}{\void} |
704a4b75 | 60 | |
f533a674 | 61 | Creates font based on current setting (see |
559fe022 VS |
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.) | |
704a4b75 | 69 | |
704a4b75 | 70 | |
559fe022 | 71 | \membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor} |
704a4b75 | 72 | |
559fe022 | 73 | \constfunc{const wxColour\&}{GetActualColor}{\void} |
704a4b75 | 74 | |
559fe022 | 75 | Returns actual text color. |
704a4b75 | 76 | |
559fe022 | 77 | \membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign} |
704a4b75 | 78 | |
559fe022 | 79 | \constfunc{int}{GetAlign}{\void} |
704a4b75 | 80 | |
559fe022 | 81 | Returns default horizontal alignment. |
704a4b75 | 82 | |
559fe022 | 83 | \membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight} |
704a4b75 | 84 | |
559fe022 | 85 | \constfunc{int}{GetCharHeight}{\void} |
704a4b75 | 86 | |
559fe022 | 87 | Returns (average) char height in standard font. It's used as DC-independent metrics. |
704a4b75 | 88 | |
448af9a4 JS |
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()}. | |
704a4b75 | 91 | |
559fe022 | 92 | \membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth} |
704a4b75 | 93 | |
559fe022 | 94 | \constfunc{int}{GetCharWidth}{\void} |
704a4b75 | 95 | |
559fe022 | 96 | Returns average char width in standard font. It's used as DC-independent metrics. |
704a4b75 | 97 | |
448af9a4 JS |
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()} | |
704a4b75 | 100 | |
704a4b75 VS |
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 | ||
559fe022 | 112 | \membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc} |
704a4b75 | 113 | |
559fe022 | 114 | \func{wxDC*}{GetDC}{\void} |
704a4b75 | 115 | |
559fe022 | 116 | Returns pointer to the DC used during parsing. |
704a4b75 | 117 | |
b250d384 VS |
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 | ||
704a4b75 VS |
127 | \membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold} |
128 | ||
129 | \constfunc{int}{GetFontBold}{\void} | |
130 | ||
131 | Returns TRUE if actual font is bold, FALSE otherwise. | |
132 | ||
605d715d VS |
133 | \membersection{wxHtmlWinParser::GetFontFace}\label{wxhtmlwinparsergetfontface} |
134 | ||
135 | \constfunc{wxString}{GetFontFace}{\void} | |
136 | ||
137 | Returns actual font face name. | |
138 | ||
139 | ||
559fe022 | 140 | \membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed} |
704a4b75 | 141 | |
559fe022 | 142 | \constfunc{int}{GetFontFixed}{\void} |
704a4b75 | 143 | |
559fe022 | 144 | Returns TRUE if actual font is fixed face, FALSE otherwise. |
704a4b75 VS |
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 | ||
559fe022 | 153 | \membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize} |
704a4b75 | 154 | |
559fe022 | 155 | \constfunc{int}{GetFontSize}{\void} |
704a4b75 | 156 | |
559fe022 | 157 | Returns actual font size (HTML size varies from -2 to +4) |
704a4b75 VS |
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 | ||
b250d384 VS |
165 | \membersection{wxHtmlWinParser::GetInputEncoding}\label{wxhtmlwinparsergetinputencoding} |
166 | ||
167 | \constfunc{wxFontEncoding}{GetInputEncoding}{\void} | |
168 | ||
169 | Returns input encoding. | |
170 | ||
171 | ||
559fe022 | 172 | \membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink} |
704a4b75 | 173 | |
846914d1 | 174 | \constfunc{const wxHtmlLinkInfo\&}{GetLink}{\void} |
704a4b75 | 175 | |
f533a674 RD |
176 | Returns actual hypertext link. (This value has non-empty |
177 | \helpref{Href}{wxhtmllinkinfogethref} string | |
559fe022 | 178 | if the parser is between {\tt <A>} and {\tt </A>} tags, |
f533a674 | 179 | wxEmptyString otherwise.) |
704a4b75 | 180 | |
704a4b75 | 181 | |
559fe022 | 182 | \membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor} |
704a4b75 | 183 | |
559fe022 | 184 | \constfunc{const wxColour\&}{GetLinkColor}{\void} |
704a4b75 | 185 | |
559fe022 | 186 | Returns color of hypertext link text. |
704a4b75 | 187 | |
b250d384 VS |
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 | ||
559fe022 | 196 | \membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow} |
704a4b75 | 197 | |
559fe022 | 198 | \func{wxWindow*}{GetWindow}{\void} |
704a4b75 | 199 | |
559fe022 VS |
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) | |
704a4b75 | 203 | |
704a4b75 | 204 | |
559fe022 VS |
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 | ||
605d715d | 211 | |
559fe022 VS |
212 | \membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor} |
213 | ||
214 | \func{void}{SetActualColor}{\param{const wxColour\& }{clr}} | |
215 | ||
f533a674 | 216 | Sets actual text color. Note: this DOESN'T change the color! |
559fe022 | 217 | You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself. |
704a4b75 VS |
218 | |
219 | \membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign} | |
220 | ||
221 | \func{void}{SetAlign}{\param{int }{a}} | |
222 | ||
f533a674 RD |
223 | Sets default horizontal alignment (see |
224 | \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.) | |
704a4b75 VS |
225 | Alignment of newly opened container is set to this value. |
226 | ||
605d715d VS |
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 | ||
704a4b75 | 235 | |
559fe022 | 236 | \membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc} |
704a4b75 | 237 | |
605d715d VS |
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.) | |
704a4b75 | 245 | |
704a4b75 | 246 | |
559fe022 | 247 | \membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold} |
704a4b75 | 248 | |
559fe022 | 249 | \func{void}{SetFontBold}{\param{int }{x}} |
704a4b75 | 250 | |
559fe022 | 251 | Sets bold flag of actualfont. {\it x} is either TRUE of FALSE. |
704a4b75 | 252 | |
605d715d VS |
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 | ||
559fe022 | 261 | \membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed} |
704a4b75 | 262 | |
559fe022 | 263 | \func{void}{SetFontFixed}{\param{int }{x}} |
704a4b75 | 264 | |
559fe022 | 265 | Sets fixed face flag of actualfont. {\it x} is either TRUE of FALSE. |
704a4b75 | 266 | |
559fe022 | 267 | \membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic} |
704a4b75 | 268 | |
559fe022 | 269 | \func{void}{SetFontItalic}{\param{int }{x}} |
704a4b75 | 270 | |
559fe022 | 271 | Sets italic flag of actualfont. {\it x} is either TRUE of FALSE. |
704a4b75 | 272 | |
605d715d | 273 | |
559fe022 | 274 | \membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize} |
704a4b75 | 275 | |
559fe022 VS |
276 | \func{void}{SetFontSize}{\param{int }{s}} |
277 | ||
846914d1 | 278 | Sets actual font size (HTML size varies from 1 to 7) |
559fe022 VS |
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} | |
704a4b75 | 287 | |
8eb2940f | 288 | \func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}} |
559fe022 VS |
289 | |
290 | Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts} | |
704a4b75 | 291 | |
b250d384 VS |
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 | ||
704a4b75 VS |
302 | \membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink} |
303 | ||
846914d1 | 304 | \func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}} |
704a4b75 | 305 | |
846914d1 | 306 | Sets actual hypertext link. Empty link is represented |
f533a674 | 307 | by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal |
846914d1 | 308 | to wxEmptyString. |
704a4b75 | 309 | |
559fe022 | 310 | \membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor} |
704a4b75 | 311 | |
559fe022 | 312 | \func{void}{SetLinkColor}{\param{const wxColour\& }{clr}} |
704a4b75 | 313 | |
559fe022 | 314 | Sets color of hypertext link. |
22d6efa8 | 315 | |
f533a674 | 316 |