Version: 2.9.4
Public Member Functions | Protected Member Functions | Protected Attributes
wxHtmlTagHandler Class Reference

#include </home/zeitlin/src/wx/github/interface/wx/html/htmlpars.h>

Inheritance diagram for wxHtmlTagHandler:

Detailed Description

Todo:
describe me

Library:  wxHTML
Category:  HTML
参照:
Tag Handlers, wxHtmlTag

Public Member Functions

 wxHtmlTagHandler ()
 Constructor.
virtual wxString GetSupportedTags ()=0
 Returns list of supported tags.
virtual bool HandleTag (const wxHtmlTag &tag)=0
 This is the core method of each handler.
virtual void SetParser (wxHtmlParser *parser)
 Assigns parser to this handler.

Protected Member Functions

void ParseInner (const wxHtmlTag &tag)
 This method calls parser's wxHtmlParser::DoParsing method for the string between this tag and the paired ending tag:

Protected Attributes

wxHtmlParserm_Parser
 This attribute is used to access parent parser.

List of all members.


Constructor & Destructor Documentation

wxHtmlTagHandler::wxHtmlTagHandler ( )

Constructor.


Member Function Documentation

virtual wxString wxHtmlTagHandler::GetSupportedTags ( ) [pure virtual]

Returns list of supported tags.

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

virtual bool wxHtmlTagHandler::HandleTag ( const wxHtmlTag tag) [pure virtual]

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).

例:

        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.

Returns:
true if ParseInner() was called, false otherwise.
void wxHtmlTagHandler::ParseInner ( const wxHtmlTag tag) [protected]

This method calls parser's wxHtmlParser::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 wxHtmlTagHandler::SetParser ( wxHtmlParser parser) [virtual]

Assigns parser to this handler.

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


Member Data Documentation

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.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines