Detailed Description

This function is called when a -face font is done loading.

A specialised window type for displaying OptionLists. Context menus derive from this.

This class extends HtmlElement to include an easy to use element.video property (unavailable on mobile).

Handles elements going fullscreen.

Provides additional HtmlElement methods for managing focus.

A useful function which splits all letters in an element into their own individual elements. Great for animating each letter on its own. Similar to lettering.js.

Clones an element.

This represents a html element in the DOM.

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.HtmlElement:
PowerUI.HtmlAbbrElement PowerUI.HtmlAcronymElement PowerUI.HtmlAddressElement PowerUI.HtmlAnchorElement PowerUI.HtmlAppletElement PowerUI.HtmlAreaElement PowerUI.HtmlArticleElement PowerUI.HtmlAsideElement PowerUI.HtmlBaseElement PowerUI.HtmlBaseFontElement PowerUI.HtmlBdiElement PowerUI.HtmlBdoElement PowerUI.HtmlBgSliceElement PowerUI.HtmlBgSoundElement PowerUI.HtmlBigElement PowerUI.HtmlBlockquoteElement PowerUI.HtmlBodyElement PowerUI.HtmlBoldElement PowerUI.HtmlBrElement PowerUI.HtmlButtonElement PowerUI.HtmlCameraElement PowerUI.HtmlCanvasElement PowerUI.HtmlCaretElement PowerUI.HtmlCenterElement PowerUI.HtmlCiteElement PowerUI.HtmlCodeElement PowerUI.HtmlColgroupElement PowerUI.HtmlDataElement PowerUI.HtmlDataListElement PowerUI.HtmlDefinitionElement PowerUI.HtmlDescriptionDElement PowerUI.HtmlDescriptionLElement PowerUI.HtmlDescriptionTElement PowerUI.HtmlDetailsElement PowerUI.HtmlDialogElement PowerUI.HtmlDirElement PowerUI.HtmlDivElement PowerUI.HtmlDropdownElement PowerUI.HtmlEmbedElement PowerUI.HtmlEmElement PowerUI.HtmlFieldsetElement PowerUI.HtmlFigCaptionElement PowerUI.HtmlFigureElement PowerUI.HtmlFontElement PowerUI.HtmlFooterElement PowerUI.HtmlFormElement PowerUI.HtmlFrameElement PowerUI.HtmlFramesetElement PowerUI.HtmlH1Element PowerUI.HtmlH2Element PowerUI.HtmlH3Element PowerUI.HtmlH4Element PowerUI.HtmlH5Element PowerUI.HtmlH6Element PowerUI.HtmlHeadElement PowerUI.HtmlHeaderElement PowerUI.HtmlHGroupElement PowerUI.HtmlHRElement PowerUI.HtmlHtmlElement PowerUI.HtmlIframeElement PowerUI.HtmlImageElement PowerUI.HtmlInputElement PowerUI.HtmlIsIndexElement PowerUI.HtmlItalicElement PowerUI.HtmlKeygenElement PowerUI.HtmlLabelElement PowerUI.HtmlLegendElement PowerUI.HtmlLiElement PowerUI.HtmlLinkElement PowerUI.HtmlListingElement PowerUI.HtmlMainElement PowerUI.HtmlMapElement PowerUI.HtmlMarkElement PowerUI.HtmlMarqueeElement PowerUI.HtmlMediaElement PowerUI.HtmlMenuElement PowerUI.HtmlMenuItemElement PowerUI.HtmlMetaElement PowerUI.HtmlMeterElement PowerUI.HtmlModElement PowerUI.HtmlNavigationElement PowerUI.HtmlNoBrElement PowerUI.HtmlNoEmbedElement PowerUI.HtmlNoFramesElement PowerUI.HtmlNoScriptElement PowerUI.HtmlObjectElement PowerUI.HtmlOListElement PowerUI.HtmlOptGroupElement PowerUI.HtmlOptionElement PowerUI.HtmlOutputElement PowerUI.HtmlParagraphElement PowerUI.HtmlParamElement PowerUI.HtmlParticlesElement PowerUI.HtmlPictureElement PowerUI.HtmlPlaintextElement PowerUI.HtmlPreElement PowerUI.HtmlProgressElement PowerUI.HtmlQuoteElement PowerUI.HtmlRbElement PowerUI.HtmlResizerElement PowerUI.HtmlRPElement PowerUI.HtmlRtcElement PowerUI.HtmlRTElement PowerUI.HtmlRubyElement PowerUI.HtmlSampElement PowerUI.HtmlScriptElement PowerUI.HtmlScrollbarElement PowerUI.HtmlScrollButtonElement PowerUI.HtmlScrollThumbElement PowerUI.HtmlSectionElement PowerUI.HtmlSelectButtonElement PowerUI.HtmlSelectElement PowerUI.HtmlSElement PowerUI.HtmlSlotElement PowerUI.HtmlSmallElement PowerUI.HtmlSourceElement PowerUI.HtmlSpanElement PowerUI.HtmlStrikeElement PowerUI.HtmlStrongElement PowerUI.HtmlStyleElement PowerUI.HtmlSubElement PowerUI.HtmlSummaryElement PowerUI.HtmlSupElement PowerUI.HtmlTableCaptionElement PowerUI.HtmlTableCellElement PowerUI.HtmlTableColumnElement PowerUI.HtmlTableElement PowerUI.HtmlTableRowElement PowerUI.HtmlTableSectionElement PowerUI.HtmlTemplateElement PowerUI.HtmlTextareaElement PowerUI.HtmlTimeElement PowerUI.HtmlTitleElement PowerUI.HtmlTrackElement PowerUI.HtmlTtElement PowerUI.HtmlUElement PowerUI.HtmlUListElement PowerUI.HtmlUnknownElement PowerUI.HtmlVarElement PowerUI.HtmlWbrElement PowerUI.HtmlXmpElement

Public Member Functions

virtual void OnClickEvent (MouseEvent clickEvent)
 Called when a 'click' (down and up on the same element) occurs. More...
 
bool IsMousedOver ()
 True if the mouse is over this element. More...
 
bool WasPressed ()
 Was the mouse clicked on this element during the last mouse down? More...
 
void click ()
 Clicks this element (mousedown and a mouseup). More...
 
void FontLoaded (DynamicFont font)
 Called when a -face font is done loading. More...
 
BoxRegion getBoundingClientRect ()
 The union of all client rects. More...
 
LayoutBox[] getClientRects ()
 This elements client rects. More...
 
object Run (string attribute, params object[] args)
 Runs a nitro function whos name is held in the given attribute. More...
 
object RunLiteral (string attribute, object[] args)
 Runs a nitro function whos name is held in the given attribute with a fixed block of arguments. More...
 
HtmlDocument ResolveTarget ()
 Resolves the target attribute to a document. More...
 
HtmlDocument ResolveTarget (string target)
 Resolves the given target to a document. More...
 
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 OnRemovedFromDOM ()
 Called when the host element is removed from the DOM. More...
 
virtual void OnResetVariable (string name)
 Called when the named variable variable () values must have its content reloaded. More...
 
virtual void OnComputeBox (Renderman renderer, Css.LayoutBox box, ref bool widthUndefined, ref bool heightUndefined)
 Called during the box compute process. Useful if your element has clever dimensions, such as the img tag or words. More...
 
virtual void OnRender (Renderman renderer)
 Called during a global layout event on all elements. More...
 
virtual KeyboardMode OnShowMobileKeyboard ()
 Called when PowerUI attempts to display the mobile keyboard (only called on mobile platforms). 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...
 
 HtmlElement ()
 
virtual void OnLoadEvent (Dom.Event e)
 Called by some tags when their content is loaded. E.g. img tag or iframe. More...
 
virtual void GetWidthBounds (out float min, out float max)
 Part of shrink-to-fit. Computes the maximum and minimum possible width for an element. More...
 
void focus ()
 Focuses this element so it receives events such as keypresses. More...
 
void blur ()
 Unfocuses this element. More...
 
virtual void OnWheelEvent (WheelEvent e)
 Called when a default scrollwheel event occurs (focused element). More...
 
virtual void OnKeyPress (KeyboardEvent pressEvent)
 Called when a default key press occurs. More...
 
Element querySelector (string selector)
 Gets the first element which matches the given selector. More...
 
HTMLCollection querySelectorAll (string selector)
 Gets all child elements with the given tag. More...
 
HTMLCollection querySelectorAll (string selector, bool one)
 Gets all child elements with the given tag. More...
 
void querySelectorAll (Selector[] selectors, INodeList results, CssEvent e, bool one)
 Gets all child elements with the given tag. More...
 
void WentOffScreen ()
 Called when this element goes offscreen. More...
 
void appendChild (string html)
 Appends the given element defined as text. More...
 
void replaceWith (string html)
 Replaces this element with the given html. More...
 
void scrollBy (float x, float y)
 Scrolls the element by the given values. More...
 
void scrollTo (float x, float y)
 Scrolls the element to the given exact values. More...
 
void RequireLayout ()
 Forces a layout to occur if one is required. You should almost never need to call this directly - it's only needed if you want to read the fully computed size of an element immediately after having updated its style. More...
 
void SetImage (ImageFormat value)
 Sets the given image as the background of this element. More...
 
UIAnimation animate (string css, float duration, string cssTimeFunction)
 Animates css properties on this element. More...
 
UIAnimation animate (string css, float duration)
 Animates css properties on this element. More...
 
UIAnimation animate (string css, float duration, Blaze.VectorPath timeFunction)
 Animates css properties on this element. More...
 
UIAnimation animate (string css, float constantSpeedTime, float timeToAccelAndDecel)
 Animates css properties on this element. More...
 
UIAnimation animate (string css, float constantSpeedTime, float timeToAccelerate, float timeToDecelerate)
 Animates css properties on this element. More...
 
Css.ComputedStyle getComputedStyle ()
 Gives the values of all the CSS properties of an element after applying the active stylesheets and resolving any basic computation those values may contain. More...
 
Css.ComputedStyle getComputedStyle (string pseudo)
 Gives the values of all the CSS properties of an element after applying the active stylesheets and resolving any basic computation those values may contain. More...
 
override Node cloneNode (bool deep)
 Clones this element. More...
 
void Lettering ()
 
HtmlElement GetFocusableAbove ()
 Gets the nearest focusable element above this. More...
 
HtmlElement GetFocusableBelow ()
 Gets the nearest focusable element below this. More...
 
HtmlElement GetFocusableLeft ()
 Gets the nearest focusable element left of this. More...
 
HtmlElement GetFocusableRight ()
 Gets the nearest focusable element right of this. More...
 
HtmlElement GetFocusedNext ()
 Used for tab focus. Gets the next available focusable element. More...
 
Vector2 AxisDistanceFrom (float x, float y)
 Finds out the distance in pixels on the x and y axis the given point is away from this elements midpoint. More...
 
float DistanceFromFast (float x, float y)
 Gets a relative 2D distance of this elements midpoint from the given point. The value returned is a fast distance used for comparison only. Use DistanceFrom for the correct distance. More...
 
float DistanceFrom (float x, float y)
 Gets the 2D distance of this elements midpoint from the given point. More...
 
bool IsLeftOf (float x)
 Checks if this element is to the left of the given point. More...
 
bool IsRightOf (float x)
 Checks if this element is to the right of the given point. More...
 
bool IsAbove (float y)
 Checks if this element is above the given point. More...
 
bool IsBelow (float y)
 Checks if this element is below the given point. More...
 
bool SearchTabIndexBefore (int search, ref int bestSoFar, ref HtmlElement best)
 Searches for the closest tab index either after this element. E.g. if search is 1, it will look for the nearest element after this element with a tab index of 1 or more. BestSoFar is the closest tabIndex found (if any). An actual match results in this function halting and returning true. More...
 
bool SearchTabIndexAfter (int search, ref int bestSoFar, ref HtmlElement best)
 Searches for the closest tab index either after this element. E.g. if search is 1, it will look for the nearest element after this element with a tab index of 1 or more. BestSoFar is the closest tabIndex found (if any). An actual match results in this function halting and returning true. More...
 
bool SearchChildTabIndex (int search, ref int bestSoFar, ref HtmlElement best)
 Searches for the closest tab index to the given one. Returns true if it gets a match. More...
 
void requestFullscreen ()
 Requests this element (e.g. a video) to go fullscreen. More...
 
virtual string toDataURL (string mime)
 Gets canvas data (png only). If you want it as a byte[], use context.pngData instead. More...
 
virtual CanvasContext getContext (string text)
 Gets a rendering context for this canvas (if it is a canvas element!). More...
 
virtual void OnFormReset ()
 Called when the parent form is reset. More...
 
virtual void submit ()
 Submits the form this element is in. More...
 
void stop ()
 Stops the video. More...
 
void pause ()
 Pauses the video. More...
 
void play ()
 Plays the video. More...
 
void playAudio ()
 
void stopAudio ()
 
void removeAudio ()
 
void playAudio (GameObject parent)
 

Public Attributes

bool IsFocusable
 True if this tag is focusable. More...
 
ElementStyle Style
 Internal use only. The style of this element. Use PowerUI.HtmlElement.style instead. More...
 
NodeList KidsToRender
 Internal use only. Children being rendered are set here. This allows multiple threads to access the DOM. More...
 
object Data
 A custom data object for whatever you would like to pass through for e.g. callbacks. More...
 

Protected Member Functions

override bool HandleLocalEvent (Dom.Event e, bool bubblePhase)
 Runs the given function held in the named attribute (e.g. onkeydown) and checks if that function blocked the event. In the case of a blocked event, no default action should occur. Note that this is called by dispatchEvent and the attribute functions run before handlers do (same as Firefox). More...
 

Package Functions

virtual void OnFocusEvent (FocusEvent fe)
 Called when this element comes into focus. More...
 
virtual void OnBlurEvent (FocusEvent fe)
 Called when this element becomes unfocused. More...
 
override void ResetVariable (string name)
 
override void ResetAllVariables ()
 Requests all child elements to reload their if they have any. More...
 
override void ChangedDOM ()
 Called when the DOM changed. More...
 
override void AddedToDOM ()
 Called when this element got added to the DOM. More...
 
override void RemovedFromDOM ()
 Called when this element got removed from the DOM. More...
 

Static Package Attributes

static Node CachedFullscreenParent
 The original FS parent node. More...
 
static string CachedFullscreenStyle
 The original style of the FS element. More...
 

Properties

ComputedStyle ComputedStyle [get]
 This nodes computed style. More...
 
RenderableData RenderData [get]
 This nodes render data. More...
 
string contentEditable [get, set]
 An enumerated version of the contenteditable attribute. More...
 
bool isContentEditable [get, set]
 Is this element content editable? More...
 
bool HasBackground [get]
 True if this element has some form of background applied to it. More...
 
virtual bool IsFormResettable [get]
 Does this element get reset with the form? More...
 
virtual bool IsFormSubmittable [get]
 Does this element get submitted with the form? More...
 
virtual bool IsFormListed [get]
 Does this element list in form.elements? More...
 
virtual bool IsFormLabelable [get]
 Can this element have a label? More...
 
HtmlDocument contentDocument [get]
 Applies to iframes. The document contained in the iframe itself. More...
 
int scrollLeft [get, set]
 The amount of pixels the content of this element is scrolled horizontally. More...
 
int scrollTop [get, set]
 The amount of pixels the content of this element is scrolled vertically. More...
 
int contentHeight [get]
 The height of the content inside this element. More...
 
int contentWidth [get]
 The width of the content inside this element. More...
 
int pixelHeight [get]
 The height of this element. More...
 
int pixelWidth [get]
 The width of this element. More...
 
long offsetHeight [get]
 The height of this element. More...
 
long offsetWidth [get]
 The width of this element. More...
 
Element offsetParent [get]
 The parent that offsetTop and offsetLeft are relative to. More...
 
long offsetTop [get]
 The top offset relative to the offsetParent. More...
 
long offsetLeft [get]
 The left offset relative to the offsetParent. More...
 
int clientTop [get]
 The width of the top border of an element in pixels. More...
 
int clientLeft [get]
 The width of the left border of an element in pixels. More...
 
int clientWidth [get]
 The inner width of this element, (minus scrollbars). More...
 
int clientHeight [get]
 The inner height of this element, (minus scrollbars). More...
 
int scrollHeight [get]
 The height of this element without margins or borders. More...
 
int scrollWidth [get]
 The width of this element without margins or borders. More...
 
virtual bool Checked [get, set]
 
Dictionary< string, string > attributes [get]
 The attributes of this element (DOM spec compliant mapping for Properties). More...
 
GameObject rootGameObject [get]
 The gameObject that this element is ultimately parented to. More...
 
WorldUI worldUI [get]
 The world UI this element belongs to. More...
 
Texture image [get, set]
 Gets or sets the image from the background of this element. More...
 
bool focused [get, set]
 Gets or sets if this element is focused. More...
 
int tabIndex [get, set]
 This elements tab index. More...
 
Css.ComputedStyle computedStyle [get]
 Gets the computed style of this element. More...
 
override Css.ElementStyle style [get]
 Gets the style of this element. More...
 
bool focusable [get]
 True if this element is focusable. More...
 
HtmlElement childFocusable [get]
 The next focusable child element. Entirely ignores tab index. More...
 
HtmlFormElement formElement [get]
 Scans up the DOM to find the parent form element. Note: PowerUI.HtmlElement.form may be more useful than the element iself. More...
 
HtmlFormElement form [get]
 Scans up the DOM to find the parent form element's handler. The object returned provides useful methods such as PowerUI.HtmlFormElement.submit. More...
 
virtual string value [get, set]
 Gets or sets the value of this element. Input/Select/Textarea elements only. More...
 
virtual string htmlValue [get, set]
 Gets or sets the value as html for this element. Input/Select elements only. More...
 
int selectedIndex [get, set]
 Updates the current selected element in a dropdown menu. More...
 
HtmlVideoElement videoElement [get]
 Gets this element as a video element. More...
 
virtual MovieTexture video [get]
 The source movie texture. More...
 
bool playing [get]
 Is the video playing? More...
 
bool paused [get]
 Is the video paused? More...
 
AudioClip audioTrack [get]
 Gets the audio track of the video. More...
 
Windows.Window sparkWindow [get]
 Gets the spark window that holds this element. More...
 

Private Member Functions

void Unfocus (FocusEvent fe)
 Unfocuses this element so it will no longer receive events like keypresses. More...
 
HtmlElement GetFocusableOverride (string direction)
 Checks if this element defines a specific focusable element by id in the given direction. E.g. its defined focus-right, focus-left, focus-up, focus-down. More...
 
bool SearchTabIndexRelativeTo (HtmlElement relativeTo, bool active, int search, ref int bestSoFar, ref HtmlElement best)
 Searches for the closest tab index either before or after the given relative element. Note that relative is expected to be a child of this element. More...
 

Constructor & Destructor Documentation

PowerUI.HtmlElement.HtmlElement ( )
inline

Member Function Documentation

override void PowerUI.HtmlElement.AddedToDOM ( )
inlinepackage

Called when this element got added to the DOM.

UIAnimation PowerUI.HtmlElement.animate ( string  css,
float  duration,
string  cssTimeFunction 
)
inline

Animates css properties on this element.

Parameters
cssA set of target css properties, e.g. "rotate-x:45deg;scale-y:110%;".
durationThe time, in seconds, to take animating the properties.
cssTimeFunctionThe timing function (CSS). Can be anything that's valid CSS; e.g. "steps(3)" or "ease". Note that "ease" is the default in CSS.
Returns
An animation instance which can be used to track progress.
UIAnimation PowerUI.HtmlElement.animate ( string  css,
float  duration 
)
inline

Animates css properties on this element.

Parameters
cssA set of target css properties, e.g. "rotate-x:45deg;scale-y:110%;".
durationThe time, in seconds, to take animating the properties.
Returns
An animation instance which can be used to track progress.
UIAnimation PowerUI.HtmlElement.animate ( string  css,
float  duration,
Blaze.VectorPath  timeFunction 
)
inline

Animates css properties on this element.

Parameters
cssA set of target css properties, e.g. "rotate-x:45deg;scale-y:110%;".
durationThe time, in seconds, to take animating the properties.
timeFunctionA (0,0) to (1,1) graph which describes the timing function. Linear is the default.
Returns
An animation instance which can be used to track progress.
UIAnimation PowerUI.HtmlElement.animate ( string  css,
float  constantSpeedTime,
float  timeToAccelAndDecel 
)
inline

Animates css properties on this element.

Parameters
cssA set of target css properties, e.g. "rotate-x:45deg;scale-y:110%;".
constantSpeedTimeThe time, in seconds, to take animating the properties at a constant speed.
timeToAccelAndDecelThe time, in seconds, to take accelerating and decelerating.
Returns
An animation instance which can be used to track progress.
UIAnimation PowerUI.HtmlElement.animate ( string  css,
float  constantSpeedTime,
float  timeToAccelerate,
float  timeToDecelerate 
)
inline

Animates css properties on this element.

Parameters
cssA set of target css properties, e.g. "rotate-x:45deg;scale-y:110%;".
constantSpeedTimeThe time, in seconds, to take animating the properties at a constant speed.
timeToAccelerateThe time, in seconds, to take accelerating.
timeToDecelerateThe time, in seconds, to take decelerating.
Returns
An animation instance which can be used to track progress.
void PowerUI.HtmlElement.appendChild ( string  html)
inline

Appends the given element defined as text.

Parameters
htmlThe html to append, e.g. "<div id='someNewElement'></div>".
Returns
The newly created element.
Vector2 PowerUI.HtmlElement.AxisDistanceFrom ( float  x,
float  y 
)
inline

Finds out the distance in pixels on the x and y axis the given point is away from this elements midpoint.

Parameters
xThe x coordinate to check from.
yThe y coordinate to check from.
Returns
The distance on each axis from the given point as a vector.
void PowerUI.HtmlElement.blur ( )
inline

Unfocuses this element.

override void PowerUI.HtmlElement.ChangedDOM ( )
inlinepackage

Called when the DOM changed.

void PowerUI.HtmlElement.click ( )
inline

Clicks this element (mousedown and a mouseup).

override Node PowerUI.HtmlElement.cloneNode ( bool  deep)
inline

Clones this element.

float PowerUI.HtmlElement.DistanceFrom ( float  x,
float  y 
)
inline

Gets the 2D distance of this elements midpoint from the given point.

Parameters
xThe x coordinate to check from.
yThe y coordinate to check from.
float PowerUI.HtmlElement.DistanceFromFast ( float  x,
float  y 
)
inline

Gets a relative 2D distance of this elements midpoint from the given point. The value returned is a fast distance used for comparison only. Use DistanceFrom for the correct distance.

Parameters
xThe x coordinate to check from.
yThe y coordinate to check from.
void PowerUI.HtmlElement.focus ( )
inline

Focuses this element so it receives events such as keypresses.

void PowerUI.HtmlElement.FontLoaded ( DynamicFont  font)
inline

Called when a -face font is done loading.

BoxRegion PowerUI.HtmlElement.getBoundingClientRect ( )
inline

The union of all client rects.

LayoutBox [] PowerUI.HtmlElement.getClientRects ( )
inline

This elements client rects.

Css.ComputedStyle PowerUI.HtmlElement.getComputedStyle ( )
inline

Gives the values of all the CSS properties of an element after applying the active stylesheets and resolving any basic computation those values may contain.

Returns
The style declaration describing the element.
Css.ComputedStyle PowerUI.HtmlElement.getComputedStyle ( string  pseudo)
inline

Gives the values of all the CSS properties of an element after applying the active stylesheets and resolving any basic computation those values may contain.

Parameters
pseudoThe optional pseudo selector to use.
Returns
The style declaration describing the element.
virtual CanvasContext PowerUI.HtmlElement.getContext ( string  text)
inlinevirtual

Gets a rendering context for this canvas (if it is a canvas element!).

Parameters
textThe context type e.g. "2D".

Reimplemented in PowerUI.HtmlCanvasElement.

HtmlElement PowerUI.HtmlElement.GetFocusableAbove ( )
inline

Gets the nearest focusable element above this.

Returns
The nearest focusable element above. Null if there is none.
HtmlElement PowerUI.HtmlElement.GetFocusableBelow ( )
inline

Gets the nearest focusable element below this.

Returns
The nearest focusable element below. Null if there is none.
HtmlElement PowerUI.HtmlElement.GetFocusableLeft ( )
inline

Gets the nearest focusable element left of this.

Returns
The nearest focusable element to the left. Null if there is none.
HtmlElement PowerUI.HtmlElement.GetFocusableOverride ( string  direction)
inlineprivate

Checks if this element defines a specific focusable element by id in the given direction. E.g. its defined focus-right, focus-left, focus-up, focus-down.

Parameters
directionThe direction to look for an override in.
Returns
The overriding element, if found. Null otherwise.
HtmlElement PowerUI.HtmlElement.GetFocusableRight ( )
inline

Gets the nearest focusable element right of this.

Returns
The nearest focusable element to the right. Null if there is none.
HtmlElement PowerUI.HtmlElement.GetFocusedNext ( )
inline

Used for tab focus. Gets the next available focusable element.

Returns
The next available focusable element. Null if there is none.
virtual void PowerUI.HtmlElement.GetWidthBounds ( out float  min,
out float  max 
)
inlinevirtual

Part of shrink-to-fit. Computes the maximum and minimum possible width for an element.

Reimplemented in PowerUI.HtmlImageElement.

override bool PowerUI.HtmlElement.HandleLocalEvent ( Dom.Event  e,
bool  bubblePhase 
)
inlineprotected

Runs the given function held in the named attribute (e.g. onkeydown) and checks if that function blocked the event. In the case of a blocked event, no default action should occur. Note that this is called by dispatchEvent and the attribute functions run before handlers do (same as Firefox).

Parameters
eA standard DOM Event containing e.g. key/mouse information.
bool PowerUI.HtmlElement.IsAbove ( float  y)
inline

Checks if this element is above the given point.

Returns
True if this element is above the given point.
bool PowerUI.HtmlElement.IsBelow ( float  y)
inline

Checks if this element is below the given point.

Returns
True if this element is below the given point.
bool PowerUI.HtmlElement.IsLeftOf ( float  x)
inline

Checks if this element is to the left of the given point.

Returns
True if this element is to the left of the given point.
bool PowerUI.HtmlElement.IsMousedOver ( )
inline

True if the mouse is over this element.

bool PowerUI.HtmlElement.IsRightOf ( float  x)
inline

Checks if this element is to the right of the given point.

Returns
True if this element is to the right of the given point.
virtual bool PowerUI.HtmlElement.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.
void PowerUI.HtmlElement.Lettering ( )
inline
override bool PowerUI.HtmlElement.OnAttributeChange ( string  property)
inline

Called when an attribute of the element was changed. Returns true if the method handled the change to prevent unnecessary checks.

virtual void PowerUI.HtmlElement.OnBlurEvent ( FocusEvent  fe)
inlinepackagevirtual

Called when this element becomes unfocused.

Reimplemented in PowerUI.HtmlInputElement, PowerUI.HtmlSelectElement, and PowerUI.HtmlTextareaElement.

virtual void PowerUI.HtmlElement.OnClickEvent ( MouseEvent  clickEvent)
inlinevirtual

Called when a 'click' (down and up on the same element) occurs.

Parameters
clickEventThe event that represents the click.
Returns
True if it accepted the click.

Reimplemented in PowerUI.HtmlInputElement, PowerUI.HtmlTextareaElement, PowerUI.HtmlAnchorElement, PowerUI.HtmlAreaElement, PowerUI.HtmlButtonElement, PowerUI.HtmlLabelElement, and PowerUI.HtmlSummaryElement.

virtual void PowerUI.HtmlElement.OnComputeBox ( Renderman  renderer,
Css.LayoutBox  box,
ref bool  widthUndefined,
ref bool  heightUndefined 
)
inlinevirtual

Called during the box compute process. Useful if your element has clever dimensions, such as the img tag or words.

Reimplemented in PowerUI.HtmlImageElement, PowerUI.HtmlIframeElement, PowerUI.HtmlCaretElement, PowerUI.HtmlCanvasElement, PowerUI.HtmlBrElement, and PowerUI.HtmlScrollThumbElement.

virtual void PowerUI.HtmlElement.OnFocusEvent ( FocusEvent  fe)
inlinepackagevirtual

Called when this element comes into focus.

Reimplemented in PowerUI.HtmlInputElement, and PowerUI.HtmlTextareaElement.

virtual void PowerUI.HtmlElement.OnFormReset ( )
inlinevirtual

Called when the parent form is reset.

Reimplemented in PowerUI.HtmlSelectElement, PowerUI.HtmlInputElement, PowerUI.HtmlTextareaElement, and PowerUI.HtmlOutputElement.

virtual void PowerUI.HtmlElement.OnKeyPress ( KeyboardEvent  pressEvent)
inlinevirtual

Called when a default key press occurs.

Parameters
clickEventThe event that represents the key press.

Reimplemented in PowerUI.HtmlInputElement, and PowerUI.HtmlTextareaElement.

virtual void PowerUI.HtmlElement.OnLoadEvent ( Dom.Event  e)
inlinevirtual

Called by some tags when their content is loaded. E.g. img tag or iframe.

Parameters
eThe load event.

Reimplemented in PowerUI.HtmlImageElement.

virtual void PowerUI.HtmlElement.OnRemovedFromDOM ( )
inlinevirtual

Called when the host element is removed from the DOM.

Reimplemented in PowerUI.HtmlMarqueeElement.

virtual void PowerUI.HtmlElement.OnRender ( Renderman  renderer)
inlinevirtual

Called during a global layout event on all elements.

Reimplemented in PowerUI.HtmlCameraElement, PowerUI.HtmlParticlesElement, and PowerUI.HtmlScrollThumbElement.

virtual void PowerUI.HtmlElement.OnResetAllVariables ( )
inlinevirtual

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

Reimplemented in PowerUI.HtmlSelectElement.

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

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

virtual KeyboardMode PowerUI.HtmlElement.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.HtmlInputElement, and PowerUI.HtmlTextareaElement.

virtual void PowerUI.HtmlElement.OnWheelEvent ( WheelEvent  e)
inlinevirtual

Called when a default scrollwheel event occurs (focused element).

Parameters
clickEventThe event that represents the wheel scroll.
void PowerUI.HtmlElement.pause ( )
inline

Pauses the video.

void PowerUI.HtmlElement.play ( )
inline

Plays the video.

void PowerUI.HtmlElement.playAudio ( )
inline
void PowerUI.HtmlElement.playAudio ( GameObject  parent)
inline
Element PowerUI.HtmlElement.querySelector ( string  selector)
inline

Gets the first element which matches the given selector.

HTMLCollection PowerUI.HtmlElement.querySelectorAll ( string  selector)
inline

Gets all child elements with the given tag.

Parameters
selectorThe selector string to match.
Returns
The set of all tags with this tag.
HTMLCollection PowerUI.HtmlElement.querySelectorAll ( string  selector,
bool  one 
)
inline

Gets all child elements with the given tag.

Parameters
selectorThe selector string to match.
Returns
The set of all tags with this tag.
void PowerUI.HtmlElement.querySelectorAll ( Selector[]  selectors,
INodeList  results,
CssEvent  e,
bool  one 
)
inline

Gets all child elements with the given tag.

Parameters
selectorsThe selectors to match.
Returns
The set of all tags with this tag.
void PowerUI.HtmlElement.removeAudio ( )
inline
override void PowerUI.HtmlElement.RemovedFromDOM ( )
inlinepackage

Called when this element got removed from the DOM.

void PowerUI.HtmlElement.replaceWith ( string  html)
inline

Replaces this element with the given html.

void PowerUI.HtmlElement.requestFullscreen ( )
inline

Requests this element (e.g. a video) to go fullscreen.

void PowerUI.HtmlElement.RequestLayout ( )
inline

Requests the renderer handling this element to layout next update.

void PowerUI.HtmlElement.RequireLayout ( )
inline

Forces a layout to occur if one is required. You should almost never need to call this directly - it's only needed if you want to read the fully computed size of an element immediately after having updated its style.

override void PowerUI.HtmlElement.ResetAllVariables ( )
inlinepackage

Requests all child elements to reload their if they have any.

override void PowerUI.HtmlElement.ResetVariable ( string  name)
inlinepackage
HtmlDocument PowerUI.HtmlElement.ResolveTarget ( )
inline

Resolves the target attribute to a document.

HtmlDocument PowerUI.HtmlElement.ResolveTarget ( string  target)
inline

Resolves the given target to a document.

Returns
The targeted document. Null if there is no document at all and the target is essentially outside of Unity.
object PowerUI.HtmlElement.Run ( string  attribute,
params object[]  args 
)
inline

Runs a nitro function whos name is held in the given attribute.

Parameters
attributeThe name of the attribute in lowercase, e.g. "onmousedown".
argsAdditional parameters you would like to pass to your function.
Returns
The value returned by the function.
Exceptions
NullReferenceExceptionThrown if the function does not exist.
object PowerUI.HtmlElement.RunLiteral ( string  attribute,
object[]  args 
)
inline

Runs a nitro function whos name is held in the given attribute with a fixed block of arguments.

Parameters
attributeThe name of the attribute in lowercase, e.g. "onmousedown".
argsAdditional parameters you would like to pass to your function.
Returns
The value returned by the function.
Exceptions
NullReferenceExceptionThrown if the function does not exist.
void PowerUI.HtmlElement.scrollBy ( float  x,
float  y 
)
inline

Scrolls the element by the given values.

Parameters
xThe change in x pixels.
yThe change in y pixels.
void PowerUI.HtmlElement.scrollTo ( float  x,
float  y 
)
inline

Scrolls the element to the given exact values.

Parameters
xThe x offset in pixels.
yThe y offset in pixels.
bool PowerUI.HtmlElement.SearchChildTabIndex ( int  search,
ref int  bestSoFar,
ref HtmlElement  best 
)
inline

Searches for the closest tab index to the given one. Returns true if it gets a match.

bool PowerUI.HtmlElement.SearchTabIndexAfter ( int  search,
ref int  bestSoFar,
ref HtmlElement  best 
)
inline

Searches for the closest tab index either after this element. E.g. if search is 1, it will look for the nearest element after this element with a tab index of 1 or more. BestSoFar is the closest tabIndex found (if any). An actual match results in this function halting and returning true.

bool PowerUI.HtmlElement.SearchTabIndexBefore ( int  search,
ref int  bestSoFar,
ref HtmlElement  best 
)
inline

Searches for the closest tab index either after this element. E.g. if search is 1, it will look for the nearest element after this element with a tab index of 1 or more. BestSoFar is the closest tabIndex found (if any). An actual match results in this function halting and returning true.

bool PowerUI.HtmlElement.SearchTabIndexRelativeTo ( HtmlElement  relativeTo,
bool  active,
int  search,
ref int  bestSoFar,
ref HtmlElement  best 
)
inlineprivate

Searches for the closest tab index either before or after the given relative element. Note that relative is expected to be a child of this element.

Parameters
activeTrue if you want to search before; false for after.
void PowerUI.HtmlElement.SetImage ( ImageFormat  value)
inline

Sets the given image as the background of this element.

void PowerUI.HtmlElement.stop ( )
inline

Stops the video.

void PowerUI.HtmlElement.stopAudio ( )
inline
virtual void PowerUI.HtmlElement.submit ( )
inlinevirtual

Submits the form this element is in.

Reimplemented in PowerUI.HtmlFormElement.

virtual string PowerUI.HtmlElement.toDataURL ( string  mime)
inlinevirtual

Gets canvas data (png only). If you want it as a byte[], use context.pngData instead.

Reimplemented in PowerUI.HtmlCanvasElement.

void PowerUI.HtmlElement.Unfocus ( FocusEvent  fe)
inlineprivate

Unfocuses this element so it will no longer receive events like keypresses.

bool PowerUI.HtmlElement.WasPressed ( )
inline

Was the mouse clicked on this element during the last mouse down?

void PowerUI.HtmlElement.WentOffScreen ( )
inline

Called when this element goes offscreen.

Member Data Documentation

Node PowerUI.HtmlElement.CachedFullscreenParent
staticpackage

The original FS parent node.

string PowerUI.HtmlElement.CachedFullscreenStyle
staticpackage

The original style of the FS element.

object PowerUI.HtmlElement.Data

A custom data object for whatever you would like to pass through for e.g. callbacks.

bool PowerUI.HtmlElement.IsFocusable

True if this tag is focusable.

NodeList PowerUI.HtmlElement.KidsToRender

Internal use only. Children being rendered are set here. This allows multiple threads to access the DOM.

ElementStyle PowerUI.HtmlElement.Style

Internal use only. The style of this element. Use PowerUI.HtmlElement.style instead.

Property Documentation

Dictionary<string,string> PowerUI.HtmlElement.attributes
get

The attributes of this element (DOM spec compliant mapping for Properties).

AudioClip PowerUI.HtmlElement.audioTrack
get

Gets the audio track of the video.

virtual bool PowerUI.HtmlElement.Checked
getset
HtmlElement PowerUI.HtmlElement.childFocusable
get

The next focusable child element. Entirely ignores tab index.

int PowerUI.HtmlElement.clientHeight
get

The inner height of this element, (minus scrollbars).

int PowerUI.HtmlElement.clientLeft
get

The width of the left border of an element in pixels.

int PowerUI.HtmlElement.clientTop
get

The width of the top border of an element in pixels.

int PowerUI.HtmlElement.clientWidth
get

The inner width of this element, (minus scrollbars).

ComputedStyle PowerUI.HtmlElement.ComputedStyle
get

This nodes computed style.

Css.ComputedStyle PowerUI.HtmlElement.computedStyle
get

Gets the computed style of this element.

HtmlDocument PowerUI.HtmlElement.contentDocument
get

Applies to iframes. The document contained in the iframe itself.

string PowerUI.HtmlElement.contentEditable
getset

An enumerated version of the contenteditable attribute.

int PowerUI.HtmlElement.contentHeight
get

The height of the content inside this element.

int PowerUI.HtmlElement.contentWidth
get

The width of the content inside this element.

bool PowerUI.HtmlElement.focusable
get

True if this element is focusable.

bool PowerUI.HtmlElement.focused
getset

Gets or sets if this element is focused.

HtmlFormElement PowerUI.HtmlElement.form
get

Scans up the DOM to find the parent form element's handler. The object returned provides useful methods such as PowerUI.HtmlFormElement.submit.

HtmlFormElement PowerUI.HtmlElement.formElement
get

Scans up the DOM to find the parent form element. Note: PowerUI.HtmlElement.form may be more useful than the element iself.

bool PowerUI.HtmlElement.HasBackground
get

True if this element has some form of background applied to it.

virtual string PowerUI.HtmlElement.htmlValue
getset

Gets or sets the value as html for this element. Input/Select elements only.

Texture PowerUI.HtmlElement.image
getset

Gets or sets the image from the background of this element.

bool PowerUI.HtmlElement.isContentEditable
getset

Is this element content editable?

virtual bool PowerUI.HtmlElement.IsFormLabelable
getpackage

Can this element have a label?

virtual bool PowerUI.HtmlElement.IsFormListed
getpackage

Does this element list in form.elements?

virtual bool PowerUI.HtmlElement.IsFormResettable
getpackage

Does this element get reset with the form?

virtual bool PowerUI.HtmlElement.IsFormSubmittable
getpackage

Does this element get submitted with the form?

long PowerUI.HtmlElement.offsetHeight
get

The height of this element.

long PowerUI.HtmlElement.offsetLeft
get

The left offset relative to the offsetParent.

Element PowerUI.HtmlElement.offsetParent
get

The parent that offsetTop and offsetLeft are relative to.

long PowerUI.HtmlElement.offsetTop
get

The top offset relative to the offsetParent.

long PowerUI.HtmlElement.offsetWidth
get

The width of this element.

bool PowerUI.HtmlElement.paused
get

Is the video paused?

int PowerUI.HtmlElement.pixelHeight
get

The height of this element.

int PowerUI.HtmlElement.pixelWidth
get

The width of this element.

bool PowerUI.HtmlElement.playing
get

Is the video playing?

RenderableData PowerUI.HtmlElement.RenderData
get

This nodes render data.

GameObject PowerUI.HtmlElement.rootGameObject
get

The gameObject that this element is ultimately parented to.

int PowerUI.HtmlElement.scrollHeight
get

The height of this element without margins or borders.

int PowerUI.HtmlElement.scrollLeft
getset

The amount of pixels the content of this element is scrolled horizontally.

int PowerUI.HtmlElement.scrollTop
getset

The amount of pixels the content of this element is scrolled vertically.

int PowerUI.HtmlElement.scrollWidth
get

The width of this element without margins or borders.

int PowerUI.HtmlElement.selectedIndex
getset

Updates the current selected element in a dropdown menu.

Windows.Window PowerUI.HtmlElement.sparkWindow
get

Gets the spark window that holds this element.

override Css.ElementStyle PowerUI.HtmlElement.style
get

Gets the style of this element.

int PowerUI.HtmlElement.tabIndex
getset

This elements tab index.

virtual string PowerUI.HtmlElement.value
getset

Gets or sets the value of this element. Input/Select/Textarea elements only.

virtual MovieTexture PowerUI.HtmlElement.video
get

The source movie texture.

HtmlVideoElement PowerUI.HtmlElement.videoElement
get

Gets this element as a video element.

WorldUI PowerUI.HtmlElement.worldUI
get

The world UI this element belongs to.