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