## wxHtmlTagHandler

Derived from

wxObject

Include files

<wx/html/htmlpars.h>

See Also

Overview, wxHtmlTag

Members

wxHtmlTagHandler::m_Parser
wxHtmlTagHandler::wxHtmlTagHandler
wxHtmlTagHandler::GetSupportedTags
wxHtmlTagHandler::HandleTag
wxHtmlTagHandler::ParseInner
wxHtmlTagHandler::SetParser

### wxHtmlTagHandler::m_Parser

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::wxHtmlTagHandler

wxHtmlTagHandler()

Constructor.

### wxHtmlTagHandler::GetSupportedTags

virtual wxString GetSupportedTags()

Returns list of supported tags. The list is in uppercase and tags are delimited by ','. Example : `"I,B,FONT,P"`

### wxHtmlTagHandler::HandleTag

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.

### wxHtmlTagHandler::ParseInner

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!'.

### wxHtmlTagHandler::SetParser

virtual void SetParser(wxHtmlParser *parser)

Assigns parser to this handler. Each instance of handler is guaranteed to be called only from the parser.