Wrench.TagHandler Class Reference

Detailed Description

A tag handler represents methods for handling markup tags - for example a <span and="attributes">.

Inheritance diagram for Wrench.TagHandler:
PowerUI.HtmlTagHandler Wrench.LanguageTagHandler PowerUI.AbbrTag PowerUI.AcronymTag PowerUI.AddressTag PowerUI.ArticleTag PowerUI.AsideTag PowerUI.BaseTag PowerUI.BdiTag PowerUI.BdoTag PowerUI.BigTag PowerUI.BlockquoteTag PowerUI.BodyTag PowerUI.BoldTag PowerUI.BrTag PowerUI.ButtonTag PowerUI.CameraTag PowerUI.CanvasTag PowerUI.CenterTag PowerUI.CiteTag PowerUI.ClickLinkTag PowerUI.CommentTag PowerUI.DDBoxTag PowerUI.DDButtonTag PowerUI.DefinitionTag PowerUI.DelTag PowerUI.DescriptionDTag PowerUI.DescriptionLTag PowerUI.DescriptionTTag PowerUI.DetailsTag PowerUI.DirTag PowerUI.DivTag PowerUI.DoctypeTag PowerUI.EmTag PowerUI.FigCaptionTag PowerUI.FigureTag PowerUI.FontTag PowerUI.FooterTag PowerUI.FormTag PowerUI.H1Tag PowerUI.H2Tag PowerUI.H3Tag PowerUI.H4Tag PowerUI.H5Tag PowerUI.H6Tag PowerUI.HeaderTag PowerUI.HeadTag PowerUI.HRTag PowerUI.HtmlTag PowerUI.IframeTag PowerUI.ImgTag PowerUI.InputTag PowerUI.InsTag PowerUI.ItalicTag PowerUI.LabelTag PowerUI.LegendTag PowerUI.LinkTag PowerUI.LiTag PowerUI.MainTag PowerUI.MarkTag PowerUI.MarqueeTag PowerUI.MetaTag PowerUI.NavTag PowerUI.OlTag PowerUI.OptionTag PowerUI.ParagraphTag PowerUI.ParamTag PowerUI.PreTag PowerUI.RPTag PowerUI.RTTag PowerUI.RubyTag PowerUI.ScriptTag PowerUI.ScrollDownTag PowerUI.ScrollLeftTag PowerUI.ScrollRightTag PowerUI.ScrollTabTag PowerUI.ScrollUpTag PowerUI.SectionTag PowerUI.SelectTag PowerUI.SmallTag PowerUI.SourceTag PowerUI.SpanTag PowerUI.STag PowerUI.StrikeTag PowerUI.StrongTag PowerUI.StyleTag PowerUI.SubTag PowerUI.SummaryTag PowerUI.SupTag PowerUI.TableBodyTag PowerUI.TableFooterTag PowerUI.TableHeaderTag PowerUI.TableTag PowerUI.TdTag PowerUI.TextareaTag PowerUI.ThTag PowerUI.TimeTag PowerUI.TitleTag PowerUI.TrackTag PowerUI.TrTag PowerUI.UlTag PowerUI.VideoTag PowerUI.WbrTag Wrench.LanguageTag Wrench.VariableTag

Public Member Functions

virtual string[] GetTags ()
 Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more. More...
 
virtual bool SelfClosing ()
 Returns true if this tag has no kids and closes itself. For example <input type='text' />. Note that this method exists to make that final slash essentially optional. More...
 
virtual TagHandler GetInstance ()
 Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way. More...
 
virtual void OnTagLoaded ()
 Called when the tag is instanced and the element plus its attributes and kids have been fully parsed. More...
 
virtual void OnParseContent (MLLexer lexer)
 Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element. More...
 
virtual bool OnAttributeChange (string attribute)
 Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded. More...
 

Public Attributes

int Priority
 If you define a tag handler with tags which already exist, this priority allows your tag to override the existing one optionally. All system tags have a priority of zero. More...
 
string TagExtension
 This is applied to every derivative of this tag handler. This enables tags to be grouped by file they are handling. e.g. "ui" extension and tag name "div" would become "ui-div" internally. More...
 

Member Function Documentation

virtual TagHandler Wrench.TagHandler.GetInstance ( )
inlinevirtual

Makes a new instance of this tag handler. A global instance is made of this handler so this is used to generate a new instance in an efficient way.

Reimplemented in PowerUI.MarqueeTag, PowerUI.InputTag, PowerUI.TextareaTag, PowerUI.CameraTag, PowerUI.SelectTag, PowerUI.ClickLinkTag, PowerUI.ImgTag, PowerUI.LinkTag, PowerUI.ButtonTag, PowerUI.IframeTag, PowerUI.ScriptTag, PowerUI.CommentTag, PowerUI.BrTag, PowerUI.HScrollTabTag, PowerUI.TableTag, PowerUI.VScrollTabTag, PowerUI.VideoTag, PowerUI.FormTag, PowerUI.LabelTag, PowerUI.OptionTag, PowerUI.ParamTag, PowerUI.WbrTag, PowerUI.SourceTag, PowerUI.TdTag, PowerUI.ThTag, PowerUI.TrackTag, PowerUI.CanvasTag, PowerUI.DoctypeTag, PowerUI.DDButtonTag, PowerUI.StyleTag, PowerUI.SummaryTag, PowerUI.TrTag, PowerUI.DetailsTag, Wrench.LanguageTag, PowerUI.BaseTag, PowerUI.BodyTag, PowerUI.HeadTag, PowerUI.HtmlTag, PowerUI.MetaTag, PowerUI.ScrollDownTag, PowerUI.ScrollLeftTag, PowerUI.ScrollRightTag, PowerUI.ScrollUpTag, PowerUI.CodeTag, PowerUI.DDBoxTag, PowerUI.PreTag, PowerUI.SampTag, PowerUI.BdoTag, PowerUI.FontTag, Wrench.VariableTag, PowerUI.TitleTag, PowerUI.AbbrTag, PowerUI.AcronymTag, PowerUI.AddressTag, PowerUI.ArticleTag, PowerUI.AsideTag, PowerUI.BoldTag, PowerUI.BdiTag, PowerUI.BigTag, PowerUI.BlockquoteTag, PowerUI.CenterTag, PowerUI.CiteTag, PowerUI.DescriptionDTag, PowerUI.DelTag, PowerUI.DefinitionTag, PowerUI.DirTag, PowerUI.DivTag, PowerUI.DescriptionLTag, PowerUI.DescriptionTTag, PowerUI.EmTag, PowerUI.FigCaptionTag, PowerUI.FigureTag, PowerUI.FooterTag, PowerUI.H1Tag, PowerUI.H2Tag, PowerUI.H3Tag, PowerUI.H4Tag, PowerUI.H5Tag, PowerUI.H6Tag, PowerUI.HeaderTag, PowerUI.HRTag, PowerUI.ItalicTag, PowerUI.InsTag, PowerUI.LegendTag, PowerUI.LiTag, PowerUI.MainTag, PowerUI.MarkTag, PowerUI.NavTag, PowerUI.OlTag, PowerUI.ParagraphTag, PowerUI.RPTag, PowerUI.RTTag, PowerUI.RubyTag, PowerUI.STag, PowerUI.SectionTag, PowerUI.SmallTag, PowerUI.SpanTag, PowerUI.StrikeTag, PowerUI.StrongTag, PowerUI.SubTag, PowerUI.SupTag, PowerUI.TableBodyTag, PowerUI.TableFooterTag, PowerUI.TableHeaderTag, PowerUI.TimeTag, and PowerUI.UlTag.

virtual string [] Wrench.TagHandler.GetTags ( )
inlinevirtual

Returns all tags that are handled by this handler, e.g. "div" or "span". Usually there will be just one in the set but some tags may wish to have more.

Reimplemented in PowerUI.MarqueeTag, PowerUI.InputTag, PowerUI.TextareaTag, PowerUI.CameraTag, PowerUI.SelectTag, PowerUI.ClickLinkTag, PowerUI.ImgTag, PowerUI.LinkTag, PowerUI.ButtonTag, PowerUI.IframeTag, PowerUI.ScriptTag, PowerUI.CommentTag, PowerUI.TableTag, PowerUI.VideoTag, PowerUI.FormTag, PowerUI.LabelTag, PowerUI.OptionTag, PowerUI.TdTag, PowerUI.ThTag, PowerUI.CanvasTag, PowerUI.DoctypeTag, PowerUI.HScrollTabTag, PowerUI.VScrollTabTag, PowerUI.BrTag, PowerUI.StyleTag, PowerUI.ParamTag, PowerUI.SummaryTag, PowerUI.TrTag, PowerUI.DetailsTag, PowerUI.SourceTag, PowerUI.TrackTag, PowerUI.WbrTag, PowerUI.BaseTag, PowerUI.BodyTag, PowerUI.HeadTag, PowerUI.HtmlTag, PowerUI.MetaTag, PowerUI.CodeTag, PowerUI.DDBoxTag, PowerUI.DDButtonTag, PowerUI.PreTag, PowerUI.SampTag, PowerUI.BdoTag, PowerUI.FontTag, Wrench.VariableTag, PowerUI.TitleTag, Wrench.LanguageTag, PowerUI.AbbrTag, PowerUI.AcronymTag, PowerUI.AddressTag, PowerUI.ArticleTag, PowerUI.AsideTag, PowerUI.BoldTag, PowerUI.BdiTag, PowerUI.BigTag, PowerUI.BlockquoteTag, PowerUI.CenterTag, PowerUI.CiteTag, PowerUI.DescriptionDTag, PowerUI.DelTag, PowerUI.DefinitionTag, PowerUI.DirTag, PowerUI.DivTag, PowerUI.DescriptionLTag, PowerUI.DescriptionTTag, PowerUI.EmTag, PowerUI.FigCaptionTag, PowerUI.FigureTag, PowerUI.FooterTag, PowerUI.H1Tag, PowerUI.H2Tag, PowerUI.H3Tag, PowerUI.H4Tag, PowerUI.H5Tag, PowerUI.H6Tag, PowerUI.HeaderTag, PowerUI.HRTag, PowerUI.ItalicTag, PowerUI.InsTag, PowerUI.LegendTag, PowerUI.LiTag, PowerUI.MainTag, PowerUI.MarkTag, PowerUI.NavTag, PowerUI.OlTag, PowerUI.ParagraphTag, PowerUI.RPTag, PowerUI.RTTag, PowerUI.RubyTag, PowerUI.STag, PowerUI.ScrollDownTag, PowerUI.ScrollLeftTag, PowerUI.ScrollRightTag, PowerUI.ScrollUpTag, PowerUI.SectionTag, PowerUI.SmallTag, PowerUI.SpanTag, PowerUI.StrikeTag, PowerUI.StrongTag, PowerUI.SubTag, PowerUI.SupTag, PowerUI.TableBodyTag, PowerUI.TableFooterTag, PowerUI.TableHeaderTag, PowerUI.TimeTag, and PowerUI.UlTag.

virtual bool Wrench.TagHandler.OnAttributeChange ( string  attribute)
inlinevirtual

Called on an instance of this handler when an attribute on the element it's attached to changes. It's also called when the tag is being loaded.

Parameters
attributeThe attribute that changed.

Reimplemented in PowerUI.MarqueeTag, PowerUI.HtmlTagHandler, PowerUI.InputTag, PowerUI.ScriptTag, PowerUI.TdTag, PowerUI.ThTag, PowerUI.CameraTag, PowerUI.TextareaTag, PowerUI.ImgTag, PowerUI.ClickLinkTag, PowerUI.ButtonTag, PowerUI.LinkTag, PowerUI.IframeTag, PowerUI.VideoTag, PowerUI.FormTag, PowerUI.LabelTag, PowerUI.OptionTag, Wrench.VariableTag, PowerUI.BaseTag, PowerUI.BdoTag, and PowerUI.FontTag.

virtual void Wrench.TagHandler.OnParseContent ( MLLexer  lexer)
inlinevirtual

Called when the parser is reading the content of this tag for custom reading, e.g. a script/style tag. Non-self closing tags only. Anything that's not read by this method is assumed to be a child element.

Parameters
lexerThe lexer to read the content from.

Reimplemented in PowerUI.TextareaTag, Wrench.VariableTag, PowerUI.ScriptTag, PowerUI.StyleTag, and PowerUI.PreTag.

virtual void Wrench.TagHandler.OnTagLoaded ( )
inlinevirtual

Called when the tag is instanced and the element plus its attributes and kids have been fully parsed.

Reimplemented in PowerUI.InputTag, PowerUI.ScriptTag, PowerUI.IframeTag, PowerUI.SelectTag, PowerUI.OptionTag, PowerUI.BrTag, PowerUI.DDButtonTag, PowerUI.BodyTag, PowerUI.HtmlTag, PowerUI.DDBoxTag, and PowerUI.TitleTag.

virtual bool Wrench.TagHandler.SelfClosing ( )
inlinevirtual

Member Data Documentation

int Wrench.TagHandler.Priority

If you define a tag handler with tags which already exist, this priority allows your tag to override the existing one optionally. All system tags have a priority of zero.

string Wrench.TagHandler.TagExtension

This is applied to every derivative of this tag handler. This enables tags to be grouped by file they are handling. e.g. "ui" extension and tag name "div" would become "ui-div" internally.