]>
Commit | Line | Data |
---|---|---|
1 | % | |
2 | % automatically generated by HelpGen from | |
3 | % htmlwinparser.tex at 14/Mar/99 20:13:37 | |
4 | % | |
5 | ||
6 | \section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser} | |
7 | ||
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 | ||
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 | ||
40 | \membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule} | |
41 | ||
42 | \func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}} | |
43 | ||
44 | Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler. | |
45 | ||
46 | \membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer} | |
47 | ||
48 | \func{wxHtmlContainerCell*}{CloseContainer}{\void} | |
49 | ||
50 | Closes the container, sets actual container to the parent one | |
51 | and returns pointer to it (see \helpref{Overview}{cells}). | |
52 | ||
53 | \membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont} | |
54 | ||
55 | \func{virtual wxFont*}{CreateCurrentFont}{\void} | |
56 | ||
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.) | |
65 | ||
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! | |
69 | ||
70 | \membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor} | |
71 | ||
72 | \constfunc{const wxColour\&}{GetActualColor}{\void} | |
73 | ||
74 | Returns actual text color. | |
75 | ||
76 | \membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign} | |
77 | ||
78 | \constfunc{int}{GetAlign}{\void} | |
79 | ||
80 | Returns default horizontal alignment. | |
81 | ||
82 | \membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight} | |
83 | ||
84 | \constfunc{int}{GetCharHeight}{\void} | |
85 | ||
86 | Returns (average) char height in standard font. It's used as DC-independent metrics. | |
87 | ||
88 | {\bf Note:} This function doesn't return {\it actual} height. If you want to | |
89 | know the height of the current font, call {\tt GetDC -> GetCharHeight()}. | |
90 | ||
91 | \membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth} | |
92 | ||
93 | \constfunc{int}{GetCharWidth}{\void} | |
94 | ||
95 | Returns average char width in standard font. It's used as DC-independent metrics. | |
96 | ||
97 | {\bf Note:} This function doesn't return {\it actual} width. If you want to | |
98 | know the height of the current font, call {\tt GetDC -> GetCharWidth()} | |
99 | ||
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 | ||
111 | \membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc} | |
112 | ||
113 | \func{wxDC*}{GetDC}{\void} | |
114 | ||
115 | Returns pointer to the DC used during parsing. | |
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 | ||
123 | \membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed} | |
124 | ||
125 | \constfunc{int}{GetFontFixed}{\void} | |
126 | ||
127 | Returns TRUE if actual font is fixed face, FALSE otherwise. | |
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 | ||
136 | \membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize} | |
137 | ||
138 | \constfunc{int}{GetFontSize}{\void} | |
139 | ||
140 | Returns actual font size (HTML size varies from -2 to +4) | |
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 | ||
148 | \membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink} | |
149 | ||
150 | \constfunc{const wxString\&}{GetLink}{\void} | |
151 | ||
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. | |
155 | ||
156 | ||
157 | \membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor} | |
158 | ||
159 | \constfunc{const wxColour\&}{GetLinkColor}{\void} | |
160 | ||
161 | Returns color of hypertext link text. | |
162 | ||
163 | \membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow} | |
164 | ||
165 | \func{wxWindow*}{GetWindow}{\void} | |
166 | ||
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) | |
170 | ||
171 | ||
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. | |
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 | ||
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 | % | |
200 | ||
201 | \membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc} | |
202 | ||
203 | \func{virtual void}{SetDC}{\param{wxDC }{*dc}} | |
204 | ||
205 | Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}! | |
206 | ||
207 | \membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold} | |
208 | ||
209 | \func{void}{SetFontBold}{\param{int }{x}} | |
210 | ||
211 | Sets bold flag of actualfont. {\it x} is either TRUE of FALSE. | |
212 | ||
213 | \membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed} | |
214 | ||
215 | \func{void}{SetFontFixed}{\param{int }{x}} | |
216 | ||
217 | Sets fixed face flag of actualfont. {\it x} is either TRUE of FALSE. | |
218 | ||
219 | \membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic} | |
220 | ||
221 | \func{void}{SetFontItalic}{\param{int }{x}} | |
222 | ||
223 | Sets italic flag of actualfont. {\it x} is either TRUE of FALSE. | |
224 | ||
225 | \membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize} | |
226 | ||
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} | |
238 | ||
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} | |
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 | ||
249 | \membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor} | |
250 | ||
251 | \func{void}{SetLinkColor}{\param{const wxColour\& }{clr}} | |
252 | ||
253 | Sets color of hypertext link. | |
254 |