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