Derived from
Include files
<wx/html/htmlpars.h>
See Also
Members
wxHtmlTagHandler::m_Parser
wxHtmlTagHandler::wxHtmlTagHandler
wxHtmlTagHandler::GetSupportedTags
wxHtmlTagHandler::HandleTag
wxHtmlTagHandler::ParseInner
wxHtmlTagHandler::SetParser
wxHtmlParser* m_Parser
This attribute is used to access parent parser. It is protected so that it can't be accessed by user but can be accessed from derived classes.
wxHtmlTagHandler()
Constructor.
virtual wxString GetSupportedTags()
Returns list of supported tags. The list is in uppercase and tags are delimited by ','. Example : "I,B,FONT,P"
virtual bool HandleTag(const wxHtmlTag& tag)
This is the core method of each handler. It is called each time one of supported tags is detected. tag contains all necessary info (see wxHtmlTag for details).
Return value
true if ParseInner was called, false otherwise.
Example
bool MyHandler::HandleTag(const wxHtmlTag& tag) { ... // change state of parser (e.g. set bold face) ParseInner(tag); ... // restore original state of parser }You shouldn't call ParseInner if the tag is not paired with an ending one.
void ParseInner(const wxHtmlTag& tag)
This method calls parser's DoParsing method for the string between this tag and the paired ending tag:
...<A HREF="x.htm">Hello, world!</A>...In this example, a call to ParseInner (with tag pointing to A tag) will parse 'Hello, world!'.
virtual void SetParser(wxHtmlParser *parser)
Assigns parser to this handler. Each instance of handler is guaranteed to be called only from the parser.