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