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