]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/htwinprs.tex
dabac42bb2ded8336fe10d0ee024cb1cde46680c
[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::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 wxHtmlLinkInfo\&}{GetLink}{\void}
151
152 Returns actual hypertext link. (This value has non-empty
153 \helpref{Href}{wxhtmllinkinfogethref}} string
154 if the parser is between {\tt <A>} and {\tt </A>} tags,
155 wxEmptyString otherwise.
156
157
158 \membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
159
160 \constfunc{const wxColour\&}{GetLinkColor}{\void}
161
162 Returns color of hypertext link text.
163
164 \membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
165
166 \func{wxWindow*}{GetWindow}{\void}
167
168 Returns associated window (wxHtmlWindow). This may be NULL! (You should always
169 test if it is non-NULL. For example {\tt TITLE} handler sets window
170 title only if some window is associated, otherwise it does nothing)
171
172
173 \membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
174
175 \func{wxHtmlContainerCell*}{OpenContainer}{\void}
176
177 Opens new container and returns pointer to it (see \helpref{Overview}{cells}).
178
179 %
180 \membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
181
182 \func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
183
184 Sets actual text color. Note: this DOESN'T change the color!
185 You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
186
187 \membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
188
189 \func{void}{SetAlign}{\param{int }{a}}
190
191 Sets default horizontal alignment (see \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.
192 Alignment of newly opened container is set to this value.
193
194 %\membersection{wxHtmlWinParser::SetContainer}\label{wxhtmlwinparsersetcontainer}
195 %
196 %\func{wxHtmlContainerCell*}{SetContainer}{\param{wxHtmlContainerCell *}{c}}
197 %
198 %Allows you to directly set opened container. This is not recommended - you should use OpenContainer
199 %whereever possible.
200 %
201
202 \membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
203
204 \func{virtual void}{SetDC}{\param{wxDC }{*dc}, \param{double }{pixel_scale = 1.0}
205
206 Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}! {\it pixel_scale}
207 can be used when rendering to high-resolution DCs (e.g. printer) to adjust size of pixel metrics.
208 (Many dimensions in HTML are given in pixels - e.g. image sizes. 300x300 image would be only one
209 inch wide on typical printer. With pixel_scale = 3.0 it would be 3 inches.)
210
211 \membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
212
213 \func{void}{SetFontBold}{\param{int }{x}}
214
215 Sets bold flag of actualfont. {\it x} is either TRUE of FALSE.
216
217 \membersection{wxHtmlWinParser::SetFontFixed}\label{wxhtmlwinparsersetfontfixed}
218
219 \func{void}{SetFontFixed}{\param{int }{x}}
220
221 Sets fixed face flag of actualfont. {\it x} is either TRUE of FALSE.
222
223 \membersection{wxHtmlWinParser::SetFontItalic}\label{wxhtmlwinparsersetfontitalic}
224
225 \func{void}{SetFontItalic}{\param{int }{x}}
226
227 Sets italic flag of actualfont. {\it x} is either TRUE of FALSE.
228
229 \membersection{wxHtmlWinParser::SetFontSize}\label{wxhtmlwinparsersetfontsize}
230
231 \func{void}{SetFontSize}{\param{int }{s}}
232
233 Sets actual font size (HTML size varies from 1 to 7)
234
235 \membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
236
237 \func{void}{SetFontUnderlined}{\param{int }{x}}
238
239 Sets underlined flag of actualfont. {\it x} is either TRUE of FALSE.
240
241 \membersection{wxHtmlWinParser::SetFonts}\label{wxhtmlwinparsersetfonts}
242
243 \func{void}{SetFonts}{\param{wxString }{normal\_face}, \param{wxString }{fixed\_face}, \param{const int }{*sizes}}
244
245 Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
246
247 \membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
248
249 \func{void}{SetLink}{\param{const wxHtmlLinkInfo\& }{link}}
250
251 Sets actual hypertext link. Empty link is represented
252 by \helpref{wxHtmlLinkInfo}{wxhtmllinkinfo} with {\it Href} equal
253 to wxEmptyString.
254
255 \membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
256
257 \func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
258
259 Sets color of hypertext link.
260