]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/htwinprs.tex
Several changes and updates
[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
704a4b75
VS
6\section{\class{wxHtmlWinParser}}\label{wxhtmlwinparser}
7
704a4b75
VS
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
704a4b75
VS
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
704a4b75
VS
40\membersection{wxHtmlWinParser::SetDC}\label{wxhtmlwinparsersetdc}
41
42\func{virtual void}{SetDC}{\param{wxDC }{*dc}}
43
44Sets the DC. This must be called before \helpref{Parse}{wxhtmlparserparse}!
45
46\membersection{wxHtmlWinParser::GetDC}\label{wxhtmlwinparsergetdc}
47
48\func{wxDC*}{GetDC}{\void}
49
50Returns pointer to the DC used during parsing.
51
52\membersection{wxHtmlWinParser::GetCharHeight}\label{wxhtmlwinparsergetcharheight}
53
54\constfunc{int}{GetCharHeight}{\void}
55
56Returns (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
59know height of current font, call {\tt GetDC -> GetCharHeight()}
60
61\membersection{wxHtmlWinParser::GetCharWidth}\label{wxhtmlwinparsergetcharwidth}
62
63\constfunc{int}{GetCharWidth}{\void}
64
65Returns 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
68know height of current font, call {\tt GetDC -> GetCharWidth()}
69
70\membersection{wxHtmlWinParser::GetWindow}\label{wxhtmlwinparsergetwindow}
71
72\func{wxWindow*}{GetWindow}{\void}
73
74Returns associated window (wxHtmlWindow). This may be NULL! (You should always
75test if it is non-NULL. For example {\tt TITLE} handler sets window
76title 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
83Sets fonts. This method is identical to \helpref{wxHtmlWindow::SetFonts}{wxhtmlwindowsetfonts}
84
704a4b75
VS
85\membersection{wxHtmlWinParser::AddModule}\label{wxhtmlwinparseraddmodule}
86
87\func{static void}{AddModule}{\param{wxHtmlTagsModule }{*module}}
88
89Adds \helpref{module}{handlers} to the list of wxHtmlWinParser tag handler.
90
704a4b75
VS
91\membersection{wxHtmlWinParser::GetContainer}\label{wxhtmlwinparsergetcontainer}
92
93\constfunc{wxHtmlContainerCell*}{GetContainer}{\void}
94
95Returns pointer to the currectly opened container (see \helpref{Overview}{cells}).
96Common use:
97
98\begin{verbatim}
99m_WParser -> GetContainer() -> InsertCell(new ...);
100\end{verbatim}
101
102\membersection{wxHtmlWinParser::OpenContainer}\label{wxhtmlwinparseropencontainer}
103
104\func{wxHtmlContainerCell*}{OpenContainer}{\void}
105
106Opens 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
121Closes the container, sets actual container to the parent one
122and returns pointer to it (see \helpref{Overview}{cells}).
123
704a4b75
VS
124\membersection{wxHtmlWinParser::GetFontSize}\label{wxhtmlwinparsergetfontsize}
125
126\constfunc{int}{GetFontSize}{\void}
127
128Returns 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
134Sets actual font size (HTML size varies from -2 to +4)
135
136\membersection{wxHtmlWinParser::GetFontBold}\label{wxhtmlwinparsergetfontbold}
137
138\constfunc{int}{GetFontBold}{\void}
139
140Returns TRUE if actual font is bold, FALSE otherwise.
141
142\membersection{wxHtmlWinParser::SetFontBold}\label{wxhtmlwinparsersetfontbold}
143
144\func{void}{SetFontBold}{\param{int }{x}}
145
146Sets 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
152Returns 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
159Sets 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
165Returns TRUE if actual font is underlined, FALSE otherwise.
166
167\membersection{wxHtmlWinParser::SetFontUnderlined}\label{wxhtmlwinparsersetfontunderlined}
168
169\func{void}{SetFontUnderlined}{\param{int }{x}}
170
171Sets 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
177Returns 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
183Sets 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
189Returns default horizontal alignment.
190
191\membersection{wxHtmlWinParser::SetAlign}\label{wxhtmlwinparsersetalign}
192
193\func{void}{SetAlign}{\param{int }{a}}
194
195Sets default horizontal alignment (see \helpref{wxHtmlContainerCell::SetAlignHor}{wxhtmlcontainercellsetalignhor}.
196Alignment of newly opened container is set to this value.
197
198\membersection{wxHtmlWinParser::GetLinkColor}\label{wxhtmlwinparsergetlinkcolor}
199
200\constfunc{const wxColour\&}{GetLinkColor}{\void}
201
202Returns color of hypertext link text.
203
204\membersection{wxHtmlWinParser::SetLinkColor}\label{wxhtmlwinparsersetlinkcolor}
205
206\func{void}{SetLinkColor}{\param{const wxColour\& }{clr}}
207
208Sets color of hypertext link.
209
210\membersection{wxHtmlWinParser::GetActualColor}\label{wxhtmlwinparsergetactualcolor}
211
212\constfunc{const wxColour\&}{GetActualColor}{\void}
213
214Returns actual text color.
215
216\membersection{wxHtmlWinParser::SetActualColor}\label{wxhtmlwinparsersetactualcolor}
217
218\func{void}{SetActualColor}{\param{const wxColour\& }{clr}}
219
220Sets actual text color. Note: this DOESN'T change the color!
221You must create \helpref{wxHtmlColourCell}{wxhtmlcolourcell} yourself.
222
223\membersection{wxHtmlWinParser::GetLink}\label{wxhtmlwinparsergetlink}
224
225\constfunc{const wxString\&}{GetLink}{\void}
226
227Returns actual hypertext link. (This value is non-empty string
228if the parser is between {\tt <A>} and {\tt </A>} tags,
229wxEmptyString otherwise.
230
231
232\membersection{wxHtmlWinParser::SetLink}\label{wxhtmlwinparsersetlink}
233
234\func{void}{SetLink}{\param{const wxString\& }{link}}
235
236Sets actual hypertext link. wxEmptyString means no link.
237
238\membersection{wxHtmlWinParser::CreateCurrentFont}\label{wxhtmlwinparsercreatecurrentfont}
239
240\func{virtual wxFont*}{CreateCurrentFont}{\void}
241
242Creates 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})
248and returns pointer to it.
249(If the font was already created only a pointer is returned.)
250
251Fonts created during parsing are temporary data and are not freed on DoneParser.
252You must call \helpref{delete myparser->GetTempData();}{wxhtmlparsergettempdata}
253to free the memory!
22d6efa8 254