• Back to Glue42 Core Docs
Glue42 core documentation

Reference Documentation

  • Back to Glue42 Core Docs
Press/
  • Glue42 Web
  • AppManager
  • Channels
  • Intents
  • Interop
  • Layouts
  • Notifications
  • Shared Contexts
  • Themes
  • Windows
  • Workspaces

Workspaces

2.20.0

The Workspaces API offers advanced window management functionalities. Using Workspaces, users are able to arrange multiple applications within the same visual window (called Frame). This arrangement can be performed programmatically or by dragging and dropping applications within the Frame. Users can also save Workspace Layouts and restore them within the same Frame or even in different Frames.

The Glue42 Workspaces enable the users to compose a custom arrangement of applications by treating each application as an individual building block that can be added, removed, moved or resized within a Workspace. The Frame can hold multiple Workspaces (as tabs) and can also be maximized, minimized or resized.

The Workspaces API is accessible through the glue.workspaces object.

APIobject

Properties

Property Type Default Required Description
layouts WorkspaceLayoutsAPI

An API which gives full read, write and delete access to the workspaces layouts.

version string

Glue42 Workspaces API version.

Methods

  • createEmptyFrame
  • createWorkspace
  • getAllFrames
  • getAllWorkspaces
  • getAllWorkspacesSummaries
  • getBox
  • getBuilder
  • getFrame
  • getMyFrame
  • getMyWorkspace
  • getWindow
  • getWorkspace
  • getWorkspaceById
  • inWorkspace
  • onFrameClosed
  • onFrameOpened
  • onWindowAdded
  • onWindowLoaded
  • onWindowMaximized
  • onWindowRemoved
  • onWindowRestored
  • onWorkspaceClosed
  • onWorkspaceOpened
  • restoreWorkspace
  • waitForFrame

createEmptyFramemethod

Signature

(definition?: EmptyFrameDefinition) => Promise<Frame>

Parameters

Name Type Required Description
definition EmptyFrameDefinition

Optional definition of the frame

createWorkspacemethod

Signature

(definition: WorkspaceDefinition, saveConfig?: WorkspaceCreateConfig) => Promise<Workspace>

Description

Opens a new workspace based on the provided definition.

Parameters

Name Type Required Description
definition WorkspaceDefinition

An object describing the shape and options of the workspace.

saveConfig WorkspaceCreateConfig

An object used to set various create options.

getAllFramesmethod

Signature

(predicate?: (frame: Frame) => boolean) => Promise<Frame[]>

Description

Returns all frames which satisfy the provided predicate. If no predicate is provided, will return all frames.

Parameters

Name Type Required Description
predicate (frame: Frame) => boolean

A filtering function (predicate) called for each open frame.

getAllWorkspacesmethod

Signature

(predicate?: (workspace: Workspace) => boolean) => Promise<Workspace[]>

Description

Returns all workspaces which satisfy the provided predicate. If no predicate is provided, will return all workspaces.

Parameters

Name Type Required Description
predicate (workspace: Workspace) => boolean

A filtering function (predicate) called for each open workspace.

getAllWorkspacesSummariesmethod

Signature

() => Promise<WorkspaceSummary[]>

Description

Returns an collection of objects, where each object contains basic information about an open workspace. This function was designed for easy and quick listing of existing workspaces without adding the complexity of transmitting the entire structure of each workspace.

getBoxmethod

Signature

(predicate: (box: WorkspaceBox) => boolean) => Promise<WorkspaceBox>

Description

Returns the instance of the first box, which satisfies the provided predicate. This function will search recursively in all open workspaces.

Parameters

Name Type Required Description
predicate (box: WorkspaceBox) => boolean

A filtering function (predicate) called for each box in each open workspace.

getBuildermethod

Signature

(config: BuilderConfig) => WorkspaceBuilder | BoxBuilder

Description

Gets either a workspace or a box builder depending on the provided type inside the config object. This builder is used to dynamically construct a workspace runtime.

Parameters

Name Type Required Description
config BuilderConfig

An object describing the type of the requested builder, alongside other settings.

getFramemethod

Signature

(predicate: (frame: Frame) => boolean) => Promise<Frame>

Description

Returns the first frame instance which satisfies the provided predicate or undefined, if non do.

Parameters

Name Type Required Description
predicate (frame: Frame) => boolean

A filtering function (predicate) called for each open frame.

getMyFramemethod

Signature

() => Promise<Frame>

Description

Returns the frame instance of the calling window. Throws an error if the calling window is not part of a workspace.

getMyWorkspacemethod

Signature

() => Promise<Workspace>

Description

Returns the instance of the workspace where the calling window is located. Throws an error if the calling window is not not part of any workspace.

getWindowmethod

Signature

(predicate: (workspaceWindow: WorkspaceWindow) => boolean) => Promise<WorkspaceWindow>

Description

Returns the workspace window instance of the first window, which is part of a workspace and satisfies the provided predicate. This function will search recursively in all open workspaces.

Parameters

Name Type Required Description
predicate (workspaceWindow: WorkspaceWindow) => boolean

A filtering function (predicate) called for each window in each open workspace.

getWorkspacemethod

Signature

(predicate: (workspace: Workspace) => boolean) => Promise<Workspace>

Description

Returns the first workspace instance which satisfies the provided predicate or undefined, if non do.

Parameters

Name Type Required Description
predicate (workspace: Workspace) => boolean

A filtering function (predicate) called for each open workspace.

getWorkspaceByIdmethod

Signature

(workspaceId: string) => Promise<Workspace>

Description

Returns an instance of the workspace with the passed id. The performance is better than getWorkspace when querying for a workspace by id.

Parameters

Name Type Required Description
workspaceId string

The id of the desired workspace

inWorkspacemethod

Signature

() => Promise<boolean>

Description

Checks whether or not the calling window is currently present inside of a workspace

onFrameClosedmethod

Signature

(callback: (closed: FrameClosedData) => void) => Promise<Unsubscribe>

Description

Notifies when a new frame was closed and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (closed: FrameClosedData) => void

Callback function to handle the event. Receives an object containing the id of the closed frame as a parameter.

onFrameOpenedmethod

Signature

(callback: (frame: Frame) => void) => Promise<Unsubscribe>

Description

Notifies when a new frame was opened and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (frame: Frame) => void

Callback function to handle the event. Receives the added frame as a parameter.

onWindowAddedmethod

Signature

(callback: (workspaceWindow: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a new window was added to any workspace in any frame and returns an unsubscribe function. An added window means that the window has a place in a workspace (it is a valid workspace element), but does not guarantee that the contents of the window are loaded.

Parameters

Name Type Required Description
callback (workspaceWindow: WorkspaceWindow) => void

Callback function to handle the event. Receives the added window as a parameter.

onWindowLoadedmethod

Signature

(callback: (workspaceWindow: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window's content was loaded in any workspace in any frame and returns an unsubscribe function. A loaded window is a window, which was added to a workspace, it's contents were loaded and it is present in the windows collection.

Parameters

Name Type Required Description
callback (workspaceWindow: WorkspaceWindow) => void

Callback function to handle the event. Receives the loaded window as a parameter.

onWindowMaximizedmethod

Signature

(callback: (workspaceWindow: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window was maximized in any workspace in any frame and returns an unsubscribe function. A maximized window means that the window has been maximized either by an API call or from the maximize button by the user.

Parameters

Name Type Required Description
callback (workspaceWindow: WorkspaceWindow) => void

Callback function to handle the event. Receives the maximized window as a parameter.

onWindowRemovedmethod

Signature

(callback: (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void) => Promise<Unsubscribe>

Description

Notifies when a window was removed from any workspace and any frame and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void

Callback function to handle the event. Receives an object containing the ids of the removed window, and the respective workspace and frame as a parameter.

onWindowRestoredmethod

Signature

(callback: (workspaceWindow: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window was restored from a maximized state in any workspace in any frame and returns an unsubscribe function. A restored window means that the window has been restored from a maximized state either by an API call or from the restore button by the user.

Parameters

Name Type Required Description
callback (workspaceWindow: WorkspaceWindow) => void

Callback function to handle the event. Receives the restored window as a parameter.

onWorkspaceClosedmethod

Signature

(callback: (closed: WorkspaceClosedData) => void) => Promise<Unsubscribe>

Description

Notifies when a workspace present in any of the opened frames was closed and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (closed: WorkspaceClosedData) => void

Callback function to handle the event. Receives an object with the closed workspace id and frame id as a parameter.

onWorkspaceOpenedmethod

Signature

(callback: (workspace: Workspace) => void) => Promise<Unsubscribe>

Description

Notifies when a new workspace was opened in any of the opened frames and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (workspace: Workspace) => void

Callback function to handle the event. Receives the added workspace as a parameter.

restoreWorkspacemethod

Signature

(name: string, options?: RestoreWorkspaceConfig) => Promise<Workspace>

Description

Opens a new workspace by restoring a previously saved workspace layout.

Parameters

Name Type Required Description
name string

The name of a saved workspace layout, which will be restored.

options RestoreWorkspaceConfig

An optional object containing various workspace restore options.

waitForFramemethod

Signature

(id: string) => Promise<Frame>

Description

Wait for a frame with the specified id to be loaded. It's needed when using the workspaces-api from a custom workspaces frame and you have the frameId, but the frame object is not populated in the API yet (e.g. the frame is in the pool)

Parameters

Name Type Required Description
id string

the id of the frame that should be waited

Boxobject

Description

An object describing a workspace box

Properties

Property Type Default Required Description
allowDrop boolean

Indicates if dropping windows inside this box is allowed

children WorkspaceElement[]

A collection containing the immediate children of this box

frame Frame

An object representing the frame containing this box

frameId string

The unique string identifier of the frame containing this box

height number

Returns the current height of the box, can be undefined if the API is used with old versions of Enterprise or Core

id string

An unique string identifier of this box

isMaximized boolean

Returns whether or not the box is maximized

maxHeight number

Returns the maximum height of the box, calculated by the size constraints of the elements inside it

maxWidth number

Returns the maximum width of the box, calculated by the size constraints of the elements inside it

minHeight number

Returns the minimum height of the box, calculated by the size constraints of the elements inside it

minWidth number

Returns the minimum width of the box, calculated by the size constraints of the elements inside it

parent Workspace | Row | Column | Group

An object representing this box's parent

positionIndex number

An number representing the positing of this box relative to it's siblings

width number

Returns the current width of the box, can be undefined if the API is used with old versions of Enterprise or Core

workspace Workspace

An object representing the workspace containing this box

workspaceId string

The unique string identifier of the workspace containing this box

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • close
  • maximize
  • removeChild
  • restore

addColumnmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Column>

Description

Adds a new column box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addGroupmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Group>

Description

Adds a new group box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addRowmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Row>

Description

Adds a new row box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>

Description

Opens a new window inside this box and loads it's content.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

An object describing the requested window.

closemethod

Signature

() => Promise<void>

Description

Closes this box all of it's children.

maximizemethod

Signature

() => Promise<void>

Description

Maximizes this box relative to it's parent box.

removeChildmethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first immediate child of this box which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for immediate child of this box.

restoremethod

Signature

() => Promise<void>

Description

Restores this box, if previously maximized.

BoxBuilderobject

Description

An object describing a builder used to create workspace boxes

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • serialize

addColumnmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new column to the calling box. Returns the new column.

Parameters

Name Type Required Description
definition BoxDefinition

addGroupmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new group to the calling box. Returns the new group.

Parameters

Name Type Required Description
definition BoxDefinition

addRowmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new row to the calling box. Returns the new row.

Parameters

Name Type Required Description
definition BoxDefinition

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => BoxBuilder

Description

Adds a new window to the calling box. Returns the immediate parent box of the window.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

serializemethod

Signature

() => BoxDefinition

Description

Returns the JSON object which describes the full structure of the box.

BoxDefinitionobject

Description

An object describing the possible options when opening a box inside a workspace.

Properties

Property Type Default Required Description
children (BoxDefinition | WorkspaceWindowDefinition)[]

An array of all the box's children which will also be opened.

config GroupDefinitionConfig | RowDefinitionConfig | ColumnDefinitionConfig

An optional config object which defines various box-specific settings

type "column" | "row" | "group"

The type of the workspace element.

BoxSummaryobject

Description

An object containing the summary of a workspace box

Properties

Property Type Default Required Description
allowDrop boolean

Indicates if dropping windows inside this box is allowed

frameId string

The unique string identifier of the frame containing this box

height number

Returns the current height of the box, can be undefined if the API is used with old versions of Enterprise or Core

id string

An unique string identifier of this box

isMaximized boolean

Returns whether or not the box is maximized

maxHeight number

Returns the maximum height of the box, calculated by the size constraints of the elements inside it

maxWidth number

Returns the maximum width of the box, calculated by the size constraints of the elements inside it

minHeight number

Returns the minimum height of the box, calculated by the size constraints of the elements inside it

minWidth number

Returns the minimum width of the box, calculated by the size constraints of the elements inside it

positionIndex number

An number representing the positing of this box relative to it's siblings

width number

Returns the current width of the box, can be undefined if the API is used with old versions of Enterprise or Core

workspaceId string

The unique string identifier of the workspace containing this box

BuilderConfigobject

Description

An object describing the options of the builder.

Properties

Property Type Default Required Description
definition WorkspaceDefinition | BoxDefinition

An object describing various options when creating a builder.

type "column" | "row" | "group" | "workspace"

A string defining the type of the builder.

Columnobject

Description

An object describing a column type workspace box

Properties

Property Type Default Required Description
allowSplitters boolean

Indicates if dragging of splitters is allowed in the column

children WorkspaceElement[]

A collection containing the immediate children of this box

frame Frame

An object representing the frame containing this box

isPinned boolean

Indicates whether or not the column is pinned

maximizationBoundary boolean

If set to true any child that is maximized will have its width and height constricted to the current element's size

parent Workspace | Row | Column | Group

An object representing this box's parent

type "column"
workspace Workspace

An object representing the workspace containing this box

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • close
  • lock
  • maximize
  • onLockConfigurationChanged
  • removeChild
  • restore
  • setMaximizationBoundary
  • setWidth

addColumnmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Column>

Description

Adds a new column box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addGroupmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Group>

Description

Adds a new group box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addRowmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Row>

Description

Adds a new row box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>

Description

Opens a new window inside this box and loads it's content.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

An object describing the requested window.

closemethod

Signature

() => Promise<void>

Description

Closes this box all of it's children.

lockmethod

Signature

(config?: ColumnLockConfig | ((config: ColumnLockConfig) => ColumnLockConfig)) => Promise<void>

Description

Locks the column using a provided config object, which restricts various modification functionalities of the column

Parameters

Name Type Required Description
config ColumnLockConfig | ((config: ColumnLockConfig) => ColumnLockConfig)

This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

maximizemethod

Signature

() => Promise<void>

Description

Maximizes this box relative to it's parent box.

onLockConfigurationChangedmethod

Signature

(callback: (config: ColumnLockConfig) => void) => Promise<Unsubscribe>

Description

Notifies when the a change in the lock configuration of the column has been made

Parameters

Name Type Required Description
callback (config: ColumnLockConfig) => void

Callback function to handle the event. Receives the new lock configuration as a parameter

removeChildmethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first immediate child of this box which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for immediate child of this box.

restoremethod

Signature

() => Promise<void>

Description

Restores this box, if previously maximized.

setMaximizationBoundarymethod

Signature

(config: SetMaximizationBoundaryConfig) => Promise<void>

Description

Changes whether the column is a maximizationBoundary

Parameters

Name Type Required Description
config SetMaximizationBoundaryConfig

Object which specifies how the maximizationBoundary behavior should be changed

setWidthmethod

Signature

(width: number) => Promise<void>

Description

Sets a new width for the column

Parameters

Name Type Required Description
width number

A required number which should be the new width of the column

ColumnDefinitionConfigobject

Description

A config object which defines various column-specific settings

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the column

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized within the column

isPinned boolean

Specifies if a column should be pinned. A pinned column will always maintain it's width, unless the user manually changes it by dragging the splitter

maximizationBoundary boolean

If set to true any child that is maximized will have its width and height constricted to the current element's size

maxWidth number

Specifies the maximum width in pixels for the column

minWidth number

Specifies the minimum width in pixels for the column

ColumnLayoutItemobject

Description

An object describing a column definition in a workspace layout.

Properties

Property Type Default Required Description
children (ColumnLayoutItem | RowLayoutItem | GroupLayoutItem | WindowLayoutItem)[]

An array of all the column's children.

config any

An object containing various element settings.

type "column"

The type of the workspace element.

ColumnLockConfigobject

Description

A config object which provides fine grain control when locking a column

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the column

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized within the row

ElementResizeConfigobject

Description

A config object which defines how a workspace element should be resized

Properties

Property Type Default Required Description
height number

Defines the desired new height of the element

width number

Defines the desired new width of the element

EmptyFrameDefinitionobject

Properties

Property Type Default Required Description
applicationName string

The application name of the workspace app that should be used for the new frame (available only for Glue42 Enterprise)

context object

Optional context which will be passed to the initialization callback

frameConfig NewFrameConfig

Optional frame related settings

layoutComponentId string

Optional the id of the layout component which is being restored

Frameobject

Description

An object describing a frame

Properties

Property Type Default Required Description
id string

An unique string identifier of the frame

isInitialized boolean

Indicates whether the frame has been initialized or not

Methods

  • close
  • createWorkspace
  • focus
  • getBounds
  • getConstraints
  • init
  • maximize
  • minimize
  • move
  • onClosed
  • onFocusChanged
  • onInitializationRequested
  • onMaximized
  • onMinimized
  • onNormal
  • onWindowAdded
  • onWindowLoaded
  • onWindowRemoved
  • onWorkspaceClosed
  • onWorkspaceOpened
  • onWorkspaceSelected
  • registerShortcut
  • resize
  • restore
  • restoreWorkspace
  • snapshot
  • state
  • workspaces

closemethod

Signature

() => Promise<void>

Description

Closes this frame.

createWorkspacemethod

Signature

(definition: WorkspaceDefinition, config?: WorkspaceCreateConfig) => Promise<Workspace>

Description

Opens a new workspace in this frame based on the provided definition.

Parameters

Name Type Required Description
definition WorkspaceDefinition

An object describing the shape and options of the workspace.

config WorkspaceCreateConfig

focusmethod

Signature

() => Promise<void>

Description

Focuses this frame.

getBoundsmethod

Signature

() => Promise<FrameBounds>

Description

Retrieves the current bounds of the frame.

getConstraintsmethod

Signature

() => Promise<FrameConstraints>

Description

Returns the current size constraints this frame. The constraints are calculated using all of the individual constraints of the elements within the workspaces in the frame.

initmethod

Signature

(config: FrameInitializationConfig) => Promise<void>

Description

Initializes the frame with the provided workspaces in the config when the frame has been opened as empty

Parameters

Name Type Required Description
config FrameInitializationConfig

The configuration with which the frame will be initialized

maximizemethod

Signature

() => Promise<void>

Description

Maximizes this frame. Not available in Glue42 Core

minimizemethod

Signature

() => Promise<void>

Description

Minimizes this frame. Not available in Glue42 Core

movemethod

Signature

(config: MoveConfig) => Promise<void>

Description

Changes the position of this frame.

Parameters

Name Type Required Description
config MoveConfig

An object defining the position parameters.

onClosedmethod

Signature

(callback: (closed: FrameClosedData) => void) => Promise<Unsubscribe>

Description

Notifies when this frame is closed.

Parameters

Name Type Required Description
callback (closed: FrameClosedData) => void

Callback function to handle the event.

onFocusChangedmethod

Signature

(callback: (data: FrameFocusChangedData) => void) => Promise<Unsubscribe>

Description

Triggered when either a window in the frame is focused or the frame itself (supported only in Glue42 Enterprise).

Parameters

Name Type Required Description
callback (data: FrameFocusChangedData) => void

Callback function to handle the event. It receives a data oject which indicates how the focus has changed.

onInitializationRequestedmethod

Signature

(callback: (context?: FrameInitializationContext) => void) => Promise<Unsubscribe>

Description

Notifies when a the frame is created without being initialized.

Parameters

Name Type Required Description
callback (context?: FrameInitializationContext) => void

Callback function to handle the event. Receives a context for the initialization request

onMaximizedmethod

Signature

(callback: () => void) => Promise<Unsubscribe>

Description

Notifies when this frame is maximized. This event is not supported in Glue42 Core.

Parameters

Name Type Required Description
callback () => void

Callback function to handle the event.

onMinimizedmethod

Signature

(callback: () => void) => Promise<Unsubscribe>

Description

Notifies when this frame is closed. This event is not supported in Glue42 Core.

Parameters

Name Type Required Description
callback () => void

Callback function to handle the event.

onNormalmethod

Signature

(callback: () => void) => Promise<Unsubscribe>

Description

Notifies when this frame is closed. This event is not supported in Glue42 Core.

Parameters

Name Type Required Description
callback () => void

Callback function to handle the event.

onWindowAddedmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a new window was added to a workspace part of this frame and returns an unsubscribe function. An added window means that the window has a place in the workspace (it is a valid workspace element), but does not guarantee that the contents of the window are loaded.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the added window as a parameter.

onWindowLoadedmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window's content was loaded in a workspace part of this frame and returns an unsubscribe function. A loaded window is a window, which was added to a workspace, it's contents were loaded and is present in the windows collection.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the loaded window as a parameter.

onWindowRemovedmethod

Signature

(callback: (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void) => Promise<Unsubscribe>

Description

Notifies when a window was removed from a workspace part of this frame and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void

Callback function to handle the event. Receives an object containing the ids of the removed window, and the respective workspace and frame as a parameter.

onWorkspaceClosedmethod

Signature

(callback: (closed: { frameId: string; workspaceId: string; }) => void) => Promise<Unsubscribe>

Description

Notifies when a workspace present in this frame was closed and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (closed: { frameId: string; workspaceId: string; }) => void

Callback function to handle the event. Receives an object with the closed workspace id and frame id as a parameter.

onWorkspaceOpenedmethod

Signature

(callback: (workspace: Workspace) => void) => Promise<Unsubscribe>

Description

Notifies when a new workspace was opened in this frame and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (workspace: Workspace) => void

Callback function to handle the event. Receives the added workspace as a parameter.

onWorkspaceSelectedmethod

Signature

(callback: (workspace: Workspace) => void) => Promise<Unsubscribe>

Description

Notifies when a workspace is selected in this frame and returns an unsubscribe function.

Parameters

Name Type Required Description
callback (workspace: Workspace) => void

Callback function to handle the event. Receives the selected workspace as a parameter.

registerShortcutmethod

Signature

(shortcut: string, callback: () => void) => Promise<Unsubscribe>

Description

An API which gives full read, write and delete access to the workspaces layouts.

Parameters

Name Type Required Description
shortcut string
callback () => void

resizemethod

Signature

(config: ResizeConfig) => Promise<void>

Description

Changes the size of this frame.

Parameters

Name Type Required Description
config ResizeConfig

An object defining the resize parameters.

restoremethod

Signature

() => Promise<void>

Description

Restores this frame. Not available in Glue42 Core

restoreWorkspacemethod

Signature

(name: string, options?: RestoreWorkspaceConfig) => Promise<Workspace>

Description

Opens a new workspace in this frame by restoring a previously saved workspace layout.

Parameters

Name Type Required Description
name string

The name of a saved workspace layout, which will be restored.

options RestoreWorkspaceConfig

An optional object containing various workspace restore options.

snapshotmethod

Signature

() => Promise<FrameSnapshot>

Description

Returns an object detailing the current state of this frame.

statemethod

Signature

() => Promise<FrameState>

Description

Returns the current state of the frame. Not available in Glue42 Core

workspacesmethod

Signature

() => Promise<Workspace[]>

Description

Returns a collection of all workspaces present in this frame.

FrameBoundsobject

Description

An object containing the bounds of a frame

Properties

Property Type Default Required Description
height number
left number
top number
width number

FrameClosedDataobject

Properties

Property Type Default Required Description
frameBounds FrameBounds
frameId string

FrameConstraintsobject

Description

A config object which shows the possible frame size constraints, which are calculated using all internal elements' constraints

Properties

Property Type Default Required Description
maxHeight number

Shows the maximum height of the frame

maxWidth number

Shows the maximum width of the frame

minHeight number

Shows the minimum height of the frame

minWidth number

Shows the minimum width of the frame

FrameFocusChangedDataobject

Properties

Property Type Default Required Description
isFocused boolean

FrameInitializationConfigobject

Properties

Property Type Default Required Description
workspaces (WorkspaceDefinition | RestoreWorkspaceDefinition)[]

Array of workspace definitions with which the frame should be opened

FrameInitializationContextobject

Properties

Property Type Default Required Description
context object

Context passed when the frame was created

FrameSnapshotobject

Description

An object describing the complete state of a frame at the time when the object was created

Properties

Property Type Default Required Description
config any
id string

A string identifier unique to each frame

workspaces WorkspaceSnapshot[]

FrameSummaryobject

Description

An object describing the basic details of a frame

Properties

Property Type Default Required Description
id string

An unique string identifier of the frame

isInitialized boolean

Indicates whether the frame has been initialized or not

FrameTargetingOptionsobject

Properties

Property Type Default Required Description
applicationName string

The application name of the workspace app that should be used for the new frame (available only for Glue42 Enterprise)

newFrame boolean | NewFrameConfig

A setting used to declare that the workspace must be in a new frame and also provide options for that new frame

reuseFrameId string

A string id of an existing frame. If provided, this workspace will be opened in that specific frame

Groupobject

Description

An object describing a group type workspace box

Properties

Property Type Default Required Description
allowDropBottom boolean

Controls the users ability to drop windows in the bottom zone of the group

allowDropHeader boolean

Controls the users ability to drop windows in header zone of the group

allowDropLeft boolean

Controls the users ability to drop windows in the left zone of the group

allowDropRight boolean

Controls the users ability to drop windows in the right zone of the group

allowDropTop boolean

Controls the users ability to drop windows in the top zone of the group

allowExtract boolean

Controls the users ability to extract windows from the group

allowReorder boolean

Controls the users ability to reorder windows in the group

children WorkspaceElement[]

A collection containing the immediate children of this box

frame Frame

An object representing the frame containing this box

parent Workspace | Row | Column | Group

An object representing this box's parent

showAddWindowButton boolean

Controls the visibility of the add window buttons (the ones with the plus icon) located in the group header

showEjectButton boolean

Controls the visibility of the eject button located in the group header

showMaximizeButton boolean

Controls the visibility of the maximize/restore button located in the group header

type "group"
workspace Workspace

An object representing the workspace containing this box

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • close
  • lock
  • maximize
  • onLockConfigurationChanged
  • removeChild
  • restore
  • setSize

addColumnmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Column>

Description

Adds a new column box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addGroupmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Group>

Description

Adds a new group box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addRowmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Row>

Description

Adds a new row box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>

Description

Opens a new window inside this box and loads it's content.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

An object describing the requested window.

closemethod

Signature

() => Promise<void>

Description

Closes this box all of it's children.

lockmethod

Signature

(config?: GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig)) => Promise<void>

Description

Locks the group using a provided config object, which restricts various modification functionalities of the group

Parameters

Name Type Required Description
config GroupLockConfig | ((config: GroupLockConfig) => GroupLockConfig)

This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

maximizemethod

Signature

() => Promise<void>

Description

Maximizes this box relative to it's parent box.

onLockConfigurationChangedmethod

Signature

(callback: (config: GroupLockConfig) => void) => Promise<Unsubscribe>

Description

Notifies when a change in the lock configuration of the group has been made

Parameters

Name Type Required Description
callback (config: GroupLockConfig) => void

Callback function to handle the event. Receives the new lock configuration as a parameter

removeChildmethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first immediate child of this box which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for immediate child of this box.

restoremethod

Signature

() => Promise<void>

Description

Restores this box, if previously maximized.

setSizemethod

Signature

(sizeConfig: ElementResizeConfig) => Promise<void>

Description

Sets a new size for the group

Parameters

Name Type Required Description
sizeConfig ElementResizeConfig

A config object which should be the new size of the group.

GroupDefinitionConfigobject

Description

A config object which defines various group-specific settings

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the group

allowDropBottom boolean

Controls the users ability to drop windows in bottom zone of the group

allowDropHeader boolean

Controls the users ability to drop windows in header zone of the group

allowDropLeft boolean

Controls the users ability to drop windows in left zone of the group

allowDropRight boolean

Controls the users ability to drop windows in right zone of the group

allowDropTop boolean

Controls the users ability to drop windows in top zone of the group

allowExtract boolean

Blocks the users ability to extract windows from the group

allowReorder boolean

Blocks the users ability to reorder windows from the group

maxHeight number

Specifies the maximum height in pixels for the group

maxWidth number

Specifies the maximum width in pixels for the group

minHeight number

Specifies the minimum height in pixels for the group

minWidth number

Specifies the minimum width in pixels for the group

showAddWindowButton boolean

Controls the visibility of the add window buttons (the ones with the plus icon) located in the group header

showEjectButton boolean

Controls the visibility of the eject button located in the group header

showMaximizeButton boolean

Controls the visibility of the maximize/restore button located in the group header

GroupLayoutItemobject

Description

An object describing a group definition in a workspace layout.

Properties

Property Type Default Required Description
children WindowLayoutItem[]

An array of all the group's children which can only of type window.

config any

An object containing various element settings.

type "group"

The type of the workspace element.

GroupLockConfigobject

Description

A config object which provides fine grain control when locking a group

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the group

allowDropBottom boolean

Controls the users ability to drop windows in bottom zone of the group

allowDropHeader boolean

Controls the users ability to drop windows in header zone of the group

allowDropLeft boolean

Controls the users ability to drop windows in left zone of the group

allowDropRight boolean

Controls the users ability to drop windows in right zone of the group

allowDropTop boolean

Controls the users ability to drop windows in top zone of the group

allowExtract boolean

Blocks the users ability to extract windows from the group

allowReorder boolean

Blocks the ussers ability to reorder windows from the group

showAddWindowButton boolean

Controls the visibility of the add window buttons (the ones with the plus icon) located in the group header

showEjectButton boolean

Controls the visibility of the eject button located in the group header

showMaximizeButton boolean

Controls the visibility of the maximize/restore button located in the group header

MoveConfigobject

Description

An object defining the position parameters of a frame.

Properties

Property Type Default Required Description
left number

The targeted left value

relative boolean

Toggles whether or not the provided top and left values should be treated as absolute or relative to the current values.

top number

The targeted top value

NewFrameConfigobject

Description

An object describing the possible settings when defining a new frame.

Properties

Property Type Default Required Description
bounds { top?: number; left?: number; width?: number; height?: number; }

An object describing the possible settings when defining a new frame.

frameId string

A string which will be used as an id of the new frame. The call will reject if a frame with id already exists

ResizeConfigobject

Description

An object defining the resize parameters of a frame.

Properties

Property Type Default Required Description
height number

The targeted height value

relative boolean

Toggles whether or not the provided width and height values should be treated as absolute or relative to the current values.

width number

The targeted width value

RestoreWorkspaceConfigobject

Description

An object containing all the possible settings when restoring a workspace from a layout.

Properties

Property Type Default Required Description
applicationName string

The application name of the workspace app that should be used for the new frame (available only for Glue42 Enterprise)

context object

An object which will be set as the window context of all windows inside this workspace.

frameId string

A string id of an existing frame. If provided, this workspace will be opened in that specific frame

icon string

Sets the icon related for the workspace. The icon will be used for example for pinned workspaces.

isPinned boolean

Controls whether the workspace will be opened in a pinned or in a normal state

isSelected boolean

Controls whether the workspace will be focused or not in the frame when opened

loadingStrategy LoadingStrategy
newFrame boolean | NewFrameConfig

A setting used to declare that the workspace must be in a new frame and also provide options for that new frame

noTabHeader boolean

Opens the workspace without a workspace tab element

positionIndex number

Specifies where in the frame should the workspace be placed

reuseWorkspaceId string

Used for replacing the specified workspace instead of creating a new one

title string

The title of the new workspace.

RestoreWorkspaceDefinitionobject

Description

An object describing the possible options when restoring a workspace

Properties

Property Type Default Required Description
name string

The name of a saved workspace layout, which will be restored.

restoreOptions RestoreWorkspaceConfig

An optional object containing various workspace restore options.

Rowobject

Description

An object describing a row type workspace box

Properties

Property Type Default Required Description
allowSplitters boolean

Indicates if dragging of splitters is allowed in the row

children WorkspaceElement[]

A collection containing the immediate children of this box

frame Frame

An object representing the frame containing this box

isPinned boolean

Indicates whether or not the row is pinned

maximizationBoundary boolean

If set to true any child that is maximized will have its width and height constricted to the current element's size

parent Workspace | Row | Column | Group

An object representing this box's parent

type "row"
workspace Workspace

An object representing the workspace containing this box

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • close
  • lock
  • maximize
  • onLockConfigurationChanged
  • removeChild
  • restore
  • setHeight
  • setMaximizationBoundary

addColumnmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Column>

Description

Adds a new column box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addGroupmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Group>

Description

Adds a new group box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addRowmethod

Signature

(definition?: BoxBuilder | BoxDefinition) => Promise<Row>

Description

Adds a new row box to this box.

Parameters

Name Type Required Description
definition BoxBuilder | BoxDefinition

An object describing the type of the requested builder, alongside other settings.

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>

Description

Opens a new window inside this box and loads it's content.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

An object describing the requested window.

closemethod

Signature

() => Promise<void>

Description

Closes this box all of it's children.

lockmethod

Signature

(config?: RowLockConfig | ((config: RowLockConfig) => RowLockConfig)) => Promise<void>

Description

Locks the row using a provided config object, which restricts various modification functionalities of the row

Parameters

Name Type Required Description
config RowLockConfig | ((config: RowLockConfig) => RowLockConfig)

This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

maximizemethod

Signature

() => Promise<void>

Description

Maximizes this box relative to it's parent box.

onLockConfigurationChangedmethod

Signature

(callback: (config: RowLockConfig) => void) => Promise<Unsubscribe>

Description

Notifies when the a change in the lock configuration of the row has been made

Parameters

Name Type Required Description
callback (config: RowLockConfig) => void

Callback function to handle the event. Receives the new lock configuration as a parameter

removeChildmethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first immediate child of this box which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for immediate child of this box.

restoremethod

Signature

() => Promise<void>

Description

Restores this box, if previously maximized.

setHeightmethod

Signature

(height: number) => Promise<void>

Description

Sets a new height for the row

Parameters

Name Type Required Description
height number

A required number which should be the new height of the row

setMaximizationBoundarymethod

Signature

(config: SetMaximizationBoundaryConfig) => Promise<void>

Description

Changes whether the row is a maximizationBoundary

Parameters

Name Type Required Description
config SetMaximizationBoundaryConfig

Object which specifies how the maximizationBoundary behavior should be changed

RowDefinitionConfigobject

Description

A config object which defines various row-specific settings

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the row

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized within the row

isPinned boolean

Specifies if a row should be pinned. A pinned row will always maintain it's height, unless the user manually changes it by dragging the splitter

maxHeight number

Specifies the maximum height in pixels for the row

maximizationBoundary boolean

If set to true any child that is maximized will have its width and height constricted to the current element's size

minHeight number

Specifies the minimum height in pixels for the row

RowLayoutItemobject

Description

An object describing a row definition in a workspace layout.

Properties

Property Type Default Required Description
children (ColumnLayoutItem | RowLayoutItem | GroupLayoutItem | WindowLayoutItem)[]

An array of all the row's children.

config any

An object containing various element settings.

type "row"

The type of the workspace element.

RowLockConfigobject

Description

A config object which provides fine grain control when locking a row

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the row

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized within the row

SetMaximizationBoundaryConfigobject

Properties

Property Type Default Required Description
enabled boolean

Represents the new value of the maximizationBoundary property

WindowLayoutItemobject

Description

An object describing a window definition in a workspace layout.

Properties

Property Type Default Required Description
config WindowLayoutItemConfig

A configuration object for the window layout

type "window"

The type of the workspace element.

WindowLayoutItemConfigobject

Properties

Property Type Default Required Description
appName string

The name of the application as defined in Glue Desktop

context any

The context of the window used when restoring the window

title string

The title of the window

url string

The url of the window, in case it is not a defined as an application.

windowId string

The id of the window

Workspaceobject

Description

An object describing a workspace

Properties

Property Type Default Required Description
allowDrop boolean

Indicates if dropping outsize windows to the workspace is allowed

allowDropBottom boolean

Indicates if dropping windows in the bottom-most zone of the workspace is allowed

allowDropLeft boolean

Indicates if dropping windows in the left-most zone of the workspace is allowed

allowDropRight boolean

Indicates if dropping windows in the right-most zone of the workspace is allowed

allowDropTop boolean

Indicates if dropping windows in the top-most zone of the workspace is allowed

allowExtract boolean

Indicates if extracting windows from the workspace is allowed

allowSplitters boolean

Indicates if dragging of splitters is allowed in the workspace

allowWindowReorder boolean

Indicates if reordering windows in the workspace is allowed

allowWorkspaceTabExtract boolean

Controls whether the workspace tab can be extracted (available only for Glue42 Enterprise)

allowWorkspaceTabReorder boolean

Controls whether the workspace tab can be reordered

children WorkspaceElement[]

A collection containing the immediate children of this workspace

frame Frame

An object representing the frame containing this workspace

frameId string

The string id of the frame containing this workspace

height number

Returns the current height of the workspace

icon string

The icon related to the workspace in the same format as it was passed

id string

An unique string identifier of the workspace

isHibernated boolean

Indicates if the workspace is hibernated

isPinned boolean

Indicates if the workspace is in a pinned state or not

isSelected boolean

Indicates if the workspace is selected in its frame. Can be undefined if using with an older version of GlueDesktop or GlueCore

layoutName string

The name of the originating layout of the current workspace if any

maxHeight number

Returns the maximum height of the workspace, calculated by the constraints of all elements inside it

maxWidth number

Returns the maximum width of the workspace, calculated by the constraints of all elements inside it

minHeight number

Returns the minimum height of the workspace, calculated by the constraints of all elements inside it

minWidth number

Returns the minimum width of the workspace, calculated by the constraints of all elements inside it

positionIndex number

The position of this workspace regarding it's siblings

showAddWindowButtons boolean

Indicates if the window add buttons within this workspace are visible to the user

showCloseButton boolean

Indicates if the close button for this workspace is visible to the user

showEjectButtons boolean

Indicates if the eject buttons of the windows within this workspace are visible to the user

showSaveButton boolean

Indicates if the save button for this workspace is visible to the user

showWindowCloseButtons boolean

Indicates if the close buttons of the windows within this workspace are visible to the user

title string

The title of the workspace

width number

Returns the current width of the workspace

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • bundleToColumn
  • bundleToRow
  • close
  • focus
  • getAllBoxes
  • getAllColumns
  • getAllGroups
  • getAllRows
  • getAllWindows
  • getBox
  • getColumn
  • getContext
  • getGroup
  • getIcon
  • getRow
  • getWindow
  • hibernate
  • hideLoadingAnimation
  • lock
  • onClosed
  • onContextUpdated
  • onLockConfigurationChanged
  • onWindowAdded
  • onWindowLoaded
  • onWindowMaximized
  • onWindowRemoved
  • onWindowRestored
  • pin
  • refreshReference
  • remove
  • removeChild
  • resume
  • saveLayout
  • setContext
  • setIcon
  • setTitle
  • showLoadingAnimation
  • snapshot
  • unpin
  • updateContext

addColumnmethod

Signature

(definition?: BoxDefinition) => Promise<Column>

Description

Adds a new column to this workspace.

Parameters

Name Type Required Description
definition BoxDefinition

An object describing the available column settings.

addGroupmethod

Signature

(definition?: BoxDefinition) => Promise<Group>

Description

Adds a new group to this workspace.

Parameters

Name Type Required Description
definition BoxDefinition

An object describing the available group settings.

addRowmethod

Signature

(definition?: BoxDefinition) => Promise<Row>

Description

Adds a new row to this workspace.

Parameters

Name Type Required Description
definition BoxDefinition

An object describing the available row settings.

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => Promise<WorkspaceWindow>

Description

Adds a new window to this workspace.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

An object describing the available window settings.

bundleToColumnmethod

Signature

() => Promise<void>

Description

Transforms this workspace into a workspace with one immediate child of type column and all existing elements are inserted as a child to that row.

bundleToRowmethod

Signature

() => Promise<void>

Description

Transforms this workspace into a workspace with one immediate child of type row and all existing elements are inserted as a child to that row.

closemethod

Signature

() => Promise<void>

Description

Closes this workspace and all of it's children.

focusmethod

Signature

() => Promise<void>

Description

Gives focus to this workspace.

getAllBoxesmethod

Signature

(predicate?: (box: WorkspaceBox) => boolean) => WorkspaceBox[]

Description

Returns all boxes in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all boxes.

Parameters

Name Type Required Description
predicate (box: WorkspaceBox) => boolean

A filtering function (predicate) called for each box present in this workspace.

getAllColumnsmethod

Signature

(predicate?: (columns: Column) => boolean) => Column[]

Description

Returns all columns in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all column.

Parameters

Name Type Required Description
predicate (columns: Column) => boolean

A filtering function (predicate) called for each column present in this workspace.

getAllGroupsmethod

Signature

(predicate?: (group: Group) => boolean) => Group[]

Description

Returns all groups in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all groups.

Parameters

Name Type Required Description
predicate (group: Group) => boolean

A filtering function (predicate) called for each group present in this workspace.

getAllRowsmethod

Signature

(predicate?: (row: Row) => boolean) => Row[]

Description

Returns all rows in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all rows.

Parameters

Name Type Required Description
predicate (row: Row) => boolean

A filtering function (predicate) called for each row present in this workspace.

getAllWindowsmethod

Signature

(predicate?: (window: WorkspaceWindow) => boolean) => WorkspaceWindow[]

Description

Returns all windows in this workspace, which satisfy the provided predicate. If no predicate was provided, will return all windows.

Parameters

Name Type Required Description
predicate (window: WorkspaceWindow) => boolean

A filtering function (predicate) called for each window present in this workspace.

getBoxmethod

Signature

(predicate: (box: WorkspaceBox) => boolean) => WorkspaceBox

Description

Returns the first box in this workspace, which satisfies the provided predicate.

Parameters

Name Type Required Description
predicate (box: WorkspaceBox) => boolean

A filtering function (predicate) called for each box present in this workspace.

getColumnmethod

Signature

(predicate: (column: Column) => boolean) => Column

Description

Returns the first column in this workspace, which satisfies the provided predicate.

Parameters

Name Type Required Description
predicate (column: Column) => boolean

A filtering function (predicate) called for each column present in this workspace.

getContextmethod

Signature

() => Promise<any>

Description

Gets the context for this workspace.

getGroupmethod

Signature

(predicate: (group: Group) => boolean) => Group

Description

Returns the first group in this workspace, which satisfies the provided predicate.

Parameters

Name Type Required Description
predicate (group: Group) => boolean

A filtering function (predicate) called for each group present in this workspace.

getIconmethod

Signature

() => Promise<string>

Description

Returns the workspace icon

getRowmethod

Signature

(predicate: (row: Row) => boolean) => Row

Description

Returns the first row in this workspace, which satisfies the provided predicate.

Parameters

Name Type Required Description
predicate (row: Row) => boolean

A filtering function (predicate) called for each row present in this workspace.

getWindowmethod

Signature

(predicate: (window: WorkspaceWindow) => boolean) => WorkspaceWindow

Description

Returns the first window in this workspace, which satisfies the provided predicate.

Parameters

Name Type Required Description
predicate (window: WorkspaceWindow) => boolean

A filtering function (predicate) called for each window present in this workspace.

hibernatemethod

Signature

() => Promise<void>

Description

Puts the workspace in a hibernated state. All the windows are closed, but the workspace structure remains.

hideLoadingAnimationmethod

Signature

() => Promise<void>

Description

Hides the loading animation of the workspace (supported only in Glue42 Enterprise)

lockmethod

Signature

(config?: WorkspaceLockConfig | ((config: WorkspaceLockConfig) => WorkspaceLockConfig)) => Promise<void>

Description

Locks the workspace using a provided config object, which restricts various modification functionalities of the workspace

Parameters

Name Type Required Description
config WorkspaceLockConfig | ((config: WorkspaceLockConfig) => WorkspaceLockConfig)

This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

onClosedmethod

Signature

(callback: (closed?: WorkspaceClosedData) => void) => Promise<Unsubscribe>

Description

Notifies when this workspace is closed.

Parameters

Name Type Required Description
callback (closed?: WorkspaceClosedData) => void

Callback function to handle the event.

onContextUpdatedmethod

Signature

(callback: (data: any) => void) => Promise<Unsubscribe>

Description

Notifies when the context for this workspace was updated.

Parameters

Name Type Required Description
callback (data: any) => void

Callback function to handle the event.

onLockConfigurationChangedmethod

Signature

(callback: (config: WorkspaceLockConfig) => void) => Promise<Unsubscribe>

Description

Notifies when the a change in the lock configuration of the workspace has been made

Parameters

Name Type Required Description
callback (config: WorkspaceLockConfig) => void

Callback function to handle the event. Receives the new lock configuration as a parameter.

onWindowAddedmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a new window was added to this workspace and returns an unsubscribe function. An added window means that the window has a place in the workspace (it is a valid workspace element), but does not guarantee that the contents of the window are loaded.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the added window as a parameter.

onWindowLoadedmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window's content was loaded in this workspace and returns an unsubscribe function. A loaded window is a window, which was added to a workspace, it's contents were loaded and is present in the windows collection.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the loaded window as a parameter.

onWindowMaximizedmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window was maximized in this workspace and returns an unsubscribe function. A maximized window means that the window has been maximized either by an API call or from the maximize button by the user.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the maximized window as a parameter.

onWindowRemovedmethod

Signature

(callback: (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void) => Promise<Unsubscribe>

Description

Notifies when a window was removed from this workspace and returns an unsubscribe function. Not supported in Glue42 Core

Parameters

Name Type Required Description
callback (removed: { windowId?: string; workspaceId: string; frameId: string; }) => void

Callback function to handle the event. Receives an object containing the ids of the removed window, and the respective workspace and frame as a parameter.

onWindowRestoredmethod

Signature

(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>

Description

Notifies when a window was restored in this workspace and returns an unsubscribe function. A restored window means that the window has been restored from a maximized state either by an API call or from the restored button by the user.

Parameters

Name Type Required Description
callback (window: WorkspaceWindow) => void

Callback function to handle the event. Receives the restored window as a parameter.

pinmethod

Signature

(options?: WorkspacePinOptions) => Promise<void>

Description

Changes the state of the workspace to pinned - moves the workspace tab to the index before all unpinned tabs, removes the save button, title, close button and shows the workspace icon

Parameters

Name Type Required Description
options WorkspacePinOptions
  • object which controls the pinning

refreshReferencemethod

Signature

() => Promise<void>

Description

Updates this workspace reference to reflect the current state of the workspace.

removemethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first element of this workspace which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for each element in this workspace.

removeChildmethod

Signature

(predicate: (child: WorkspaceElement) => boolean) => Promise<void>

Description

Removes the first immediate child of this workspaces which satisfies the predicate.

Parameters

Name Type Required Description
predicate (child: WorkspaceElement) => boolean

A filtering function (predicate) called for immediate child of this workspace.

resumemethod

Signature

() => Promise<void>

Description

Resumes a hibernated workspace. All the windows prior to the hibernation are reloaded.

saveLayoutmethod

Signature

(name: string, config?: { saveContext?: boolean; }) => Promise<void>

Description

Saves the current workspace structure as a layout. In Glue42 Core this will throw an error if the name matches the name of a read-only layout.

Parameters

Name Type Required Description
name string

A string representing the name (also ID) of the new workspace layout.

config { saveContext?: boolean; }

setContextmethod

Signature

(data: any) => Promise<void>

Description

Sets the context for this workspace. This operation will completely overwrite the existing context.

Parameters

Name Type Required Description
data any

The new context value.

setIconmethod

Signature

(icon: string) => Promise<void>

Description

Changes the workspace icon to the specified one

Parameters

Name Type Required Description
icon string

setTitlemethod

Signature

(title: string) => Promise<void>

Description

Sets a new title for this workspace.

Parameters

Name Type Required Description
title string

The new title value.

showLoadingAnimationmethod

Signature

() => Promise<void>

Description

Shows the loading animation of the workspace (supported only in Glue42 Enterprise)

snapshotmethod

Signature

() => Promise<WorkspaceSnapshot>

Description

Returns a snapshot object describing the full current state of this workspace.

unpinmethod

Signature

() => Promise<void>

Description

Changes the state of the workspace to normal - moves the workspace tab to the index after all pinned tabs, returns the save button, title, close button and hides the workspace icon

updateContextmethod

Signature

(data: any) => Promise<void>

Description

Updated the context for this workspace. This operation will merge the existing context with the provided value.

Parameters

Name Type Required Description
data any

The context value to update.

WorkspaceBuilderobject

Description

An object describing a builder user to create workspaces

Methods

  • addColumn
  • addGroup
  • addRow
  • addWindow
  • create

addColumnmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new column to the calling workspace. Returns the new column.

Parameters

Name Type Required Description
definition BoxDefinition

addGroupmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new group to the calling workspace. Returns the new group.

Parameters

Name Type Required Description
definition BoxDefinition

addRowmethod

Signature

(definition?: BoxDefinition) => BoxBuilder

Description

Adds a new row to the calling workspace. Returns the new row.

Parameters

Name Type Required Description
definition BoxDefinition

addWindowmethod

Signature

(definition: WorkspaceWindowDefinition) => WorkspaceBuilder

Description

Adds a new window to the calling workspace. Returns the calling workspace.

Parameters

Name Type Required Description
definition WorkspaceWindowDefinition

createmethod

Signature

(config?: WorkspaceCreateConfig) => Promise<Workspace>

Description

Creates a new workspace using the builder as a blueprint for structure and contents.

Parameters

Name Type Required Description
config WorkspaceCreateConfig

An object containing workspace creating options.

WorkspaceClosedDataobject

Properties

Property Type Default Required Description
frameBounds FrameBounds
frameId string
workspaceId string

WorkspaceComponentobject

Description

An object describing a workspace definition in a workspace layout.

Properties

Property Type Default Required Description
application string

The name of the workspaces app with which the layout is associated (available only in Glue42 Enterprise)

state WorkspaceLayoutComponentState
type "Workspace"

The type of the workspace element.

WorkspaceConfigobject

Description

Workspace-specific options.

Properties

Property Type Default Required Description
allowDrop boolean

Controls the users ability to drop outside windows in the workspace

allowDropBottom boolean

Controls the users ability to drop windows in the bottom-most zone of the workspace

allowDropLeft boolean

Controls the users ability to drop windows in the left-most zone of the workspace

allowDropRight boolean

Controls the users ability to drop windows in the right-most zone of the workspace

allowDropTop boolean

Controls the users ability to drop windows in the top-most zone of the workspace

allowExtract boolean

Controls the users ability to extract windows from the workspace

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized

allowWindowReorder boolean

Control the users ability to reorder windows in the workspace

allowWorkspaceTabExtract boolean

Controls whether a workspace tab can be extracted from the frame (available only for Glue42 Enterprise)

allowWorkspaceTabReorder boolean

Controls whether a workspace tab can be reordered in the frame

icon string

Sets the icon related for the workspace. The icon will be used for example for pinned workspaces.

isPinned boolean

Controls whether the workspace will be opened in a pinned or in a normal state

isSelected boolean

Controls whether the workspace will be focused or not in the frame when opened

loadStrategy LoadingStrategy

Controls when the windows inside this workspace should load when the workspace is created or restored

noTabHeader boolean

Provides the opportunity to open a workspace with no tab header

position number

Position of the workspace in relation to it's siblings in the frame.

positionIndex number

Specifies where in the frame should the workspace be placed

reuseWorkspaceId string

Used for replacing the specified workspace instead of creating a new one

showAddWindowButtons boolean

Controls the visibility of all the add window buttons (the ones with the plus icon) located in the group headers

showCloseButton boolean

Controls the visibility of the close button located in the workspaces tab

showEjectButtons boolean

Controls the visibility of all eject buttons located in the groups' headers

showSaveButton boolean

Controls the visibility of the save workspace button located in the workspace tab

showWindowCloseButtons boolean

Controls the visibility of all close button located in the windows' tab elements

title string

A title of the workspace.

WorkspaceCreateConfigobject

Description

An object containing settings applied when creating a new workspace.

Properties

Property Type Default Required Description
saveLayout boolean

A boolean which defines whether or not the workspace should also be saved as a layout when created.

WorkspaceDefinitionobject

Description

An object describing the possible options when defining a new workspace

Properties

Property Type Default Required Description
children (BoxDefinition | WorkspaceWindowDefinition)[]

An array of all the workspace's children which will also be opened.

config WorkspaceConfig

Workspace-specific options.

context any

An object which will be set as the window context of all windows inside this workspace.

frame FrameTargetingOptions

Options regarding the frame where this workspace will be opened in.

WorkspaceLayoutobject

Description

An object describing a workspace layout.

Properties

Property Type Default Required Description
components WorkspaceComponent[]

The components of the workspace layout. This collection can contain only one element and it must be a workspace component.

metadata any

An object containing various layout metadata.

name string

An unique string name and identifier of the layout

type "Workspace"

The type of the workspace element.

WorkspaceLayoutComponentStateobject

Properties

Property Type Default Required Description
children (ColumnLayoutItem | RowLayoutItem | GroupLayoutItem | WindowLayoutItem)[]

An array of all the workspace's children.

config any

An object containing various element settings.

context any

An object containing the context of the workspace layout

WorkspaceLayoutsAPIobject

Description

An API enabling basic CRUD workspaces actions

Methods

  • delete
  • export
  • getSummaries
  • import
  • onRemoved
  • onSaved
  • save

deletemethod

Signature

(name: string) => Promise<void>

Description

Deletes a previously saved layout. In Glue42 Core delete will fail with an error in trying to delete a read-only layout, this is a layout defined in the glue.layouts.json file.

Parameters

Name Type Required Description
name string

The name of the layout to delete.

exportmethod

Signature

(predicate?: (layout: WorkspaceLayout) => boolean) => Promise<WorkspaceLayout[]>

Description

Returns all layouts which satisfy the predicate. This collection of all saved layouts includes the layouts structure. If no predicate is provided, it returns all saved layouts.

Parameters

Name Type Required Description
predicate (layout: WorkspaceLayout) => boolean

A filtering function (predicate) called for each saved layout.

getSummariesmethod

Signature

() => Promise<WorkspaceLayoutSummary[]>

Description

Returns a collection of summarized layouts data. This data contains all the standard data excluding the actual structure of the layout. This is helpful in cases where a simple query of existing layouts is needed without the complexity of transmitting the full layouts structure.

importmethod

Signature

(layouts: WorkspaceLayout[], mode?: ImportMode) => Promise<void>

Description

Saves the provided layouts into Glue42. In Glue42 Core this will fail with an error if a provided layout's name matches a read-only layout.

Parameters

Name Type Required Description
layouts WorkspaceLayout[]

A collection of layouts to add to Glue42.

mode ImportMode

onRemovedmethod

Signature

(callback: (layout: WorkspaceLayout) => void) => Promise<Unsubscribe>

Description

Notifies when a layouts has been removed.

Parameters

Name Type Required Description
callback (layout: WorkspaceLayout) => void

Callback function to handle the event. Receives the removed layout as a parameter.

onSavedmethod

Signature

(callback: (layout: WorkspaceLayout) => void) => Promise<Unsubscribe>

Description

Notifies when a layouts has been saved. This event is fired when a new layout has been saved and an existing layout has been updated.

Parameters

Name Type Required Description
callback (layout: WorkspaceLayout) => void

Callback function to handle the event. Receives the saved layout as a parameter.

savemethod

Signature

(config: WorkspaceLayoutSaveConfig) => Promise<WorkspaceLayout>

Description

Saves an existing, open workspace as a layout.

Parameters

Name Type Required Description
config WorkspaceLayoutSaveConfig

An object describing the name of the layout and the id of the workspace, whose structure will be saved.

WorkspaceLayoutSaveConfigobject

Description

A configuration object used to save a current workspace as a layout

Properties

Property Type Default Required Description
metadata object

Object which will be saved as part of the layout

name string

A string used as name (doubles as id) of the layout, which is later used when restoring it.

saveContext boolean

Toggles whether or not the current workspace context should be saved in the layout

workspaceId string

A string representing the id of the workspace whose structure should be saved into a layout.

WorkspaceLayoutSummaryobject

Description

An object describing a workspace layout without the underlying structure

Properties

Property Type Default Required Description
applicationName string

The name of the workspaces app with which the layout is associated (available only in Glue42 Enterprise)

name string

An unique string name and identifier of the layout

WorkspaceLockConfigobject

Description

A config object which provides fine grain control when locking a workspace

Properties

Property Type Default Required Description
allowDrop boolean

(Enterprise only) Controls the ability of the users to drop outside windows in the workspace

allowDropBottom boolean

Controls the users ability to drop windows in bottom-most zone of the workspace

allowDropLeft boolean

Controls the users ability to drop windows in left-most zone of the workspace

allowDropRight boolean

Controls the users ability to drop windows in right-most zone of the workspace

allowDropTop boolean

Controls the users ability to drop windows in top-most zone of the workspace

allowExtract boolean

Controls the ability of the users to extract (or rearrange) windows inside the workspace

allowSplitters boolean

Prevents the splitters for being draggable, so the windows cannot be resized

allowWindowReorder boolean

Control the users ability to reorder windows in the workspace

allowWorkspaceTabExtract boolean

Controls the whether the workspace tab can be extracted (available only for Glue42 Enterprise)

allowWorkspaceTabReorder boolean

Controls the whether the workspace tab can be reordered

showAddWindowButtons boolean

Controls the visibility of all the add window buttons (the ones with the plus icon) located in the group headers

showCloseButton boolean

Controls the visibility of the close button located in the workspaces tab

showEjectButtons boolean

Controls the visibility of all eject buttons located in the groups' headers

showSaveButton boolean

Controls the visibility of the save workspace button located in the workspace tab

showWindowCloseButtons boolean

Controls the visibility of all close button located in the windows' tab elements

WorkspacePinOptionsobject

Properties

Property Type Default Required Description
icon string

Icon which will be used for the pinned workspace.

WorkspaceSnapshotobject

Description

An object describing the complete state of a workspace at the time when the object was created

Properties

Property Type Default Required Description
children (ColumnLayoutItem | RowLayoutItem | GroupLayoutItem | WindowLayoutItem)[]

An array of all the workspace's children.

config any

An object containing various element settings.

context any

An object containing the context of the workspace layout

id string

A string identifier unique to each workspace

WorkspaceSummaryobject

Description

An object describing the basic details of a workspace

Properties

Property Type Default Required Description
allowDrop boolean

Indicates if dropping outsize windows to the workspace is allowed

allowDropBottom boolean

Indicates if dropping windows in the bottom-most zone of the workspace is allowed

allowDropLeft boolean

Indicates if dropping windows in the left-most zone of the workspace is allowed

allowDropRight boolean

Indicates if dropping windows in the right-most zone of the workspace is allowed

allowDropTop boolean

Indicates if dropping windows in the top-most zone of the workspace is allowed

allowExtract boolean

Indicates if extracting windows from the workspace is allowed

allowSplitters boolean

Indicates if dragging of splitters is allowed in the workspace

allowWindowReorder boolean

Indicates if reordering windows in the workspace is allowed

allowWorkspaceTabExtract boolean

Controls whether the workspace tab can be extracted (available only for Glue42 Enterprise)

allowWorkspaceTabReorder boolean

Controls whether the workspace tab can be reordered

frameId string

The string id of the frame containing this workspace

height number

Returns the current height of the workspace

id string

An unique string identifier of the workspace

isHibernated boolean

Indicates if the workspace is hibernated

isSelected boolean

Indicates if the workspace is selected in its frame. Can be undefined if using with an older version of GlueDesktop or GlueCore

layoutName string

The name of the originating layout of the current workspace if any

maxHeight number

Returns the maximum height of the workspace, calculated by the constraints of all elements inside it

maxWidth number

Returns the maximum width of the workspace, calculated by the constraints of all elements inside it

minHeight number

Returns the minimum height of the workspace, calculated by the constraints of all elements inside it

minWidth number

Returns the minimum width of the workspace, calculated by the constraints of all elements inside it

positionIndex number

The position of this workspace regarding it's siblings

showAddWindowButtons boolean

Indicates if the window add buttons within this workspace are visible to the user

showCloseButton boolean

Indicates if the close button for this workspace is visible to the user

showEjectButtons boolean

Indicates if the eject buttons of the windows within this workspace are visible to the user

showSaveButton boolean

Indicates if the save button for this workspace is visible to the user

showWindowCloseButtons boolean

Indicates if the close buttons of the windows within this workspace are visible to the user

title string

The title of the workspace

width number

Returns the current width of the workspace

WorkspaceWindowobject

Description

An object describing a window part of an existing workspace

Properties

Property Type Default Required Description
allowExtract boolean

Show whether or not the user can extract the specified window

allowReorder boolean

Show whether or not the user can reorder the specified window

appName string

The application name of the window if it was registered as an application

elementId string

An unique string identifier of the workspace element that hosts the window

focused boolean

A flag showing whether or not the window has focus

frame Frame

An object representing the frame, which contains this window

frameId string

The string id of the frame containing this window

height number

Indicates the current height of the window

id string

An unique string identifier of the window

isLoaded boolean

A flag showing whether or not the window's content is loaded

isMaximized boolean

A flag showing whether or not the window is maximized within it's box

isSelected boolean

A flag showing whether or not the window is selected

maxHeight number

Indicates the configured maximum height of the window

maxWidth number

Indicates the configured maximum width of the window

minHeight number

Indicates the configured height width of the window

minWidth number

Indicates the configured minimum width of the window

parent Workspace | Row | Column | Group

An object representing the parent box, which contains this window

positionIndex number

The position of this window regarding it's siblings

showCloseButton boolean

Indicates whether the close button which is located in the window's tab is visible

title string

The title of the window

type "window"

The type of the workspace element

width number

Indicates the current width of the window

workspace Workspace

An object representing the workspace, which contains this window

workspaceId string

The string id of the workspace containing this window

Methods

  • close
  • eject
  • focus
  • forceLoad
  • getGdWindow
  • lock
  • maximize
  • moveTo
  • onLockConfigurationChanged
  • onRemoved
  • restore
  • setSize
  • setTitle

closemethod

Signature

() => Promise<void>

Description

Closes the workspace window.

ejectmethod

Signature

() => Promise<any>

Description

Removes a workspace window from the workspace and turns it into a standalone window.

focusmethod

Signature

() => Promise<void>

Description

Gives focus to the window.

forceLoadmethod

Signature

() => Promise<void>

Description

Forces a window, which was added to the workspace to load it's contents.

getGdWindowmethod

Signature

() => any

Description

Returns the underlying GDWindow (Enterprise) or WebWindow (Core) of the workspace window.

lockmethod

Signature

(config?: WorkspaceWindowLockConfig | ((config: WorkspaceWindowLockConfig) => WorkspaceWindowLockConfig)) => Promise<void>

Description

Locks the window using a provided config object, which restricts various modification functionalities of the window

Parameters

Name Type Required Description
config WorkspaceWindowLockConfig | ((config: WorkspaceWindowLockConfig) => WorkspaceWindowLockConfig)

This can be either an object or a function. When the object is provided, it overrides all other lock properties. When a function is provided, it will be called with the current lock settings and it should return a lock config, which will override the current settings. The function is recommended in all cases where overriding of the settings is not desired.

maximizemethod

Signature

() => Promise<void>

Description

Maximizes the workspace window relative to it's parent box.

moveTomethod

Signature

(box: WorkspaceBox) => Promise<void>

Description

Moves the workspace window to a new box. In Glue42 Core this box must be part of the same frame.

Parameters

Name Type Required Description
box WorkspaceBox

An object describing the new box of the window.

onLockConfigurationChangedmethod

Signature

(callback: (config: WorkspaceWindowLockConfig) => void) => Promise<Unsubscribe>

Description

Notifies when a change in the lock configuration of the workspace window has been made

Parameters

Name Type Required Description
callback (config: WorkspaceWindowLockConfig) => void

Callback function to handle the event. Receives the new lock configuration as a parameter

onRemovedmethod

Signature

(callback: () => void) => Promise<Unsubscribe>

Description

Notifies when this window was removed from the workspace.

Parameters

Name Type Required Description
callback () => void

Callback function to handle the event.

restoremethod

Signature

() => Promise<void>

Description

Restores a previously maximized workspace window.

setSizemethod

Signature

(sizeConfig: ElementResizeConfig) => Promise<void>

Description

Sets a new size for the window

Parameters

Name Type Required Description
sizeConfig ElementResizeConfig

A config object which should be the new size of the window.

setTitlemethod

Signature

(title: string) => Promise<void>

Description

Sets a new title to the workspace window.

Parameters

Name Type Required Description
title string

The new title for the window.

WorkspaceWindowDefinitionobject

Description

An object describing the possible options when opening a window inside a workspace.

Properties

Property Type Default Required Description
appName string

The name of the application as defined, which will be opened.

config WorkspaceWindowDefinitionConfig

A config object which defines various workspace window-specific settings

context any

An object which will be passed to the newly created window. This object is then accessible via the Windows API

type "window"

The type of the workspace element.

windowId string

The window id of an existing standalone window, which will be dragged into the workspace.

WorkspaceWindowDefinitionConfigobject

Description

A config object which defines various workspace window-specific settings

Properties

Property Type Default Required Description
allowExtract boolean

Blocks the users ability to extract the specified window

allowReorder boolean

Blocks the users ability to reorder the specified window

maxHeight number

Specifies the maximum height in pixels for the workspace window

maxWidth number

Specifies the maximum width in pixels for the workspace window

minHeight number

Specifies the minimum height in pixels for the workspace window

minWidth number

Specifies the minimum width in pixels for the workspace window

showCloseButton boolean

Controls the visibility of the close button which is located in the window's tab

WorkspaceWindowLockConfigobject

Description

A config object which provides fine grain control when locking a window

Properties

Property Type Default Required Description
allowExtract boolean

Blocks the users ability to extract the specified window

allowReorder boolean

Blocks the users ability to reorder the specified window

showCloseButton boolean

Controls the visibility of the close button which is located in the window's tab

WorkspaceWindowSummaryobject

Description

An object describing the basic details of a workspace window

Properties

Property Type Default Required Description
allowExtract boolean

Show whether or not the user can extract the specified window

allowReorder boolean

Show whether or not the user can reorder the specified window

appName string

The application name of the window if it was registered as an application

elementId string

An unique string identifier of the workspace element that hosts the window

focused boolean

A flag showing whether or not the window has focus

frameId string

The string id of the frame containing this window

height number

Indicates the current height of the window

id string

An unique string identifier of the window

isLoaded boolean

A flag showing whether or not the window's content is loaded

isMaximized boolean

A flag showing whether or not the window is maximized within it's box

isSelected boolean

A flag showing whether or not the window is selected

maxHeight number

Indicates the configured maximum height of the window

maxWidth number

Indicates the configured maximum width of the window

minHeight number

Indicates the configured height width of the window

minWidth number

Indicates the configured minimum width of the window

positionIndex number

The position of this window regarding it's siblings

showCloseButton boolean

Indicates whether the close button which is located in the window's tab is visible

title string

The title of the window

type "window"

The type of the workspace element

width number

Indicates the current width of the window

workspaceId string

The string id of the workspace containing this window

FrameStateenumeration

Description

The possible window states for a workspaces frame.

  • "maximized"
  • "minimized"
  • "normal"

LoadingStrategyenumeration

Description

The loading strategy used to open new workspaces. "direct" will cause all windows to start loading at the same time as soon as the workspace loads "delayed" will cause all visible/active/selected windows to start loading at the same time as soon as the workspace loads. The rest will be loaded gradually at a specific interval. "lazy" will cause all visible/active/selected windows to start loading at the same time as soon as the workspace loads. The rest will start loading when the user selects them and not before that. /** The loading strategy used to open new workspaces. "direct" will cause all windows to start loading at the same time, "delayed"

  • "direct"
  • "delayed"
  • "lazy"

Unsubscribefunction

Signature

() => void

Description

A function which when called unsubscribes the user from further notifications.

WorkspaceBoxenumeration

Description

An object which represent a workspace box. This is an element which contains other elements, called children.

  • Row
  • Column
  • Group

WorkspaceElementenumeration

Description

An object which represent a workspace element. This is an element can be a box or a workspace window.

  • WorkspaceBox
  • WorkspaceWindow

  • © 2023 Glue42
  • Home
  • Privacy policy
  • Contact Sales
  • Glue42.com
  • Tick42.com
  • Overview
  • API
  • Box
  • BoxBuilder
  • BoxDefinition
  • BoxSummary
  • BuilderConfig
  • Column
  • ColumnDefinitionConfig
  • ColumnLayoutItem
  • ColumnLockConfig
  • ElementResizeConfig
  • EmptyFrameDefinition
  • Frame
  • FrameBounds
  • FrameClosedData
  • FrameConstraints
  • FrameFocusChangedData
  • FrameInitializationConfig
  • FrameInitializationContext
  • FrameSnapshot
  • FrameSummary
  • FrameTargetingOptions
  • Group
  • GroupDefinitionConfig
  • GroupLayoutItem
  • GroupLockConfig
  • MoveConfig
  • NewFrameConfig
  • ResizeConfig
  • RestoreWorkspaceConfig
  • RestoreWorkspaceDefinition
  • Row
  • RowDefinitionConfig
  • RowLayoutItem
  • RowLockConfig
  • SetMaximizationBoundaryConfig
  • WindowLayoutItem
  • WindowLayoutItemConfig
  • Workspace
  • WorkspaceBuilder
  • WorkspaceClosedData
  • WorkspaceComponent
  • WorkspaceConfig
  • WorkspaceCreateConfig
  • WorkspaceDefinition
  • WorkspaceLayout
  • WorkspaceLayoutComponentState
  • WorkspaceLayoutsAPI
  • WorkspaceLayoutSaveConfig
  • WorkspaceLayoutSummary
  • WorkspaceLockConfig
  • WorkspacePinOptions
  • WorkspaceSnapshot
  • WorkspaceSummary
  • WorkspaceWindow
  • WorkspaceWindowDefinition
  • WorkspaceWindowDefinitionConfig
  • WorkspaceWindowLockConfig
  • WorkspaceWindowSummary
  • FrameState
  • LoadingStrategy
  • Unsubscribe
  • WorkspaceBox
  • WorkspaceElement
Navigate
Go