Namespace: Layout

Layout

Manages the life cycle of windows and views in the application.

Enables taking snapshots of itself and applying them to restore a previous configuration.

Methods

(async) applySnapshot(snapshot) → {Promise.<any>}

EXPERIMENTAL

Restores an application to a given snapshot.

Will overwrite current layout state with that of a snapshot.

The function accepts snapshots taken using getSnapshot

Parameters:
Name Type Description
snapshot any

Snapshot to apply

Tutorials:
Returns:
Type
Promise.<any>

(async) closeLayout() → {Promise.<any>}

EXPERIMENTAL

Closes current layout, all its windows, and their views.

Tutorials:
Returns:
Type
Promise.<any>

(async) closeView(viewIdentity, target) → {Promise.<any>}

EXPERIMENTAL

Closes a specified view in a target window.

Parameters:
Name Type Description
viewIdentity Identity

View identity

target Identity

Owner window identity

Tutorials:
Returns:
Type
Promise.<any>

(async) createView(viewOptions, target) → {Promise.<any>}

EXPERIMENTAL

Creates a new view and attaches it to a specified target window.

Parameters:
Name Type Description
viewOptions ViewCreationOptions

View creation options

target Identity

The window to which the new view is to be attached

Tutorials:
Returns:
Type
Promise.<any>

(async) createWindow(options) → {Promise.<_Window>}

EXPERIMENTAL

Creates a new Window.

Parameters:
Name Type Description
options Window~options

Window creation options

Tutorials:
Returns:
Type
Promise.<_Window>

(async) getSnapshot() → {Promise.<any>}

EXPERIMENTAL

Returns a snapshot of the layout in its current state.

Can be used to restore an application to a previous state.

Tutorials:
Returns:
Type
Promise.<any>