Namespace: OrionStarletWindow

OrionStarletWindow

A collection of methods to get information about and control the Window a Starlet is running in.

Source:

Methods

<static> activate()

Brings the Window your Starlet is in to the foreground.

Source:
See:

<static> hide()

Hides the Window the Starlet is in.

Source:
See:

<static> resize(width, height)

Resizes the Window the Starlet is in to specified dimensions.

Parameters:
Name Type Description
width Number

Desired Window width (px).

height Number

Desired Window height (px).

Source:
See:

<static> setFocusCallback(objectName, callbackName)

Sets a callback to be notified when the window gains or loses focus. When you set the callback, you'll immediately get notified of the current state.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionStarletWindow.setFocusCallback('', 'focusCallback');

function focusCallback(event)
{
   if (event.eventName == 'windowFocus')
   {
       OrionSystem.logToConsole('window gained focus');
   }
   else if (event.eventName == 'windowUnfocus')
   {
       OrionSystem.logToConsole('window lost focus');
   }
}

<static> setHiddenCallback(objectName, callbackName)

Sets a callback to be notified when the window gets hidden or shown. When you set the callback, you'll immediately get notified of the current state.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionStarletWindow.setHiddenCallback('', 'hiddenCallback');

function hiddenCallback(event)
{
   if (event.eventName == 'windowHidden')
   {
       OrionSystem.logToConsole('window is hidden');
   }
   else if (event.eventName == 'windowUnhidden')
   {
       OrionSystem.logToConsole('window is no longer hidden');
   }
}

<static> setMinimizeCallback(objectName, callbackName)

Sets a callback to be notified when the window minimizes or unminimizes. When you set the callback, you'll immediately get notified of the current state.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionStarletWindow.setMinimizeCallback('', 'minimizeCallback');

function minimizeCallback(event)
{
   if (event.eventName == 'windowMinimize')
   {
       OrionSystem.logToConsole('window is minimized');
   }
   else if (event.eventName == 'windowUnminimize')
   {
       OrionSystem.logToConsole('window is unminimized');
   }
}

<static> setMouseCallback(objectName, callbackName)

Sets a callback to be notified when the mouse enters or leaves your starlet.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionStarletWindow.setMouseCallback('', 'mouseCallback');

function mouseCallback(event)
{
   if (event.eventName == 'mouseEnter')
   {
       OrionSystem.logToConsole('mouse entered starlet (' + event.mouseX + ',' + event.mouseY + ')');
   }
   else if (event.eventName == 'mouseLeave')
   {
       OrionSystem.logToConsole('mouse left starlet (' + event.mouseX + ',' + event.mouseY + ')');
   }
}

<static> setStarletVisibleCallback(objectName, callbackName)

Sets a callback to be notified when your Starlet is made visible or not visible due to navigation.

Parameters:
Name Type Argument Default Description
objectName String <optional>
'window'

Namespace containing method.

callbackName String

Name of method.

Source:
See:
Fires:
Example
OrionStarletWindow.setStarletVisibleCallback('', 'visibleCallback');

function visibleCallback(event)
{
   if (event.eventName == 'starletVisible')
   {
       // event.visible will be true or false depending on if you are visible or not.
   }
}

<static> show()

Shows the Window the Starlet is in.

Source:
See:

<static> unsetFocusCallback()

Clears the callback so focus events are no longer sent.

Source:
See:

<static> unsetHiddenCallback()

Clears the callback so hide events are no longer sent.

Source:
See:

<static> unsetMinimizeCallback()

Clears the callback so minimize events are no longer sent.

Source:
See:

<static> unsetMouseCallback()

Clears the callback so mouse events are no longer sent.

Source:
See:

<static> unsetStarletVisibleCallback()

Clears the callback so visible events are no longer sent.

Source:
See: