TabletProxy

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

Constructor
new TabletProxy( )

Properties

Name Type Summary
name string Name of this tablet. Read-only.
toolbarMode boolean Used to transition this tablet into and out of toolbar mode. When tablet is in toolbar mode, all its buttons will appear in a floating toolbar.
landscape boolean
tabletShown boolean Read-only.
buttons TabletProxy#ButtonList Read-only.

Methods

Name Return Value Summary
addButton TabletButtonProxy Creates a new button, adds it to this and returns it.
closeDialog None Close any open dialogs.
emitScriptEvent None Used to send an event to the HTML/JavaScript embedded in the tablet.
getLandscape boolean
gotoHomeScreen None Transition to the home screen.
gotoMenuScreen None
gotoWebScreen None Show the specified Web url on the tablet.
initialScreen None
isMessageDialogOpen boolean Check if the tablet has a message dialog open.
isPathLoaded boolean
loadQMLOnTop None
loadQMLSource None
loadWebScreenOnTop None
onHomeScreen boolean Check if the tablet is on the home screen.
popFromStack None
pushOntoStack boolean
removeButton None Removes a button from the tablet.
returnToPreviousApp None
screenChanged None Signaled when this tablet screen changes.
sendToQml None Used to send an event to the QML embedded in the tablet.
setLandscape None Set tablet into or out of landscape mode.
toolbarModeChanged None

Signals

Name Summary
fromQml Signaled when this tablet receives an event from the qml embedded in the tablet.
isTabletShownChanged Signaled when the tablet becomes visible or becomes invisible.
webEventReceived Signaled when this tablet receives an event from the html/js embedded in the tablet.

Type Definitions

ButtonList
Type: object

 

Method Details

addButton( properties ) → {TabletButtonProxy}
Returns: TabletButtonProxy

Creates a new button, adds it to this and returns it.

Parameters

Name Type Description
properties object Button properties.
closeDialog( )

Close any open dialogs.

emitScriptEvent( message )

Used to send an event to the HTML/JavaScript embedded in the tablet.

Parameters

Name Type Description
message object | string
getLandscape( ) → {boolean}
Returns: boolean

gotoHomeScreen( )

Transition to the home screen.

gotoMenuScreen( submenuopt )

Parameters

Name Type Attributes Default Value Description
submenu string <optional>
""
gotoWebScreen( url, injectedJavaScriptUrlopt, loadOtherBaseopt )

Show the specified Web url on the tablet.

Parameters

Name Type Attributes Default Value Description
url string URL of web page.
injectedJavaScriptUrl string <optional>
"" URL to an additional JS script to inject into the web page.
loadOtherBase boolean <optional>
false
initialScreen( url )

Parameters

Name Type Description
url string
isMessageDialogOpen( ) → {boolean}
Returns: boolean

Check if the tablet has a message dialog open.

isPathLoaded( path ) → {boolean}
Returns: boolean

Parameters

Name Type Description
path string
loadQMLOnTop( path )

Parameters

Name Type Description
path string
loadQMLSource( path, resizableopt )

Parameters

Name Type Attributes Default Value Description
path string
resizable boolean <optional>
false
loadWebScreenOnTop( path, injectedJavaScriptURLopt )

Parameters

Name Type Attributes Default Value Description
path string
injectedJavaScriptURL string <optional>
""
onHomeScreen( ) → {boolean}
Returns: boolean

Check if the tablet is on the home screen.

popFromStack( )

pushOntoStack( path ) → {boolean}
Returns: boolean

Parameters

Name Type Description
path string
removeButton( button )

Removes a button from the tablet.

Parameters

Name Type Description
button TabletButtonProxy The button to be removed
returnToPreviousApp( )

screenChanged( type, url )

Signaled when this tablet screen changes.

Parameters

Name Type Description
type string "Home", "Web", "Menu", "QML", "Closed".
url string Only valid for Web and QML.
sendToQml( message )

Used to send an event to the QML embedded in the tablet.

Parameters

Name Type Description
message object | string
setLandscape( landscape )

Set tablet into or out of landscape mode.

Parameters

Name Type Description
landscape boolean true for landscape, false for portrait.
toolbarModeChanged( )

Signal Details

fromQml( message )
Returns: Signal

Signaled when this tablet receives an event from the qml embedded in the tablet.

Parameters

Name Type Description
message object | string
isTabletShownChanged( )
Returns: Signal

Signaled when the tablet becomes visible or becomes invisible.

webEventReceived( message )
Returns: Signal

Signaled when this tablet receives an event from the html/js embedded in the tablet.

Parameters

Name Type Description
message object | string