Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
AnInteractiveWindow can display either inside Interface or in its own window separate from the Interface
window. The window content is defined by a QML file, which can optionally include a WebView control that embeds
an HTML web page. (The WebView control is defined by a "WebView.qml" file included in the Interface install.)
Create using Desktop.createWindow.
Properties
| Name | Type | Summary |
|---|---|---|
| title | string |
The title of the window. |
| position | Vec2 |
The position of the window, in pixels. |
| size | Vec2 |
The size of the window, in pixels. |
| visible | boolean |
|
| presentationMode | InteractiveWindow.PresentationMode |
The presentation mode of the window:
|
| Constructor |
|---|
new InteractiveWindow( )
|
Methods
| Name | Return Value | Summary |
|---|---|---|
close
|
None |
Closes the window. It can then no longer be used. |
emitScriptEvent
|
None |
Sends a message to an embedded HTML web page. To receive the message, the HTML page's script must connect to the
|
emitWebEvent
|
None |
Deprecated: This function is deprecated and will be removed. |
qmlToScript
|
None |
Deprecated: This method is deprecated and will be removed. |
raise
|
None |
Raises the window to the top. |
sendToQml
|
None |
Sends a message to the QML page. To receive the message, the QML page must implement a function:
|
show
|
None |
Makes the window visible and raises it to the top. |
Signals
| Name | Summary |
|---|---|
closed
|
Triggered when the window is closed. |
fromQml
|
Triggered when a message from the QML page is received. The QML page can send a message (string or object) by calling:
|
positionChanged
|
Triggered when the window's position changes. |
presentationModeChanged
|
Triggered when the window's presentation mode changes. |
scriptEventReceived
|
Deprecated: This signal is deprecated and will be removed. |
sizeChanged
|
Triggered when the window's size changes. |
titleChanged
|
Triggered when window's title changes. |
visibleChanged
|
Triggered when the window is made visible or invisible, or is closed. |
webEventReceived
|
Triggered when a message from an embedded HTML web page is received. The HTML web page can send a message by calling:
|
Type Definitions
|
DockArea Type: number |
|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
A docking location of an
|
|
DockAreas Type: object |
|||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The possible docking locations of an Properties
|
|
Flags Type: number |
|||||||||
|---|---|---|---|---|---|---|---|---|---|
|
A set of flags controlling
|
|
PresentationMode Type: number |
|||||||||
|---|---|---|---|---|---|---|---|---|---|
|
A display mode for an
|
|
PresentationModes Type: object |
|||||||||
|---|---|---|---|---|---|---|---|---|---|
|
The possible display modes for an Properties
|
|
PresentationWindowInfo Type: object |
||||||
|---|---|---|---|---|---|---|
|
Configures how a Properties
|
|
Properties Type: object |
||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
A set of properties used when creating an Properties
|
|
RelativePositionAnchors Type: object |
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The possible "relative position anchors" of an Properties
|
Method Details
| (static) close( ) |
|---|
|
Closes the window. It can then no longer be used. |
| (static) emitScriptEvent( message ) | ||||||
|---|---|---|---|---|---|---|
|
Sends a message to an embedded HTML web page. To receive the message, the HTML page's script must connect to the
Parameters
|
| (static) emitWebEvent( message ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This function is deprecated and will be removed. Parameters
|
| (static) qmlToScript( message ) | ||||||
|---|---|---|---|---|---|---|
|
Deprecated: This method is deprecated and will be removed. Parameters
|
| (static) raise( ) |
|---|
|
Raises the window to the top. |
| (static) sendToQml( message ) | ||||||
|---|---|---|---|---|---|---|
|
Sends a message to the QML page. To receive the message, the QML page must implement a function:
Parameters
ExamplesSend and receive messages with a QML window.
|
| (static) show( ) |
|---|
|
Makes the window visible and raises it to the top. |
Signal Details
|
closed(
)
Returns: Signal |
|---|
|
Triggered when the window is closed. |
|
fromQml(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Triggered when a message from the QML page is received. The QML page can send a message (string or object) by calling:
Parameters
|
|
positionChanged(
)
Returns: Signal |
|---|
|
Triggered when the window's position changes. |
|
presentationModeChanged(
)
Returns: Signal |
|---|
|
Triggered when the window's presentation mode changes. |
|
scriptEventReceived(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Deprecated: This signal is deprecated and will be removed. Parameters
|
|
sizeChanged(
)
Returns: Signal |
|---|
|
Triggered when the window's size changes. |
|
titleChanged(
)
Returns: Signal |
|---|
|
Triggered when window's title changes. |
|
visibleChanged(
)
Returns: Signal |
|---|
|
Triggered when the window is made visible or invisible, or is closed. |
|
webEventReceived(
message
)
Returns: Signal |
||||||
|---|---|---|---|---|---|---|
|
Triggered when a message from an embedded HTML web page is received. The HTML web page can send a message by calling:
Parameters
|