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