]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/htwinprs.tex
wxHTML overview reorganized
[wxWidgets.git] / docs / latex / wx / htwinprs.tex
... / ...
CommitLineData
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
8This class is derived from \helpref{wxHtmlParser}{wxhtmlparser} and
9its 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
37Constructor. 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
44Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
45
46\membersection{wxHtmlWinParser::CloseContainer}\label{wxhtmlwinparserclosecontainer}
47
48\func{wxHtmlContainerCell*}{CloseContainer}{\void}
49
50Closes the container, sets actual container to the parent one
51and returns pointer to it (see \helpref{Overview}{cells}).
52
53\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
54
55\func{virtual wxFont*}{CreateCurrentFont}{\void}
56
57Creates 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})
63and returns pointer to it.
64(If the font was already created only a pointer is returned.)
65
66Fonts created during parsing are temporary data and are not freed on DoneParser.
67You must call \helpref{delete myparser->GetTempData();}{wxhtmlparsergettempdata}
68to free the memory!
69
70\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
71
72\constfunc{const wxColour\&}{GetActualColor}{\void}
73
74Returns actual text color.
75
76\membersection{wxHtmlWinParser::GetAlign}\label{wxhtmlwinparsergetalign}
77
78\constfunc{int}{GetAlign}{\void}
79
80Returns default horizontal alignment.
81
82\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
83
84\constfunc{int}{GetCharHeight}{\void}
85
86Returns (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
89know the height of the current font, call {\tt GetDC -> GetCharHeight()}.
90
91\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
92
93\constfunc{int}{GetCharWidth}{\void}
94
95Returns 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
98know the height of the current font, call {\tt GetDC -> GetCharWidth()}
99
100\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
101
102\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
103
104Returns pointer to the currectly opened container (see \helpref{Overview}{cells}).
105Common use:
106
107\begin{verbatim}
108m_WParser -> GetContainer() -> InsertCell(new ...);
109\end{verbatim}
110
111\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
112
113\func{wxDC*}{GetDC}{\void}
114
115Returns pointer to the DC used during parsing.
116
117\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
118
119\constfunc{int}{GetFontBold}{\void}
120
121Returns TRUE if actual font is bold, FALSE otherwise.
122
123\membersection{wxHtmlWinParser::GetFontFixed}\label{wxhtmlwinparsergetfontfixed}
124
125\constfunc{int}{GetFontFixed}{\void}
126
127Returns TRUE if actual font is fixed face, FALSE otherwise.
128
129\membersection{wxHtmlWinParser::GetFontItalic}\label{wxhtmlwinparsergetfontitalic}
130
131\constfunc{int}{GetFontItalic}{\void}
132
133Returns TRUE if actual font is italic, FALSE otherwise.
134
135
136\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
137
138\constfunc{int}{GetFontSize}{\void}
139
140Returns actual font size (HTML size varies from -2 to +4)
141
142\membersection{wxHtmlWinParser::GetFontUnderlined}\label{wxhtmlwinparsergetfontunderlined}
143
144\constfunc{int}{GetFontUnderlined}{\void}
145
146Returns TRUE if actual font is underlined, FALSE otherwise.
147
148\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
149
150\constfunc{const wxString\&}{GetLink}{\void}
151
152Returns actual hypertext link. (This value is non-empty string
153if the parser is between {\tt <A>} and {\tt </A>} tags,
154wxEmptyString otherwise.
155
156
157\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
158
159\constfunc{const wxColour\&}{GetLinkColor}{\void}
160
161Returns color of hypertext link text.
162
163\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
164
165\func{wxWindow*}{GetWindow}{\void}
166
167Returns associated window (wxHtmlWindow). This may be NULL! (You should always
168test if it is non-NULL. For example {\tt TITLE} handler sets window
169title 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
176Opens 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
183Sets actual text color. Note: this DOESN'T change the color!
184You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
185
186\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
187
188\func{void}{SetAlign}{\param{int }{a}}
189
190Sets default horizontal alignment (see \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.
191Alignment 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
205Sets 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
211Sets 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
217Sets 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
223Sets 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
229Sets 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
235Sets 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
241Sets 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
247Sets actual hypertext link. wxEmptyString means no link.
248
249\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
250
251\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
252
253Sets color of hypertext link.
254