wxRuby Documentation Home

# Wx::HtmlTagHandler

## Derived from

Object

## See Also

Overview,
HtmlTag

## Methods

- HtmlTagHandler#m__parser
- HtmlTagHandler.new
- HtmlTagHandler#get_supported_tags
- HtmlTagHandler#handle_tag
- HtmlTagHandler#parse_inner
- HtmlTagHandler#set_parser

### HtmlTagHandler#m__parser

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

### HtmlTagHandler.new

### HtmlTagHandler#get_supported_tags

String get_supported_tags()

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

### HtmlTagHandler#handle_tag

Boolean handle_tag(%(arg-type)HtmlTag% 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 HtmlTag for details).

#### Return value

true if parse_inner was called,
false otherwise.

#### Example

bool MyHandler::HandleTag(const HtmlTag& 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.

### HtmlTagHandler#parse_inner

parse_inner(%(arg-type)HtmlTag% tag)

This method calls parser’s do_parsing method
for the string between this tag and the paired ending tag:

…Hello, world!…

In this example, a call to ParseInner (with tag pointing to A tag)
will parse ‘Hello, world!’.

### HtmlTagHandler#set_parser

set_parser(%(arg-type)HtmlParser% parser)

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

[This page automatically generated from the Textile source at 2023-06-09 00:45:35 +0000]