ExtensionWindow
Defined in: window/extension.ts:42
This utility class represents the extension window. It allows manipulation of the window (e.g., resizing), and also serves as an event emitter for all events that the window should be able to handle.
Currently, the following events are available:
scene-load: notifies in the event of a scene change. Handler is a function f(sceneNumber: number). For Split Modescene-loadlistens to the changes on the preview window.sources-list-highlight: notifies when a user hovers over a source in the stage, returning its source id, or when the mouse moves out of a source bounding box, returning null. Source id is also returned when hovering over the bottom panel. Handler is a function f(id: string)sources-list-select: notifies when a user clicks a source in the stage. Source id is also returned when source is selected from the bottom panel. Handler is a function f(id: string)sources-list-update: notifies when there are changes on list sources whether on stage or bottom panel. Handler is a function(ids: string) where ids are comma separated source ids.scene-delete: notifies when a scene is deleted. Handler is a function f(index: number, uid: string). Works only on version 2.8.1606.1601 or higher.scene-add: notifies when a scene is added. Handler is a function f(index: number, uid: string). Works only on version 2.8.1606.1701 or higher.scene-delete-all: notifies all scenes are deleted. Handler is a function f(type: newpres/loadpres). Works only on version 3.3.1801.1901 or higher.bscn-load: notifies when user loads a scene file via XBC, File menu > Load Scene…push-to-live: notifies when a particular scene was pushed to live by user. Handler is a function f(sceneIndex: number).
Use the on(event: string, handler: Function) function to listen to an event.
Extends
Section titled “Extends”EventEmitter
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ExtensionWindow():
ExtensionWindow
Defined in: window/extension.ts:65
** For Deprecation
Use getInstance()
Returns
Section titled “Returns”ExtensionWindow
Overrides
Section titled “Overrides”EventEmitter.constructor
Properties
Section titled “Properties”_encounteredFirstSceneChange
Section titled “_encounteredFirstSceneChange”
static_encounteredFirstSceneChange:boolean=false
Defined in: window/extension.ts:45
_proxyHandlers
Section titled “_proxyHandlers”
static_proxyHandlers:object={}
Defined in: util/eventemitter.ts:7
Inherited from
Section titled “Inherited from”EventEmitter._proxyHandlers
_remoteHandlers
Section titled “_remoteHandlers”
static_remoteHandlers:object={}
Defined in: util/eventemitter.ts:6
Inherited from
Section titled “Inherited from”EventEmitter._remoteHandlers
_subscriptions
Section titled “_subscriptions”
static_subscriptions:string[] =[]
Defined in: window/extension.ts:44
_value
Section titled “_value”
static_value:string
Defined in: window/extension.ts:336
Methods
Section titled “Methods”close()
Section titled “close()”close():
void
Defined in: window/extension.ts:403
** For deprecation, please use the static method instead
Returns
Section titled “Returns”void
disableClose()
Section titled “disableClose()”disableClose():
void
Defined in: window/extension.ts:417
** For deprecation, please use the static method instead
Returns
Section titled “Returns”void
emit()
Section titled “emit()”emit(
event, …params):void
Defined in: util/eventemitter.ts:66
This function lets an event trigger with any number of supplied parameters.
Parameters
Section titled “Parameters”string
params
Section titled “params”…any[]
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”EventEmitter.emit
enableClose()
Section titled “enableClose()”enableClose():
void
Defined in: window/extension.ts:431
** For deprecation, please use the static method instead
Returns
Section titled “Returns”void
off(
event,handler):void
Defined in: util/eventemitter.ts:37
This function removes a handler to an event.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”EventEmitter.off
on(
event,handler,_id?):void
Defined in: util/eventemitter.ts:10
This function attaches a handler to an event. Duplicate handlers are allowed.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”EventEmitter.on
resize()
Section titled “resize()”resize(
width,height):void
Defined in: window/extension.ts:332
** For deprecation, please use the static method instead
Parameters
Section titled “Parameters”number
height
Section titled “height”number
Returns
Section titled “Returns”void
setBorder()
Section titled “setBorder()”setBorder(
flag):void
Defined in: window/extension.ts:389
** For deprecation, please use the static method instead
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
setTitle()
Section titled “setTitle()”setTitle(
value):Promise<any>
Defined in: window/extension.ts:357
** For deprecation, please use the static method instead
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<any>
_finalCallback()
Section titled “_finalCallback()”
static_finalCallback(message):Promise<void>
Defined in: util/eventemitter.ts:99
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”EventEmitter._finalCallback
_setCallback()
Section titled “_setCallback()”
static_setCallback(message):Promise<unknown>
Defined in: util/eventemitter.ts:90
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”Promise<unknown>
Inherited from
Section titled “Inherited from”EventEmitter._setCallback
close()
Section titled “close()”
staticclose():void
Defined in: window/extension.ts:396
Closes this extension window
Returns
Section titled “Returns”void
disableClose()
Section titled “disableClose()”
staticdisableClose():void
Defined in: window/extension.ts:410
Disable Close Button on this extension’s window
Returns
Section titled “Returns”void
emit()
Section titled “emit()”
staticemit(event, …params):void
Defined in: window/extension.ts:80
param: (event: string, …params: any[])
Allows this class to emit an event.
Parameters
Section titled “Parameters”string
params
Section titled “params”…any[]
Returns
Section titled “Returns”void
enableClose()
Section titled “enableClose()”
staticenableClose():void
Defined in: window/extension.ts:424
Enable Close Button on this extension’s window
Returns
Section titled “Returns”void
getInstance()
Section titled “getInstance()”
staticgetInstance():ExtensionWindow
Defined in: window/extension.ts:53
** For deprecation, the need for getting the instance of an ExtensionWindow looks redundant,
** since an ExtensionWinow should technically have a single instance
Gets the instance of the window utility. Use this instead of the constructor.
Returns
Section titled “Returns”ExtensionWindow
staticoff(event,handler):void
Defined in: window/extension.ts:317
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”void
staticon(event,handler):Promise<any>
Defined in: window/extension.ts:95
param: (event: string, handler: Function)
Allows listening to events that this class emits.
Parameters
Section titled “Parameters”string
handler
Section titled “handler”Function
Returns
Section titled “Returns”Promise<any>
resize()
Section titled “resize()”
staticresize(width,height):void
Defined in: window/extension.ts:325
param: (width: number, height: number)
Resizes this extension’s window.
Parameters
Section titled “Parameters”number
height
Section titled “height”number
Returns
Section titled “Returns”void
setBorder()
Section titled “setBorder()”
staticsetBorder(flag):void
Defined in: window/extension.ts:382
param (flag: number)
Modifies this extension’s window border.
‘4’ is th e base command on setting border flags.
Flags can be: (bit 0 - enable border) (bit 1 - enable caption) (bit 2 - enable sizing) (bit 3 - enable minimize btn) (bit 4 - enable maximize btn)
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
setTitle()
Section titled “setTitle()”
staticsetTitle(value):Promise<any>
Defined in: window/extension.ts:343
param: (value: string)
Renames the extension window.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<any>