Detailed Description

Represents the javascript window object.

Inheritance diagram for PowerUI.Window:

Public Member Functions

 Window ()
 Creates a new window object. More...
 
void postMessage (object message, string targetOrigin)
 Posts a message to this document. More...
 
Css.ComputedStyle getComputedStyle (HtmlElement element)
 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 (HtmlElement element, 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...
 
string escapeHTML (string html)
 Escapes the given string, essentially making any HTML it contains literal. More...
 
void alert (object value)
 Alerts the given message. More...
 
bool confirm (object request)
 Asks the user to confirm something. More...
 
string prompt (object request)
 Asks the user for some textual information. More...
 
string atob (string a)
 Converts a string to base64. More...
 
string btoa (string b)
 Converts base64 to a string. More...
 
void clearInterval (UITimer timer)
 Clears intervals. More...
 
UITimer setInterval (Nitro.DynamicMethod< Nitro.Void > method, int ms)
 Sets an interval. More...
 
UITimer setTimeout (Nitro.DynamicMethod< Nitro.Void > method, int ms)
 Sets a timeout. More...
 
Selection getSelection ()
 Creates a range. More...
 
MediaQueryList matchMedia (string mediaQuery)
 Matches the given CSS media string. More...
 

Public Attributes

Window top
 The very top window for this UI. More...
 
Window self
 Represents 'this' object. Provided for javascript compatability. More...
 
UIEvent Event
 The latest event to have occured. More...
 
Window parent
 The parent window of this one. More...
 
HtmlElement iframe
 The iframe element that this window is in. More...
 

Package Functions

void SetDocument (HtmlDocument doc)
 Sets the given document to this window. More...
 
void Ready ()
 Called when the document is ready. Triggers the various loaded events. More...
 

Package Attributes

System.Threading.Thread BlockableThread
 The thread that can be blocked in this window. It's the main JS thread. More...
 
BlockingDialogue BlockingDialogue
 The currently open blocking dialogue in this window. More...
 
Selection CurrentSelection
 The current selection. Use the standard getSelection() method instead. More...
 

Properties

HtmlDocument document [get]
 The document for the given window. More...
 
string status [get, set]
 The status text. More...
 
bool isClosed [get]
 Is this window closed? More...
 
Location location [get, set]
 The location of the contained document. More...
 
string name [get, set]
 This windows name. More...
 
Window opener [get]
 The window that opened this one. More...
 
HtmlElement frameElement [get]
 The frame element that this window is in. More...
 
float devicePixelRatio [get]
 The device's DPI / ScreenInfo.CssPixelDPI. More...
 
int innerWidth [get]
 Screen width. More...
 
int innerHeight [get]
 Screen height. More...
 
int pageXOffset [get]
 The scroll amount on X. More...
 
int pageYOffset [get]
 The scroll amount on Y. More...
 
int scrollMaxX [get]
 The max scroll amount on X. More...
 
int scrollMaxY [get]
 The max scroll amount on Y. More...
 
int scrollX [get]
 The scroll amount on X. More...
 
int scrollY [get]
 The scroll amount on Y. More...
 
int screenX [get]
 Screen x offset (closest we can get in Unity!) More...
 
int screenY [get]
 Screen y offset (closest we can get in Unity!) More...
 
int outerWidth [get]
 Screen width (closest we can get in Unity!) More...
 
int outerHeight [get]
 Screen height (closest we can get in Unity!) More...
 
PopStateEventDelegate onpopstate [get, set]
 History pop event. More...
 
FocusEventDelegate onblur [get, set]
 Called when an element is no longer focused. More...
 
FocusEventDelegate onfocusin [get, set]
 Called just before this element is focused. More...
 
FocusEventDelegate onfocusout [get, set]
 Called just before this element is blurred. More...
 
FocusEventDelegate onfocus [get, set]
 Called when an element is focused. More...
 
MouseEventDelegate onclick [get, set]
 Called when an element is clicked. More...
 
MouseEventDelegate onmousedown [get, set]
 Called when an element is clicked (mouse down). More...
 
MouseEventDelegate onmouseup [get, set]
 Called when an element is clicked (mouse up). More...
 
UIEventDelegate onload [get, set]
 Called when the document is now loaded. More...
 
BeforeUnloadEventDelegate onbeforeunload [get, set]
 Called when the document is about to be unloaded. More...
 
HashChangeEventDelegate onhashchange [get, set]
 Called when the hash changes. More...
 
DomEventDelegate onlanguagechange [get, set]
 Called when the language changes. More...
 
DomEventDelegate onreadystatechange [get, set]
 Called when the document ready state changes. More...
 
FormEventDelegate onreset [get, set]
 Called when a form is reset. More...
 
FormEventDelegate onsubmit [get, set]
 Called when a form is submitted. More...
 
History history [get]
 The window.history API. Read only. More...
 
Navigator navigator [get]
 Information about the navigator. More...
 

Private Attributes

string name_ =""
 This windows name. More...
 
string status_ =""
 This windows status. More...
 
HtmlDocument document_
 The document for the given window. More...
 
History history_
 Instance of the history API for this window. Note that this is never null. More...
 
Navigator navigator_
 

Constructor & Destructor Documentation

PowerUI.Window.Window ( )
inline

Creates a new window object.

Member Function Documentation

void PowerUI.Window.alert ( object  value)
inline

Alerts the given message.

string PowerUI.Window.atob ( string  a)
inline

Converts a string to base64.

string PowerUI.Window.btoa ( string  b)
inline

Converts base64 to a string.

void PowerUI.Window.clearInterval ( UITimer  timer)
inline

Clears intervals.

bool PowerUI.Window.confirm ( object  request)
inline

Asks the user to confirm something.

string PowerUI.Window.escapeHTML ( string  html)
inline

Escapes the given string, essentially making any HTML it contains literal.

Css.ComputedStyle PowerUI.Window.getComputedStyle ( HtmlElement  element)
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
elementThe element to compute the style for.
Returns
The style declaration describing the element.
Css.ComputedStyle PowerUI.Window.getComputedStyle ( HtmlElement  element,
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
elementThe element to compute the style for.
pseudoThe optional pseudo selector to use.
Returns
The style declaration describing the element.
Selection PowerUI.Window.getSelection ( )
inline

Creates a range.

MediaQueryList PowerUI.Window.matchMedia ( string  mediaQuery)
inline

Matches the given CSS media string.

void PowerUI.Window.postMessage ( object  message,
string  targetOrigin 
)
inline

Posts a message to this document.

string PowerUI.Window.prompt ( object  request)
inline

Asks the user for some textual information.

void PowerUI.Window.Ready ( )
inlinepackage

Called when the document is ready. Triggers the various loaded events.

void PowerUI.Window.SetDocument ( HtmlDocument  doc)
inlinepackage

Sets the given document to this window.

UITimer PowerUI.Window.setInterval ( Nitro.DynamicMethod< Nitro.Void method,
int  ms 
)
inline

Sets an interval.

UITimer PowerUI.Window.setTimeout ( Nitro.DynamicMethod< Nitro.Void method,
int  ms 
)
inline

Sets a timeout.

Member Data Documentation

System.Threading.Thread PowerUI.Window.BlockableThread
package

The thread that can be blocked in this window. It's the main JS thread.

BlockingDialogue PowerUI.Window.BlockingDialogue
package

The currently open blocking dialogue in this window.

Selection PowerUI.Window.CurrentSelection
package

The current selection. Use the standard getSelection() method instead.

HtmlDocument PowerUI.Window.document_
private

The document for the given window.

UIEvent PowerUI.Window.Event

The latest event to have occured.

History PowerUI.Window.history_
private

Instance of the history API for this window. Note that this is never null.

HtmlElement PowerUI.Window.iframe

The iframe element that this window is in.

string PowerUI.Window.name_ =""
private

This windows name.

Navigator PowerUI.Window.navigator_
private
Window PowerUI.Window.parent

The parent window of this one.

Window PowerUI.Window.self

Represents 'this' object. Provided for javascript compatability.

string PowerUI.Window.status_ =""
private

This windows status.

Window PowerUI.Window.top

The very top window for this UI.

Property Documentation

float PowerUI.Window.devicePixelRatio
get

The device's DPI / ScreenInfo.CssPixelDPI.

HtmlDocument PowerUI.Window.document
get

The document for the given window.

HtmlElement PowerUI.Window.frameElement
get

The frame element that this window is in.

History PowerUI.Window.history
get

The window.history API. Read only.

int PowerUI.Window.innerHeight
get

Screen height.

int PowerUI.Window.innerWidth
get

Screen width.

bool PowerUI.Window.isClosed
get

Is this window closed?

Location PowerUI.Window.location
getset

The location of the contained document.

string PowerUI.Window.name
getset

This windows name.

Navigator PowerUI.Window.navigator
get

Information about the navigator.

BeforeUnloadEventDelegate PowerUI.Window.onbeforeunload
getset

Called when the document is about to be unloaded.

FocusEventDelegate PowerUI.Window.onblur
getset

Called when an element is no longer focused.

MouseEventDelegate PowerUI.Window.onclick
getset

Called when an element is clicked.

FocusEventDelegate PowerUI.Window.onfocus
getset

Called when an element is focused.

FocusEventDelegate PowerUI.Window.onfocusin
getset

Called just before this element is focused.

FocusEventDelegate PowerUI.Window.onfocusout
getset

Called just before this element is blurred.

HashChangeEventDelegate PowerUI.Window.onhashchange
getset

Called when the hash changes.

DomEventDelegate PowerUI.Window.onlanguagechange
getset

Called when the language changes.

UIEventDelegate PowerUI.Window.onload
getset

Called when the document is now loaded.

MouseEventDelegate PowerUI.Window.onmousedown
getset

Called when an element is clicked (mouse down).

MouseEventDelegate PowerUI.Window.onmouseup
getset

Called when an element is clicked (mouse up).

PopStateEventDelegate PowerUI.Window.onpopstate
getset

History pop event.

DomEventDelegate PowerUI.Window.onreadystatechange
getset

Called when the document ready state changes.

FormEventDelegate PowerUI.Window.onreset
getset

Called when a form is reset.

FormEventDelegate PowerUI.Window.onsubmit
getset

Called when a form is submitted.

Window PowerUI.Window.opener
get

The window that opened this one.

int PowerUI.Window.outerHeight
get

Screen height (closest we can get in Unity!)

int PowerUI.Window.outerWidth
get

Screen width (closest we can get in Unity!)

int PowerUI.Window.pageXOffset
get

The scroll amount on X.

int PowerUI.Window.pageYOffset
get

The scroll amount on Y.

int PowerUI.Window.screenX
get

Screen x offset (closest we can get in Unity!)

int PowerUI.Window.screenY
get

Screen y offset (closest we can get in Unity!)

int PowerUI.Window.scrollMaxX
get

The max scroll amount on X.

int PowerUI.Window.scrollMaxY
get

The max scroll amount on Y.

int PowerUI.Window.scrollX
get

The scroll amount on X.

int PowerUI.Window.scrollY
get

The scroll amount on Y.

string PowerUI.Window.status
getset

The status text.