]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/httaghnd.tex
Several changes and updates
[wxWidgets.git] / docs / latex / wx / httaghnd.tex
CommitLineData
704a4b75
VS
1%
2% automatically generated by HelpGen from
3% htmltaghandler.tex at 18/Mar/99 19:20:29
4%
5
704a4b75
VS
6\section{\class{wxHtmlTagHandler}}\label{wxhtmltaghandler}
7
8\wxheading{Derived from}
9
10wxObject
11
12\wxheading{See Also}
13
14\helpref{Overview}{handlers},
15\helpref{wxHtmlTag}{wxhtmltag}
16
704a4b75
VS
17\latexignore{\rtfignore{\wxheading{Members}}}
18
19\membersection{wxHtmlTagHandler::m\_Parser}\label{wxhtmltaghandlermparser}
20
21{\bf wxHtmlParser* m\_Parser}
22
23This attribute is used to access parent parser. It is protected so that
24it can't be accessed by user but can be accessed from derived classes.
25
26\membersection{wxHtmlTagHandler::wxHtmlTagHandler}\label{wxhtmltaghandlerwxhtmltaghandler}
27
28\func{}{wxHtmlTagHandler}{\void}
29
30Constructor.
31
32\membersection{wxHtmlTagHandler::SetParser}\label{wxhtmltaghandlersetparser}
33
34\func{virtual void}{SetParser}{\param{wxHtmlParser }{*parser}}
35
36Assigns {\it parser} to this handler. Each {\bf instance} of handler
37is guaranteed to be called only from the parser.
38
39\membersection{wxHtmlTagHandler::GetSupportedTags}\label{wxhtmltaghandlergetsupportedtags}
40
41\func{virtual wxString}{GetSupportedTags}{\void}
42
43Returns list of supported tags. The list is in uppercase and tags
44are delimited by ','. Example : {\tt "I,B,FONT,P" }
45
704a4b75
VS
46\membersection{wxHtmlTagHandler::HandleTag}\label{wxhtmltaghandlerhandletag}
47
48\func{virtual bool}{HandleTag}{\param{const wxHtmlTag\& }{tag}}
49
50This is the core method of each handler. It is called each time
51one of supported tags is detected. {\it tag} contains all neccessary
52info (see \helpref{wxHtmlTag}{wxhtmltag} for details).
53
54\wxheading{Return value}
55
56TRUE if \helpref{ParseInner}{wxhtmltaghandlerparseinner} was called,
57FALSE otherwise.
58
59\wxheading{Example}
60
61\begin{verbatim}
62bool MyHandler::HandleTag(const wxHtmlTag& tag)
63{
64 ...
65 // change state of parser (e.g. set bold face)
66 ParseInner(tag);
67 ...
68 // restore original state of parser
69}
70\end{verbatim}
71
72You shouldn't call ParseInner if the tag is not paired with ending one.
73
704a4b75
VS
74\membersection{wxHtmlTagHandler::ParseInner}\label{wxhtmltaghandlerparseinner}
75
76\func{void}{ParseInner}{\param{const wxHtmlTag\& }{tag}}
77
78This method calls parser's \helpref{DoParsing}{wxhtmlparserdoparsing} method
79for the string between this tag and paired ending tag:
80
81\begin{verbatim}
82...<A HREF="x.htm">Hello, world!</A>...
83\end{verbatim}
84
22d6efa8
JS
85In this example, a call to ParseInner (with {\it tag} pointing to A tag)
86will parse 'Hello, world!'.
87