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