wxhtmltaghandlerderived from include files <wx/html/htmlpars.h> see also members
wxhtmltaghandler::m_parser
wxhtmltaghandler::m_parserwxhtmlparser* 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::wxhtmltaghandlerwxhtmltaghandler() constructor.
wxhtmltaghandler::getsupportedtagsvirtual wxstring getsupportedtags() returns list of supported tags. the list is in uppercase and tags are delimited by ','. example : "i,b,font,p"
wxhtmltaghandler::handletagvirtual 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::parseinnervoid 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::setparservirtual void setparser(wxhtmlparser *parser) assigns parser to this handler. each instance of handler is guaranteed to be called only from the parser.
|