-
-
Name |
Type |
Description |
parent |
HTMLElement
|
|
-
-
Attach an existing window to the WindowManager
Note: WindowManager.createWindow is the preferred way to create windows to ensure that all the defaultOptions
are applied to the Window. If you use this function, then Window needs to be initialized with WindowOptions.
Name |
Type |
Description |
win |
Window
|
|
Returns:
Type |
Description |
Window
|
the window |
-
-
close all windows
-
-
Create a window
Name |
Type |
Description |
options |
WindowOptions
|
optional
Name |
Type |
Description |
title |
string
|
optional
|
x |
number
|
optional
position |
y |
number
|
optional
position |
modal |
boolean
|
optional
|
id |
number
|
*
|
optional
if not provide, id will be assigned in order of creation (0, 1, 2...) |
|
Returns:
Type |
Description |
Window
|
the created window |
-
emit
(event)Boolean
inherited
overrides
-
Calls each of the listeners registered for a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Boolean
|
`true` if the event had listeners, else `false`. |
-
eventNames
()Array
inherited
overrides
-
Return an array listing the events for which the emitter has registered
listeners.
Returns:
-
listenerCount
(event)Number
inherited
overrides
-
Return the number of listeners listening to a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Number
|
The number of listeners. |
-
listeners
(event)Array
inherited
overrides
-
Return the listeners registered for a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
Returns:
Type |
Description |
Array
|
The registered listeners. |
-
-
restores the state of all the windows
NOTE: this requires that the windows have the same id as when save() was called
Name |
Type |
Description |
data |
object
|
created by save() |
-
-
Add a one-time listener for a given event.
Name |
Type |
Default |
Description |
event |
String
|
Symbol
|
|
The event name. |
fn |
function
|
|
The listener function. |
context |
*
|
this
|
optional
The context to invoke the listener with. |
Returns:
-
-
Add a listener for a given event.
Name |
Type |
Default |
Description |
event |
String
|
Symbol
|
|
The event name. |
fn |
function
|
|
The listener function. |
context |
*
|
this
|
optional
The context to invoke the listener with. |
Returns:
-
-
Remove all listeners, or those of the specified event.
Name |
Type |
Description |
event |
String
|
Symbol
|
optional
The event name. |
Returns:
-
removeListener
(event, fn, context, once)EventEmitter
inherited
overrides
-
Remove the listeners of a given event.
Name |
Type |
Description |
event |
String
|
Symbol
|
The event name. |
fn |
function
|
Only remove the listeners that match this function. |
context |
*
|
Only remove the listeners that have this context. |
once |
Boolean
|
Only remove one-time listeners. |
Returns:
-
-
save the state of all the windows
Returns:
Type |
Description |
object
|
use this object in load() to restore the state of all windows |
-
-
send window to back
Name |
Type |
Description |
win |
Window
|
|
-
-
send window to front
Name |
Type |
Description |
win |
Window
|
|
-
-
enable edge and/or screen snapping