Frameinterface
Describes a Frame (a Workspaces App instance).
Properties (2)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| id⚓︎ | string | x | An unique string identifier of the frame |
|
| isInitialized⚓︎ | boolean | x | Indicates whether the frame has been initialized or not |
36 Methods
close()⚓︎
(options?: FrameCloseOptions) => Promise<void>
Closes the Frame. The result from using this method in io.Connect Browser projects may vary depending on whether the browser will allow the closing operation.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | FrameCloseOptions | x | Options for closing the Frame. |
createWorkspace()⚓︎
(definition: WorkspaceDefinition, config?: WorkspaceCreateConfig) => Promise<Workspace>
Opens a new workspace in this frame based on the provided definition.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| definition⚓︎ | WorkspaceDefinition | An object describing the shape and options of the workspace. |
|
| config⚓︎ | WorkspaceCreateConfig | x | x |
getConstraints()⚓︎
() => Promise<FrameConstraints>
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.
getIcon()⚓︎
() => Promise<Icon>
Retrieves the taskbar icon of the Frame instance.
Available only in io.Connect Desktop.
hide()⚓︎
() => Promise<void>
Hides the Workspaces Frame instance if it's currently visible. Available only in io.Connect Desktop.
io.Connect Desktop 9.10init()⚓︎
(config: FrameInitializationConfig) => Promise<void>
Initializes an empty Frame with the Workspaces provided via the FrameInitializationConfig object.
The order of the Workspaces loaded in the Frame depends solely on the order in the provided array (the positionIndex property in the Workspace configuration has no effect).
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | FrameInitializationConfig | Configuration for initializing an empty |
isVisible()⚓︎
() => Promise<boolean>
Retrieves the current visibility state of the Workspaces Frame instance. Available only in io.Connect Desktop.
io.Connect Desktop 9.10move()⚓︎
(config: MoveConfig) => Promise<void>
Moves the Frame.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | MoveConfig | Options for moving the Frame. |
onClosed()⚓︎
(callback: (closed: FrameClosedData) => void) => Promise<Unsubscribe>
Notifies when this frame is closed.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (closed: FrameClosedData) => void | Callback function to handle the event. |
onClosing()⚓︎
(callback: (options: FrameClosingData) => void | Promise<void>) => Promise<Unsubscribe>
Notifies when the Frame is about to be closed. Available only in io.Connect Desktop.
io.Connect Desktop 9.9Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (options: FrameClosingData) => void | Promise<void> | Callback function for handling the event. Receives as an argument an object with options for closing the Frame. |
onFocusChanged()⚓︎
(callback: (data: FrameFocusChangedData) => void) => Promise<Unsubscribe>
Triggered when either a window in the frame is focused or the frame itself. Available only in io.Connect Desktop.
Parameters (1)
| 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. |
onInitializationRequested()⚓︎
(callback: (context?: FrameInitializationContext) => void) => Promise<Unsubscribe>
Notifies when a the frame is created without being initialized.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (context?: FrameInitializationContext) => void | Callback function to handle the event. Receives a context for the initialization request |
onMaximized()⚓︎
(callback: () => void) => Promise<Unsubscribe>
Notifies when this frame is maximized. This event is not supported in io.Connect Browser.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | () => void | Callback function to handle the event. |
onMinimized()⚓︎
(callback: () => void) => Promise<Unsubscribe>
Notifies when this frame is closed. This event is not supported in io.Connect Browser.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | () => void | Callback function to handle the event. |
onNormal()⚓︎
(callback: () => void) => Promise<Unsubscribe>
Notifies when this frame is closed. This event is not supported in io.Connect Browser.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | () => void | Callback function to handle the event. |
onWindowAdded()⚓︎
(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>
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 (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (window: WorkspaceWindow) => void | Callback function to handle the event. Receives the added window as a parameter. |
onWindowLoaded()⚓︎
(callback: (window: WorkspaceWindow) => void) => Promise<Unsubscribe>
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 (1)
| Name | Type | Required | Description |
|---|---|---|---|
| callback⚓︎ | (window: WorkspaceWindow) => void | Callback function to handle the event. Receives the loaded window as a parameter. |
onWindowRemoved()⚓︎
(callback: (removed: { windowId?: string; workspaceId: string; frameId: string }) => void) => Promise<Unsubscribe>
Notifies when a window was removed from a workspace part of this frame and returns an unsubscribe function.
Parameters (1)
| 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. |
onWorkspaceClosed()⚓︎
(callback: (closed: { frameId: string; workspaceId: string }) => void) => Promise<Unsubscribe>
Notifies when a workspace present in this frame was closed and returns an unsubscribe function.
Parameters (1)
| 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. |
onWorkspaceOpened()⚓︎
(callback: (workspace: Workspace) => void) => Promise<Unsubscribe>
onWorkspaceSelected()⚓︎
(callback: (workspace: Workspace) => void) => Promise<Unsubscribe>
registerShortcut()⚓︎
(shortcut: string, callback: () => void) => Promise<Unsubscribe>
Registers a keyboard shortcut for the current Frame.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| shortcut⚓︎ | string | Keyboard combination to register as a shortcut for the Frame (e.g., "ctrl+w"). |
|
| callback⚓︎ | () => void | Callback that will be invoked when the Frame for which the shortcut is registered is on focus and the user presses the registered keyboard combination. Available only in io.Connect Desktop. |
resize()⚓︎
(config: ResizeConfig) => Promise<void>
Resizes the Frame.
Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | ResizeConfig | Options for resizing the Frame. |
restoreWorkspace()⚓︎
(name: string, options?: RestoreWorkspaceConfig) => Promise<Workspace>
Opens a new workspace in this frame by restoring a previously saved workspace layout.
Parameters (2)
| Name | Type | Required | Description |
|---|---|---|---|
| name⚓︎ | string | The name of a saved workspace layout, which will be restored. |
|
| options⚓︎ | RestoreWorkspaceConfig | x | An optional object containing various workspace restore options. |
show()⚓︎
(config?: FrameShowConfig) => Promise<void>
Shows the Workspaces Frame instance if it has been previously hidden. Available only in io.Connect Desktop.
io.Connect Desktop 9.10Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | FrameShowConfig | x | x |
showDialog()⚓︎
<T>(options: FrameDialogOptions) => Promise<T>
Shows a dialog with a title, message, and response buttons to the user. Available only in io.Connect Desktop.
io.Connect Desktop 10.0Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| options⚓︎ | FrameDialogOptions | x |
showPopup()⚓︎
(config: PopupOptions) => Promise<any>
Creates a popup window. Available only in io.Connect Desktop.
io.Connect Desktop 10.0Parameters (1)
| Name | Type | Required | Description |
|---|---|---|---|
| config⚓︎ | PopupOptions | Options for creating a popup window. |
snapshot()⚓︎
() => Promise<FrameSnapshot>
Returns an object detailing the current state of this frame.
state()⚓︎
() => Promise<FrameState>
Returns the current state of the Frame. Available only in io.Connect Desktop.