PowerUI.HtmlTagHandler Class Reference

Detailed Description

A base class for all html tag types (e.g. script, a, body etc). These tag handlers tell the UI how to render and work with this type of tag. Tag handlers are stored globally for lookup and instanced per element.

Inheritance diagram for PowerUI.HtmlTagHandler:
Wrench.TagHandler 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

Public Member Functions

void RequestLayout ()
 Requests the renderer handling this element to layout next update. More...
 
virtual bool Junk ()
 Tells the parser to not include this element in the DOM. More...
 
virtual void OnResetAllVariables ()
 Called when all variable () values must have their content reloaded. More...
 
virtual void OnResetVariable (string name)
 Called when the named variable variable () values must have its content reloaded. More...
 
virtual void OnRenderPass ()
 Called during a layout event on only the focused element. More...
 
virtual void HeightChanged ()
 Called when the fixed height of this element changes. More...
 
virtual void WidthChanged ()
 Called when the width of this element changes. More...
 
virtual void OnLayout ()
 Called during a layout event on all elements. More...
 
virtual void OnFocus ()
 Called when this element comes into focus. More...
 
virtual void OnBlur ()
 Called when this element becomes unfocused. More...
 
virtual void OnLoaded (string objectLoaded)
 Called when this elements content has been loaded. Used by e.g. iframe or img. More...
 
virtual void OnKeyPress (UIEvent pressEvent)
 Called on the focused element when a key is pressed or released. More...
 
virtual void OnMouseMove (UIEvent moveEvent)
 Called on the focused element when the mouse is moved. More...
 
virtual bool OnClick (UIEvent clickEvent)
 Called when the element is clicked (or the mouse is released over it). More...
 
virtual KeyboardMode OnShowMobileKeyboard ()
 Called when PowerUI attempts to display the mobile keyboard (only called on mobile platforms). More...
 
virtual void OnChildrenLoaded ()
 Called when the elements kids are fully loaded. More...
 
override bool OnAttributeChange (string property)
 Called when an attribute of the element was changed. Returns true if the method handled the change to prevent unnecessary checks. More...
 
- Public Member Functions inherited from Wrench.TagHandler
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...
 

Public Attributes

bool IsIsolated
 True if this element is isolated from style changes by its parent (e.g. used by iframes). More...
 
Element Element
 The element this tag handler is attached to. More...
 
bool IgnoreClick
 True if the element should ignore all clicks. More...
 
bool IsFocusable
 True if this tag is focusable. More...
 
bool IgnoreSelfClick
 Set this to true if this element should ignore clicks on itself, but not its kids (e.g. html or body). More...
 
- Public Attributes inherited from Wrench.TagHandler
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 void PowerUI.HtmlTagHandler.HeightChanged ( )
inlinevirtual

Called when the fixed height of this element changes.

Reimplemented in PowerUI.CanvasTag, PowerUI.ImgTag, and PowerUI.HtmlTag.

virtual bool PowerUI.HtmlTagHandler.Junk ( )
inlinevirtual

Tells the parser to not include this element in the DOM.

Returns
True if this tag should be dumped and not enter the DOM once fully loaded.

Reimplemented in PowerUI.CommentTag.

override bool PowerUI.HtmlTagHandler.OnAttributeChange ( string  property)
inlinevirtual
virtual void PowerUI.HtmlTagHandler.OnBlur ( )
inlinevirtual

Called when this element becomes unfocused.

Reimplemented in PowerUI.InputTag, PowerUI.TextareaTag, and PowerUI.SelectTag.

virtual void PowerUI.HtmlTagHandler.OnChildrenLoaded ( )
inlinevirtual

Called when the elements kids are fully loaded.

Reimplemented in PowerUI.MarqueeTag, PowerUI.VideoTag, PowerUI.TableTag, PowerUI.TdTag, PowerUI.ThTag, PowerUI.TrTag, and PowerUI.DetailsTag.

virtual bool PowerUI.HtmlTagHandler.OnClick ( UIEvent  clickEvent)
inlinevirtual
virtual void PowerUI.HtmlTagHandler.OnFocus ( )
inlinevirtual

Called when this element comes into focus.

Reimplemented in PowerUI.InputTag, and PowerUI.TextareaTag.

virtual void PowerUI.HtmlTagHandler.OnKeyPress ( UIEvent  pressEvent)
inlinevirtual

Called on the focused element when a key is pressed or released.

Parameters
pressEventThe UIEvent describing the press; e.g. which key.

Reimplemented in PowerUI.InputTag, and PowerUI.TextareaTag.

virtual void PowerUI.HtmlTagHandler.OnLayout ( )
inlinevirtual

Called during a layout event on all elements.

Reimplemented in PowerUI.CameraTag.

virtual void PowerUI.HtmlTagHandler.OnLoaded ( string  objectLoaded)
inlinevirtual

Called when this elements content has been loaded. Used by e.g. iframe or img.

Parameters
objectLoadedThe object which has loaded. E.g. background-image or webpage.

Reimplemented in PowerUI.ImgTag.

virtual void PowerUI.HtmlTagHandler.OnMouseMove ( UIEvent  moveEvent)
inlinevirtual

Called on the focused element when the mouse is moved.

Parameters
clickEventThe UIEvent describing the click.

Reimplemented in PowerUI.SelectTag, PowerUI.HScrollTabTag, and PowerUI.VScrollTabTag.

virtual void PowerUI.HtmlTagHandler.OnRenderPass ( )
inlinevirtual

Called during a layout event on only the focused element.

Reimplemented in PowerUI.InputTag, and PowerUI.TextareaTag.

virtual void PowerUI.HtmlTagHandler.OnResetAllVariables ( )
inlinevirtual

Called when all variable () values must have their content reloaded.

Reimplemented in PowerUI.SelectTag.

virtual void PowerUI.HtmlTagHandler.OnResetVariable ( string  name)
inlinevirtual

Called when the named variable variable () values must have its content reloaded.

Reimplemented in PowerUI.SelectTag.

virtual KeyboardMode PowerUI.HtmlTagHandler.OnShowMobileKeyboard ( )
inlinevirtual

Called when PowerUI attempts to display the mobile keyboard (only called on mobile platforms).

Returns
A KeyboardType if this element wants the keyboard to show up (KeyboardType.None otherwise).

Reimplemented in PowerUI.InputTag, and PowerUI.TextareaTag.

void PowerUI.HtmlTagHandler.RequestLayout ( )
inline

Requests the renderer handling this element to layout next update.

virtual void PowerUI.HtmlTagHandler.WidthChanged ( )
inlinevirtual

Called when the width of this element changes.

Reimplemented in PowerUI.ImgTag, PowerUI.TdTag, PowerUI.ThTag, PowerUI.CanvasTag, PowerUI.TableTag, and PowerUI.HtmlTag.

Member Data Documentation

Element PowerUI.HtmlTagHandler.Element

The element this tag handler is attached to.

bool PowerUI.HtmlTagHandler.IgnoreClick

True if the element should ignore all clicks.

bool PowerUI.HtmlTagHandler.IgnoreSelfClick

Set this to true if this element should ignore clicks on itself, but not its kids (e.g. html or body).

bool PowerUI.HtmlTagHandler.IsFocusable

True if this tag is focusable.

bool PowerUI.HtmlTagHandler.IsIsolated

True if this element is isolated from style changes by its parent (e.g. used by iframes).