Windows
5.21.0The Window Management API lets you create and manipulate windows and is the basis of the Application Management API. It allows users to group a set of desktop windows so that they move, maximize and minimize together. The Window Management API provides the following features, not found in any normal browser:
- 3 types of window modes: flat, tab or HTML
- Complete control and customization of the windows:
- visibility - create hidden windows, show them later;
- bounds - set window location and/or size;
- user interaction - allow a window to be sticky, enable/disable minimize/maximize/close buttons;
- add custom buttons to the windows and respond accordingly to user interaction with them;
- organize windows into tabs that the user can also tear off;
Native applications, as opposed to web applications, can have more than one window. This means that after you make your native application Glue42 enabled, your application windows do not automatically become Glue42 enabled. You can choose which windows to register (or not register) as Glue42 windows so that they can use Glue42 Enterprise functionalities.
Web and native windows are handled by Glue42 Enterprise as window abstractions. This means that:
- You can use any technology adapter we offer (JavaScript, .NET, Java, etc.) to control any window (web or native).
- From an end-user perspective, there is no difference between web or native windows.
- Feature parity is provided by the different technology adapters.
The Window Management API is accessible through the glue.windows
object.
APIobject
Description
Window Management API
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
groups | GroupsAPI | Returns the API for managing group windows. |
Methods
configuremethod
Signature
(options: WindowsConfiguration) => Promise<void>
Description
Configure global Glue42 Windows settings
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | WindowsConfiguration | configuration options. |
createFlydownmethod
Signature
(targetWindowId: string, config: FlydownOptions) => Promise<Flydown>
Description
Creates a flydown window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
targetWindowId | string | ID of the window for which to create the flydown. |
|
config | FlydownOptions | Options for creating a flydown window. |
findmethod
Signature
(name: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => GDWindow
Description
Finds a window by name.
Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | A unique window name. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional error callback to handle errors. |
findByIdmethod
Signature
(id: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => GDWindow
Description
Finds a window by ID.
Parameters
Name | Type | Required | Description |
---|---|---|---|
id | string | Window ID. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional error callback to handle errors. |
listmethod
mymethod
onTabAttachedmethod
Signature
(callback: (tabWindow: GDWindow, newTabGroupId: string, tabHeaderVisible: boolean) => void) => UnsubscribeFunction
Description
Notifies when a tab window is attached to another tab group. This is a generic event handler that provides information for both the window being attached and the group of tab windows that the tab is attached to.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (tabWindow: GDWindow, newTabGroupId: string, tabHeaderVisible: boolean) => void | Callback function to handle the event. Receives as parameters the attached tab window,
the ID of the new tab group and a |
onTabDetachedmethod
Signature
(callback: (window: GDWindow, tabGroupId: string, oldTabGroupId: string) => void) => UnsubscribeFunction
Description
Notifies you when a tab window is detached from another tab group. This is a generic event handler that provides information for both the window being detached and the group of tab windows that the tab is being detached from.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow, tabGroupId: string, oldTabGroupId: string) => void | Callback function to handle the event. Receives as parameters the detached tab window, the ID of the new tab group and a the ID of the old tab group. |
onWindowAddedmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a new window is opened. For backwards compatibility, you can also use windowAdded
.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Receives the added window as a parameter. Returns an unsubscribe function. |
onWindowFrameColorChangedmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the window frame color is changed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Receives the window instance as a parameter. Returns a |
onWindowGotFocusmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a window receives focus.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Receives the window instance as a parameter. Returns an unsubscribe function. |
onWindowLostFocusmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a window loses focus.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Receives the window instance as a parameter. Returns an unsubscribe function. |
onWindowRemovedmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a window is closed. For backwards compatibility, you can also use windowRemoved
.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Receives the removed window as a parameter. Returns an unsubscribe function. |
openmethod
Signature
(name: string, url: string, options?: WindowCreateOptions, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Opens a new Glue42 Window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | A unique window name. |
|
url | string | The window URL. |
|
options | WindowCreateOptions | Options for creating a window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional error callback to handle errors. |
readymethod
Signature
() => Promise<any>
Description
Returns a Promise
that resolves when the library is ready.
showPopupmethod
Signature
(targetWindowId: string, config: PopupOptions) => Promise<void>
Description
Creates a popup window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
targetWindowId | string | ID of the window for which to create the popup. |
|
config | PopupOptions | Options for creating a popup window. |
windowAddedmethod
AbsoluteSizeOptionsobject
Description
Absolute size for the output image when capturing a display.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
height | number | Image height. |
||
keepAspectRatio | boolean | true | Specifies whether to keep the aspect ratio of the output image when you specify |
|
width | number | Image width. |
AttachOptionsobject
Description
Window settings for a window being attached to a tab group.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
index | number | |||
selected | boolean | Whether the tab window is selected. |
Boundsobject
Description
Object describing the window bounds.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
height | number | Window height. |
||
left | number | Horizontal coordinate of the top left window corner. |
||
top | number | Vertical coordinate of the top left window corner. |
||
width | number | Window width. |
ButtonInfoobject
Description
Window buttons settings.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
buttonId | string | Unique ID for the button. |
||
imageBase64 | string | Button image in |
||
order | number | Button position. |
||
tooltip | string | Button tooltip. |
CaptureOptionsobject
Description
Options for capturing a display.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
size | AbsoluteSizeOptions | ScaleOptions | Size of the output image. Can be relative or absolute. |
CloseOptionsobject
Description
Options for closing a Glue42 Window.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
allowPrevent | boolean | |||
showDialog | boolean |
DetachOptionsobject
Description
Window settings for a window detached from a window group.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bounds | Partial<Bounds> | Window bounds. |
||
height | number | Window height. |
||
hideTabHeader | boolean | Whether to hide or show to window header. |
||
relativeDirection | RelativeDirection | Relative direction of positioning the new window. Considered only if |
||
relativeTo | GDWindow | Position the new window relatively to an existing window. |
||
width | number | Window width. |
DialogOptionsobject
Description
Options for the dialog to show.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
affirmativeButtonName | string | Name for the affirmative response button. |
||
cancelButtonName | string | Name for the canceling button. |
||
context | unknown | Context data that can be used by a custom dialog. |
||
defaultAction | "affirmative" | "negative" | "cancel" | Determines which dialog button to be the default one.
The action tied to the default button will be executed when the user presses |
||
message | string | Message to the user that the dialog will contain. |
||
mode | DialogMode | Mode for the dialog. Determines whether only the container (a Workspaces Frame, or a Glue42 Window group) of the window that is showing the dialog will be blocked for user interaction, or all visible containers (including frameless Glue42 Windows) will be blocked. (All windows within a blocked container are blocked too.) |
||
movable | boolean | If |
||
negativeButtonName | string | Name for the negative response button. |
||
showAffirmativeButton | boolean | If |
||
showCancelButton | boolean | If |
||
showNegativeButton | boolean | If |
||
size | Size | Size for the dialog to show. |
||
title | string | Title for the dialog to show. |
||
transparent | boolean | If |
||
type | string | Type of the dialog to show. Can be either a predefined Glue42 dialog type, or a custom one. |
DialogResultobject
Description
Object describing the result returned from showing the dialog.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
action | "clicked" | "closed" | The user interaction with the dialog - whether the dialog was closed or a button in it was clicked. |
||
button | "affirmative" | "negative" | "cancel" | Which button the user has clicked. |
DownloadOptionsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
autoOpenDownload | boolean | false | If |
|
autoOpenPath | boolean | false | If |
|
name | string | If specified, will be used when saving the file. |
||
silent | boolean | false | If |
DownloadResultobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
path | string | |||
size | number | |||
url | string |
DownloadSettingsobject
Description
Settings that define the window download behavior.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
autoOpenDownload | boolean | false | If |
|
autoOpenPath | boolean | false | If |
|
autoSave | boolean | true | If |
|
enable | boolean | true | If |
|
enableDownloadBar | boolean | true | If |
Flydownobject
Description
Flydown instance returned when creating flydown windows.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
destroy | () => Promise<void> | Function that clears all flydown trigger zones from the window when invoked. |
||
options | FlydownOptions | The options object used when the flydown was created. |
FlydownOptionsobject
Description
Options for creating flydown windows.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
activeArea | Bounds | Range where the flydown will remain active. |
||
horizontalOffset | number | Default horizontal offset for all flydown zones. |
||
size | Size | ((data: ShowFlydownData, cancel: () => void) => Promise<Size>) | The size of the rendered flydown window ( |
||
targetLocation | PopupTargetLocation | The location ( |
||
verticalOffset | number | Default vertical offset for all flydown zones. |
||
windowId | string | The ID of the window which will be used as a flydown window. |
||
zones | FlydownZone[] | An array of defined zones which when triggered will show a flydown window. |
FlydownZoneobject
Description
Object describing a flydown trigger zone.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bounds | Bounds | Bounds of the zone which can trigger a flydown window.
These bounds are relative to the target window, so the coordinates |
||
flydownSize | Size | ((data: ShowFlydownData, cancel: () => void) => Promise<Size>) | The size of the rendered flydown window ( |
||
id | string | Unique ID of the flydown trigger zone. |
||
targetLocation | PopupTargetLocation | The location ( |
||
windowId | string | The ID of the window which will be used as a flydown window. |
GDWindowobject
Description
Glue42 Window object.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
activityId | string | Returns the ID of the activity the window participates in ( |
||
activityWindowId | string | Returns the ID of the window if the window is an activity window ( |
||
agmInstance | Instance | The Interop instance of the window. Used for easier access to the Interop API. |
||
application | Application | The application associated with the current window. Can be |
||
bottomNeighbours | GDWindow[] | Returns bottom neighbours of the window. |
||
bounds | Bounds | Returns the bounds of the window. |
||
context | any | Returns the context of the window. |
||
frameButtons | ButtonInfo[] | Returns all frame buttons. |
||
frameColor | string | Returns the color of the window frame. |
||
frameId | string | The ID of the frame in which the window is placed |
||
group | Group | Returns the group of the window. |
||
groupId | string | Returns the ID of the group of the window. |
||
hostInstance | string | Instance | The Interop instance that the window runs in. |
||
id | string | The ID of the current window. |
||
isCollapsed | boolean | Returns |
||
isFocused | boolean | Whether the window is focused or not. |
||
isGroupHeaderVisible | boolean | Whether the header of the window group is visible or hidden. |
||
isLocked | boolean | Returns |
||
isSticky | boolean | Whether the window is sticky or not. |
||
isTabHeaderVisible | boolean | Whether the tab header of the window is visible or not. |
||
isTabSelected | boolean | Whether the tab window is selected. |
||
isVisible | boolean | Returns |
||
jumpList | JumpList | |||
leftNeighbours | GDWindow[] | Returns the left neighbours of the window. |
||
maxHeight | number | Returns the maximum height of the window. |
||
maxWidth | number | Returns the maximum width of the window. |
||
minHeight | number | Returns the minimum height of the window. |
||
minWidth | number | Returns the minimum width of the window. |
||
mode | WindowMode | Returns the mode of the window - |
||
name | string | The name of the current window. Window names are unique within Glue42. |
||
opened | boolean | Whether the window is open or not. |
||
placementSettings | PlacementSettings | Returns current placement options. |
||
rightNeighbours | GDWindow[] | Returns right neighbours of the window. |
||
screen | Screen | Returns the screen the window is on. Deprecated, use |
||
settings | WindowSettings | The settings of the current window. |
||
state | FrameState | Returns the state of the window - |
||
tabGroupId | string | The tab group ID of the current window. When several windows reside in a common tab container they have the same tab group ID. |
||
tabIndex | number | The tab index of the current window. When several windows reside in a common tab container they have different index in the group ID. |
||
tabs | GDWindow[] | Available only when the window is in |
||
title | string | The title of the current window. |
||
topNeighbours | GDWindow[] | Returns the top neighbours of the window. |
||
url | string | The URL of the current window. |
||
windowStyleAttributes | WindowSettings | Deprecated. Use |
||
windowType | "electron" | "remote" | The type of the window. |
||
zoomFactor | number | Returns the current zoom factor. |
Methods
- activate
- addFrameButton
- attachTab
- capture
- center
- close
- close
- collapse
- configure
- createFlydown
- detachTab
- download
- expand
- flash
- flashTab
- focus
- getBounds
- getChannel
- getChildWindows
- getContext
- getDisplay
- getIcon
- getParentWindow
- getTitle
- getURL
- goBack
- goForward
- hide
- hideLoader
- joinChannel
- leaveChannel
- lock
- maximize
- maximizeRestore
- minimize
- moveResize
- moveTo
- navigate
- navigate
- onAttached
- onBoundsChanged
- onClose
- onClosing
- onCollapsed
- onContextUpdated
- onDetached
- onExpanded
- onFocusChanged
- onFrameButtonAdded
- onFrameButtonClicked
- onFrameButtonRemoved
- onFrameColorChanged
- onGroupChanged
- onLockingChanged
- onMaximized
- onMinimized
- onNavigating
- onNeighboursChanged
- onNormal
- onPlacementSettingsChanged
- onRefreshing
- onStickyChanged
- onTabHeaderVisibilityChanged
- onTabSelectionChanged
- onTitleChanged
- onUrlChanged
- onVisibilityChanged
- onWindowAttached
- onWindowDetached
- onZoomFactorChanged
- place
- printToPDF
- refresh
- removeFrameButton
- resetButtons
- resizeTo
- restore
- setContext
- setFrameColor
- setIcon
- setModalState
- setOnTop
- setSizeConstraints
- setSticky
- setStyle
- setTabHeaderVisible
- setTabTooltip
- setTitle
- setVisible
- setZoomFactor
- show
- showDialog
- showLoader
- showPopup
- snap
- snap
- startDrag
- toggleCollapse
- ungroup
- unlock
- updateContext
- zoomIn
- zoomOut
activatemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Activates the current window. This is the same as calling focus()
.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
addFrameButtonmethod
Signature
(buttonInfo: ButtonInfo, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Adds a frame button to the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
buttonInfo | ButtonInfo | Window button settings. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
attachTabmethod
Signature
(tab: string | GDWindow, options?: number | AttachOptions, success?: () => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Attaches a tab window to the current tab window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
tab | string | GDWindow | The instance or the name of the tab window to attach. |
|
options | number | AttachOptions | Optional settings for the attached tab. |
|
success | () => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
capturemethod
Signature
(options: CaptureOptions) => Promise<string>
Description
Returns a screenshot of the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | CaptureOptions | Options for capturing the window. |
centermethod
closemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Closes the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
closemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | CloseOptions |
collapsemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Collapses a window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
configuremethod
Signature
(options: WindowConfiguration) => Promise<GDWindow>
Description
Configure Glue42 Window settings.
Available since version Glue42 3.12
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | WindowConfiguration | Configuration options. |
createFlydownmethod
Signature
(config: FlydownOptions) => Promise<Flydown>
Description
Creates a flydown window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
config | FlydownOptions | Options for the flydown window. |
detachTabmethod
Signature
(opt: DetachOptions, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Detaches a tab window from the current tab window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
opt | DetachOptions | Settings for the detached window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
downloadmethod
Signature
(url: string, options: DownloadOptions) => Promise<DownloadResult>
Description
Download a file.
Available since version Glue42 3.13
Parameters
Name | Type | Required | Description |
---|---|---|---|
url | string | URL/DataURL/Blob |
|
options | DownloadOptions | Download options. |
expandmethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Expands a window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
flashmethod
Signature
(options?: boolean, mode?: FlashMode) => Promise<GDWindow>
Description
Makes the taskbar window icon flash (e.g., to prompt the user to take action).
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | boolean | Whether to start flashing the taskbar window icon even it is activated. Default is true. |
|
mode | FlashMode |
flashTabmethod
Signature
(options?: boolean) => Promise<GDWindow>
Description
Makes the tab of the window flash (e.g., to prompt the user to take action).
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | boolean | If |
focusmethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Focuses the current window. This is the same as calling activate()
.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
getBoundsmethod
Signature
() => Promise<Bounds>
getChannelmethod
Signature
() => Promise<string>
Description
Returns the current channel. Requires glue.channels API to be enabled.
getChildWindowsmethod
getContextmethod
Signature
() => Promise<any>
getDisplaymethod
Signature
() => Promise<Display>
getIconmethod
Signature
(success?: (icon: string) => void, error?: (error: string) => void) => Promise<string>
Description
Returns the window icon.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (icon: string) => void | Optional success callback to handle the returned icon. |
|
error | (error: string) => void | Optional callback to handle errors. |
getParentWindowmethod
getTitlemethod
Signature
() => Promise<string>
getURLmethod
Signature
() => Promise<string>
goBackmethod
Signature
() => Promise<void>
Description
Makes the window go back a web page.
Available since version Glue42 3.17
goForwardmethod
Signature
() => Promise<void>
Description
Makes the window go forward a web page.
Available since version Glue42 3.17
hidemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Hides the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
hideLoadermethod
joinChannelmethod
Signature
(name: string) => Promise<void>
Description
Joins a new channel by name. Leaves the current channel.
Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | The name of the channel to join. |
leaveChannelmethod
Signature
() => Promise<void>
Description
Leaves the current channel.
lockmethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Locks the window. When in locked state, moving the window will result in moving the entire group (if it is part of any).
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
maximizemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Maximizes a window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
maximizeRestoremethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Maximizes or restores the current window based on the current window state.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
minimizemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Minimizes a window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
moveResizemethod
Signature
(dimension: Partial<Bounds>, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Move and/or resize the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
dimension | Partial<Bounds> | Location and size for the window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
moveTomethod
Signature
(top?: number, left?: number) => Promise<GDWindow>
Parameters
Name | Type | Required | Description |
---|---|---|---|
top | number | ||
left | number |
navigatemethod
Signature
(url: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Navigates the window to a new URL.
Parameters
Name | Type | Required | Description |
---|---|---|---|
url | string | URL to which to navigate. |
|
success | (window: GDWindow) => void | Callback function to handle a successful operation. |
|
error | (error: string) => void | Callback function to handle the error from an unsuccessful operation. |
navigatemethod
Signature
(url: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Parameters
Name | Type | Required | Description |
---|---|---|---|
url | string | ||
options | LoadURLOptions |
onAttachedmethod
onBoundsChangedmethod
onClosemethod
onClosingmethod
Signature
(callback: (prevent: (options?: PreventClosingOptions) => void) => Promise<void>) => void
Description
Notifies when the window is about to close.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (prevent: (options?: PreventClosingOptions) => void) => Promise<void> | Callback function to handle the event. Returns a |
onCollapsedmethod
onContextUpdatedmethod
Signature
(callback: (context: any, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the window context is updated.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (context: any, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onDetachedmethod
onExpandedmethod
onFocusChangedmethod
onFrameButtonAddedmethod
Signature
(callback: (buttonInfo: ButtonInfo, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a frame button is added.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (buttonInfo: ButtonInfo, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onFrameButtonClickedmethod
Signature
(callback: (buttonInfo: ButtonInfo, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a frame button is clicked.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (buttonInfo: ButtonInfo, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onFrameButtonRemovedmethod
Signature
(callback: (buttonInfo: ButtonInfo, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a frame button is removed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (buttonInfo: ButtonInfo, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onFrameColorChangedmethod
onGroupChangedmethod
Signature
(callback: (window: GDWindow, newGroup: Group, oldGroup: Group) => void) => UnsubscribeFunction
Description
Notifies when the window group is changed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow, newGroup: Group, oldGroup: Group) => void | Callback function to handle the event. Returns an unsubscribe function. |
onLockingChangedmethod
onMaximizedmethod
onMinimizedmethod
onNavigatingmethod
Signature
(callback: (args: { newUrl: string; }) => Promise<void>) => void
Description
Notifies when the window is about to navigate.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (args: { newUrl: string; }) => Promise<void> | Callback function to handle the event |
onNeighboursChangedmethod
Signature
(callback: (neighbours: Neighbours, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the neighbours of the window are changed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (neighbours: Neighbours, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onNormalmethod
Signature
(callback: (window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the window is restored from minimized/maximized state to normal state.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onPlacementSettingsChangedmethod
onRefreshingmethod
Signature
(callback: (prevent: () => void) => Promise<void>) => void
Description
Notifies when the window is about to refresh.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (prevent: () => void) => Promise<void> | Callback function to handle the event. Returns a |
onStickyChangedmethod
onTabHeaderVisibilityChangedmethod
onTabSelectionChangedmethod
Signature
(callback: (selectedWindow: GDWindow, previousWindow: GDWindow, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the active tab is changed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (selectedWindow: GDWindow, previousWindow: GDWindow, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onTitleChangedmethod
Signature
(callback: (title: string, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when the title of the window is changed.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (title: string, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
onUrlChangedmethod
onVisibilityChangedmethod
onWindowAttachedmethod
onWindowDetachedmethod
onZoomFactorChangedmethod
placemethod
Signature
(options: PlacementSettings) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | PlacementSettings |
printmethod
Signature
(options?: PrintToPDFOptions) => Promise<GDWindow>
Description
Prints the window web page.
Available since version Glue42 3.11
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | PrintToPDFOptions |
printToPDFmethod
Signature
(option?: PrintOptions) => Promise<string>
Description
Prints the window web page as a PDF file with the custom print preview settings of Chromium.
Available since version Glue42 3.11
Parameters
Name | Type | Required | Description |
---|---|---|---|
option | PrintOptions |
refreshmethod
Signature
(ignoreCache: boolean) => Promise<GDWindow>
Description
Refresh the current window.
Available since version Glue42 3.12
Parameters
Name | Type | Required | Description |
---|---|---|---|
ignoreCache | boolean | Whether to refresh the page with or without cache. Default value: false |
removeFrameButtonmethod
Signature
(buttonId: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Removes a frame button from the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
buttonId | string | ID of the button to remove. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
resetButtonsmethod
Signature
(buttons: WindowButtons, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Resets the visible buttons of the window frame.
Parameters
Name | Type | Required | Description |
---|---|---|---|
buttons | WindowButtons | An object defining which buttons to be shown on the window frame. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
resizeTomethod
Signature
(width?: number, height?: number) => Promise<GDWindow>
Parameters
Name | Type | Required | Description |
---|---|---|---|
width | number | ||
height | number |
restoremethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Restores a window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setContextmethod
setFrameColormethod
Signature
(frameColor: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Sets the window frame color.
Parameters
Name | Type | Required | Description |
---|---|---|---|
frameColor | string | Can be a color name, such as "red", or a hex-encoded RGB or ARGB value. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setIconmethod
Signature
(base64Image: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Sets the window icon.
Parameters
Name | Type | Required | Description |
---|---|---|---|
base64Image | string | Icon as a |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setModalStatemethod
Signature
(isModal: boolean) => Promise<void>
Description
Makes a window behave like a modal when its used as a flydown
Parameters
Name | Type | Required | Description |
---|---|---|---|
isModal | boolean | determines if the modal behaviour is enabled |
setOnTopmethod
Signature
(onTop: boolean | "always", success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Z-index setting. If true
, will make the window appear on top of all other windows.
Parameters
Name | Type | Required | Description |
---|---|---|---|
onTop | boolean | "always" | If |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setSizeConstraintsmethod
Signature
(constraints: SizeConstraints, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Changes the size constraints of the window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
constraints | SizeConstraints | Min and max width and height constraints for the window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setStickymethod
Signature
(isSticky: boolean, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Enable or disable the stickiness of the current window.
Available since version Glue42 3.11
Parameters
Name | Type | Required | Description |
---|---|---|---|
isSticky | boolean | Whether to enable or disable the stickiness. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setStylemethod
Signature
(styles: WindowStyle, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Sets the style of the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
styles | WindowStyle | An object defining the window frame buttons, window size constraints, focus and visibility. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setTabHeaderVisiblemethod
Signature
(toBeVisible?: boolean, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Hides or shows the tab header of the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
toBeVisible | boolean | Whether to show or hide the tab header. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setTabTooltipmethod
Signature
(tabTooltip: string) => Promise<GDWindow>
Description
Changes the tooltip of a tab window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
tabTooltip | string | The text to be used as a tooltip. |
setTitlemethod
Signature
(title: string, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Sets the title of the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string | The title for the window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setVisiblemethod
Signature
(toBeVisible?: boolean, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Hides or shows the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
toBeVisible | boolean | Whether the window is to be visible or not. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
setZoomFactormethod
Signature
(factor: number) => Promise<GDWindow>
Description
Changes the zoom level.
Parameters
Name | Type | Required | Description |
---|---|---|---|
factor | number | Zoom factor. |
showmethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Shows the current window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
showDialogmethod
Signature
<T>(options: DialogOptions) => Promise<DialogResult | T>
Description
Shows a dialog with a title, message and response buttons to the user.
Available since version Glue42 3.19
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | DialogOptions |
showLoadermethod
showPopupmethod
Signature
(config: PopupOptions) => Promise<GDWindow>
Description
Shows a popup window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
config | PopupOptions | Options for the popup window. |
snapmethod
Signature
(target: string | GDWindow, direction?: RelativeDirection, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Snaps the window to another window.
Parameters
Name | Type | Required | Description |
---|---|---|---|
target | string | GDWindow | ID or instance of of the Glue42 Window to which to snap the current window. |
|
direction | RelativeDirection | Direction for snapping the window. Relative to the target window. |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
snapmethod
Signature
(target: string | GDWindow, direction?: RelativeDirection, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Parameters
Name | Type | Required | Description |
---|---|---|---|
target | string | GDWindow | ||
options | SnappingOptions | ||
success | (window: GDWindow) => void | ||
error | (error: string) => void |
startDragmethod
Signature
(options: StartDragOptions) => Promise<GDWindow>
Description
Enables moving files from a web page to the OS when a user starts dragging a web page element. Based on the Electron Native File Drag & Drop functionality.
Available since version Glue42 3.18
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | StartDragOptions | Options for the file that will be moved. |
toggleCollapsemethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Collapses or expands the current window based on the current window state.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
ungroupmethod
Signature
(options?: UngroupOptions) => Promise<GDWindow>
Description
Extracts the current window from the window group. If the window is part of a tab group, the entire tab group will be extracted.
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | UngroupOptions | Settings for the extracted window. |
unlockmethod
Signature
(success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Unlocks the window. When in unlocked state, moving the window will result in tearing it out from the window group (if it is part of any).
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
updateContextmethod
Signature
(context: any, success?: (window: GDWindow) => void, error?: (error: string) => void) => Promise<GDWindow>
Description
Updates the window context.
Parameters
Name | Type | Required | Description |
---|---|---|---|
context | any | Context object with which to update the current context (or create a new one if it does not exist). |
|
success | (window: GDWindow) => void | Optional success callback to handle the returned window. |
|
error | (error: string) => void | Optional callback to handle errors. |
zoomInmethod
zoomOutmethod
Groupobject
Description
Glue42 Windows can be grouped together via the Window Management API.
The Group
object describes a window group.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
id | string | The ID of the current group. |
||
isHeaderVisible | boolean | Whether the header of the group is visible or not. |
||
windows | GDWindow[] | Lists all windows in the group. |
Methods
capturemethod
Signature
(options?: CaptureOptions) => Promise<string>
Description
Returns an image of the entire window group as a base64
encoded string.
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | CaptureOptions | Options for capturing the window group. |
findmethod
Signature
(window: string | GDWindow, success?: (window: GDWindow) => void) => GDWindow
Description
Finds a window by ID or by a window object.
Parameters
Name | Type | Required | Description |
---|---|---|---|
window | string | GDWindow | Window ID or a window object by which to find a window in the group. |
|
success | (window: GDWindow) => void | Optional callback to handle the returned window. |
getTitlemethod
Signature
() => Promise<string>
Description
Returns the current group title
hideHeadermethod
Signature
(success?: (group: Group) => void, error?: (error: string) => void) => Promise<Group>
Description
Hides the window group header.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (group: Group) => void | Optional success callback that receives the window group as a parameter. |
|
error | (error: string) => void | Optional error callback to handle errors. |
maximizemethod
Signature
(success?: (group: Group) => void, error?: (error: string) => void) => void
Description
Maximizes the window group.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (group: Group) => void | Optional success callback to handle the maximized window group. |
|
error | (error: string) => void | Optional error callback to handle errors. |
onHeaderVisibilityChangedmethod
onWindowAddedmethod
Signature
(callback: (group: Group, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a new window is added to the group.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (group: Group, window: GDWindow) => void | Callback function to handle the event. Receives the window group and the added window as parameters. Returns an unsubscribe function. |
onWindowRemovedmethod
Signature
(callback: (group: Group, window: GDWindow) => void) => UnsubscribeFunction
Description
Notifies when a window is removed from the group.
Parameters
Name | Type | Required | Description |
---|---|---|---|
callback | (group: Group, window: GDWindow) => void | Callback function to handle the event. Returns an unsubscribe function. |
restoremethod
Signature
(success?: (group: Group) => void, error?: (error: string) => void) => void
Description
Restores the window group.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (group: Group) => void | Optional success callback to handle the returned window group. |
|
error | (error: string) => void | Optional error callback to handle errors. |
setTitlemethod
Signature
(title: string) => Promise<Group>
Description
Changes the group title
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string | the new group title |
showHeadermethod
Signature
(success?: (group: Group) => void, error?: (error: string) => void) => Promise<Group>
Description
Shows the window group header.
Parameters
Name | Type | Required | Description |
---|---|---|---|
success | (group: Group) => void | Optional success callback that receives the window group as a parameter. |
|
error | (error: string) => void | Optional error callback to handle errors. |
GroupsAPIobject
Description
Provides access to window groups.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
my | Group | Returns the current group of the window. |
Methods
findGroupByWindowmethod
Signature
(winId: string | GDWindow, success?: (group: Group) => void, error?: (error: string) => void) => Group
Description
Finds a group by a provided window object or window ID.
Parameters
Name | Type | Required | Description |
---|---|---|---|
winId | string | GDWindow | A Glue42 Window object or a window ID by which to find a window group. |
|
success | (group: Group) => void | Optional callback to handle the returned window group. Receives the returned window group as a parameter. |
|
error | (error: string) => void | Optional callback |
listmethod
onGroupAddedmethod
onGroupRemovedmethod
waitForGroupmethod
Signature
(groupId: string) => Promise<Group>
Description
Waits for a group with the specified groupId
to be loaded (e.g., when the group is still in the pool).
Parameters
Name | Type | Required | Description |
---|---|---|---|
groupId | string |
JumpListobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
categories | JumpListCategoriesAPI |
Methods
isEnabledmethod
Signature
() => Promise<boolean>
setEnabledmethod
Signature
(enabled: boolean) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
enabled | boolean |
JumpListActionsAPIobject
Methods
createmethod
Signature
(actions: JumpListActionSettings[]) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
actions | JumpListActionSettings[] |
listmethod
Signature
() => Promise<JumpListActionSettings[]>
removemethod
Signature
(actions: JumpListActionSettings[]) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
actions | JumpListActionSettings[] |
JumpListActionSettingsobject
Description
Settings for a jump list action.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
callback | () => Promise<void> | |||
icon | string | |||
multiInstanceTitle | string | |||
singleInstanceTitle | string |
JumpListCategoriesAPIobject
Methods
createmethod
Signature
(title: string, actions: JumpListActionSettings[]) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string | ||
actions | JumpListActionSettings[] |
findmethod
Signature
(title: string) => Promise<JumpListCategory>
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string |
listmethod
Signature
() => Promise<JumpListCategory[]>
removemethod
Signature
(title: string) => Promise<void>
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string |
JumpListCategoryobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
actions | JumpListActionsAPI | |||
title | string |
JumpListCategorySettingsobject
Description
Settings for a jump list category.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
actions | JumpListActionSettings[] | |||
title | string |
JumpListSettingsobject
Description
Settings for application jump lists.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
categories | JumpListCategorySettings[] | |||
enabled | boolean |
Loaderobject
Description
Window loader settings.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
enabled | boolean | true | Enable or disable the loader. |
|
loaderBackground | string | "#1C2D3B" | Changes the background of the loader page. |
|
loaderHideOnLoad | boolean | true | Hide the loader once the page is loaded. |
|
loaderSize | number | Sets a specific size (in pixels) for the loader animation. |
||
loaderSizeFactor | number | 0.3 | Sets a size factor for the loader animation relative to the window size. |
|
loaderSpeed | number | 1 | Changes the loader animation speed. |
|
loaderText | string | "Loading" | Text that will show below the loader animation. |
|
loaderTextColor | string | "#F1F1F1" | Color for the loader text. |
|
loaderTextSize | number | 12 | Size of the loader text. |
|
loaderType | string | "DoubleBounce" | Type of the loading animation. |
|
timeout | number | If set, will auto hide the loader after the specified period of time (in ms). |
LoadURLOptionsobject
Description
Describes the options for loading a window URL.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
baseURLForDataURL | string | Base URL for files loaded by a data URL. Must end with a trailing path separator. This property is necessary only when the loaded URL is a data URL. |
||
extraHeaders | string | A string with extra headers for the request. Separate the headers with a |
||
httpReferrer | string | Referrer | URL for the |
||
postData | (UploadBase64Data | UploadFile)[] | Data for the POST request. Either an |
||
userAgent | string | Value for the |
Marginsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bottom | number | The bottom margin of the printed web page, in pixels. |
||
left | number | The left margin of the printed web page, in pixels. |
||
marginType | "default" | "none" | "printableArea" | "custom" | Can be |
||
right | number | The right margin of the printed web page, in pixels. |
||
top | number | The top margin of the printed web page, in pixels. |
Neighboursobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bottomNeighbours | GDWindow[] | |||
leftNeighbours | GDWindow[] | |||
rightNeighbours | GDWindow[] | |||
topNeighbours | GDWindow[] |
PageRangeobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
from | number | |||
to | number |
PlacementSettingsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bottom | string | number | Bottom margin for the placed window. Use a |
||
display | Display | "current" | Defines the current display. |
||
height | string | number | Defines the window height.
Use a |
||
horizontalAlignment | "left" | "right" | "center" | "stretch" | Defines a horizontal alignment configuration. If |
||
left | string | number | Left margin for the placed window. Use a |
||
right | string | number | Right margin for the placed window. Use a |
||
snapped | boolean | If |
||
top | string | number | Top margin for the placed window. Use a |
||
verticalAlignment | "top" | "bottom" | "center" | "stretch" | Defines a vertical alignment configuration. If |
||
width | string | number | Defines the window width.
Use a |
PopupOptionsobject
Description
Options for creating popup windows.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
horizontalOffset | number | The horizontal offset from the target bounds (applied only to |
||
size | Size | The size of the rendered popup window ( |
||
targetBounds | Bounds | The bounds of the area around which the popup will appear. |
||
targetLocation | PopupTargetLocation | The location ( |
||
verticalOffset | number | The vertical offset from the target bounds (applied only to |
||
windowId | string | The ID of the window which will be used as a popup window. |
PreventClosingOptionsobject
Description
Options for the prevent()
function passed as an argument to the onClosing()
method when a Glue42 Window is about to be closed.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
showDialog | boolean |
PrintOptionsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
collate | boolean | Whether the web page should be collated. |
||
color | boolean | Whether the printed web page will be in color or grayscale. Default is |
||
copies | number | The number of copies of the web page to print. |
||
deviceName | string | Set the printer device name to use. Must be the system-defined name and not the user-friendly-name, e.g 'Brother_QL_820NWB' and not 'Brother QL-820NWB'. |
||
dpi | { horizontal?: number; vertical?: number; } | |||
duplexMode | "simplex" | "shortEdge" | "longEdge" | Set the duplex mode of the printed web page. Can be |
||
footer | string | String to be printed as page footer. |
||
header | string | String to be printed as page header. |
||
landscape | boolean | Whether the web page should be printed in landscape mode. Default is |
||
margins | Margins | |||
pageRanges | PageRange[] | The page range to print. |
||
pageSize | Size | "A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid" | Specify page size of the generated PDF file. Can be |
||
pagesPerSheet | number | The number of pages to print per sheet. |
||
printBackground | boolean | Prints the background color and image of the web page. Default is |
||
scaleFactor | number | The scale factor of the web page. |
||
silent | boolean | Whether to ask the user for print settings. Default is |
PrintToPDFOptionsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
autoOpen | boolean | false | If |
|
autoOpenPath | boolean | false | If |
|
autoSave | boolean | false | If |
|
headerFooter | { title?: string; url?: string; } | Header and footer for the PDF. |
||
landscape | boolean | Set to |
||
marginsType | number | Specifies the type of margins to use. Uses 0 for default margin, 1 for no margin, and 2 for minimum margin. |
||
pageRanges | PageRange[] | The page range to print. |
||
pageSize | Size | "A3" | "A4" | "A5" | "Legal" | "Letter" | "Tabloid" | Specify page size of the generated PDF file. Can be |
||
printBackground | boolean | Whether to print CSS backgrounds. |
||
printSelectionOnly | boolean | Whether to print selection only. |
||
scaleFactor | number | The scale factor of the web page. Can range from 0 to 100. |
Referrerobject
Description
Describes the values that will be used for the Referer
and the Referrer-Policy
request headers.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
policy | "default" | "unsafe-url" | "no-referrer-when-downgrade" | "no-referrer" | "origin" | "strict-origin-when-cross-origin" | "same-origin" | "strict-origin" | Value for the |
||
url | string | URL for the |
ScaleOptionsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
scale | number | Specifies the size of the output image relative to the actual screen size. |
Screenobject
Description
Object describing a screen.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
height | number | Screen height. |
||
isPrimary | boolean | Whether this is the primary screen. |
||
left | number | Horizontal coordinate of the top left corner of the screen. |
||
name | string | Name of the screen assigned by the operating system. |
||
scale | number | Screen scale factor. |
||
scaleX | number | Scale factor of the horizontal axis of the screen. |
||
scaleY | number | Scale factor of the vertical axis of the screen. |
||
top | number | Vertical coordinate of the top left corner of the screen. |
||
width | number | Screen width. |
||
workingAreaHeight | number | Height of the working area. |
||
workingAreaLeft | number | Horizontal coordinate of the top left corner of the screen working area. |
||
workingAreaTop | number | Vertical coordinate of the top left corner of the screen working area. |
||
workingAreaWidth | number | Width of the working area. |
ShowFlydownDataobject
Description
Object describing a flydown window.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
flydownWindowBounds | Bounds | The initial bounds of the flydown, if set before the callback is invoked. If not set, this defaults to |
||
flydownWindowId | string | The ID of the window used as a flydown. |
||
zoneId | string | The ID of the zone which triggered the flydown. |
Sizeobject
Description
Object describing the size of the window.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
height | number | Window height. |
||
width | number | Window width. |
SizeConstraintsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
maxHeight | number | |||
maxWidth | number | |||
minHeight | number | |||
minWidth | number |
SnappingOptionsobject
Description
Options for snapping a Glue42 Window to another Glue42 Window or a Glue42 Window group.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
autoAlign | boolean | If |
||
direction | RelativeDirection | Direction for snapping the window. Relative to the target window. |
StartDragOptionsobject
Description
Options for the file to be moved from the web page to the OS.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
data | string | |||
filename | string | |||
icon | string | |||
type | "file" | "base64" | "base64url" | "utf8" |
UngroupOptionsobject
Description
Window settings for a window extracted from a window group.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
bounds | Partial<Bounds> | Bounds for the extracted window. |
||
focus | boolean | If |
UploadBase64Dataobject
Description
Describes data to upload encoded as a Base64 string.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
data | string | The data to upload encoded as a Base64 string. |
||
type | "base64" | Type of the uploaded data. Must be set to |
UploadFileobject
Description
Describes a file to upload.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
filePath | string | Path to the file to upload. |
||
length | number | 0 | Number of bytes to read starting from the value set in |
|
modificationTime | number | The time the file was last modified expressed as a number of seconds since the UNIX epoch. |
||
offset | number | 0 | Position of the first byte to read. |
|
type | "file" | Type of the uploaded data. Must be set to |
WindowButtonsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
allowClose | boolean | |||
allowCollapse | boolean | |||
allowLockUnlock | boolean | |||
allowMaximize | boolean | |||
allowMinimize | boolean |
WindowConfigurationobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
buttonsVisibility | "off" | "always" | "onDemand" | "onFocus" | Determines the conditions under which the window buttons will be visible. Valid only for Glue42 Windows in |
||
hasMoveAreas | boolean | If |
||
hasSizeAreas | boolean | If |
||
moveAreaBottomMargin | string | The Glue42 window can contain a move area thickness bottom margin. The margin is related to the bottom border of |
||
moveAreaLeftMargin | string | The Glue42 window can contain a move area thickness left margin. The margin is related to the left border of |
||
moveAreaRightMargin | string | The Glue42 window can contain a move area thickness right margin. The margin is related to the right border of |
||
moveAreaThickness | string | How much of the outer window area is to be considered as a moving area (meaning you can move the window using it). The string value corresponds to the left, top, right and bottom borders. |
||
moveAreaTopMargin | string | The Glue42 window can contain a move area thickness top margin. The margin is related to the top border of |
||
sizeAreaThickness | string | How much of the outer window area is to be considered as a sizing area (meaning you can resize the window using it). The string value corresponds to the left, top, right and bottom borders. |
WindowCreateOptionsobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
allowChannels | boolean | false | If |
|
allowClose | boolean | true | If |
|
allowCollapse | boolean | true | If |
|
allowExtract | boolean | false | If |
|
allowForward | boolean | true | If |
|
allowLockUnlock | boolean | false | If |
|
allowMaximize | boolean | true | If |
|
allowMinimize | boolean | true | If |
|
allowTabClose | boolean | true | If |
|
allowUnstick | boolean | true | If |
|
autoAlign | boolean | true | If |
|
autoSnap | boolean | true | If |
|
base64ImageSource | string | Image as |
||
borderColor | string | Can be a color name such as "red", or a hex-encoded RGB or ARGB value. |
||
channelId | string | Name of the Channel which the app will join. |
||
collapseHeight | number | -1 | Defines the height of the window when collapsed. |
|
context | any | The window context. |
||
devToolsEnable | boolean | true | If |
|
downloadSettings | DownloadSettings | Object that defines file download behavior in the window. |
||
focus | boolean | true | If |
|
hasMoveAreas | boolean | true | If |
|
hasSizeAreas | boolean | true | If |
|
height | number | 400 | Window height. |
|
hidden | boolean | false | If |
|
historyNavigationEnabled | boolean | true | If |
|
ignoreFromLayouts | boolean | If |
||
isChild | boolean | false | If |
|
isCollapsed | boolean | false | If |
|
isPopup | boolean | false | If |
|
isSticky | boolean | true | If |
|
left | number | 0 | Distance of the top left window corner from the left edge of the screen. |
|
loader | Loader | Object that defines loader behavior. |
||
maxHeight | number | Specifies the maximum window height. |
||
maxWidth | number | Specifies the maximum window width. |
||
minHeight | number | 30 | Specifies the minimum window height. |
|
minWidth | number | 50 | Specifies the minimum window width. |
|
mode | WindowMode | "flat" | Glue42 Window type. Possible values are |
|
moveAreaThickness | string | "0, 12, 0, 0" | How much of the window area is to be considered as a moving area (meaning you can move the window using it).
The string value corresponds to the left, top, right and bottom borders of the window.
Setting |
|
moveAreaTopMargin | string | "0, 0, 0, 0" | Margin for the top window move area. The string value corresponds to the left, top, right and bottom borders of the move area.
Setting |
|
onTop | boolean | false | If |
|
placement | PlacementSettings | Specifies the window position relative to the screen. Available since version Glue42 3.11 |
||
relativeDirection | RelativeDirection | "right" | Direction ( |
|
relativeTo | string | The ID of the window that will be used to relatively position the new window. Can be combined with |
||
showInTaskbar | boolean | true | If |
|
showTitleBar | boolean | true | Determines whether the window will have a title bar. |
|
sizeAreaThickness | string | "5, 5, 5, 5" | How much of the window area is to be considered as a sizing area (meaning you can resize the window using that area). The string value corresponds to the left, top, right and bottom borders. |
|
snappingEdges | string | "all" | Specifies the active Glue42 Window snapping edges.
Possible values are: |
|
startLocation | string | Specifies the start window location.
Possible options are |
||
stickyFrameColor | string | "#5b8dc9" | Specifies the Glue42 window frame color. Accepts hex color as string (e.g. |
|
stickyGroup | string | "Any" | If set, the Glue42 Window can only stick to windows that have the same group. |
|
tabGroupId | string | Specifies the tab group ID. If two or more tab windows are defined with the same ID, they will be hosted in the same tab window. |
||
tabIndex | number | The tab index of the current window. All tabs in a common tab container have different indices. |
||
tabSelected | boolean | true | Tab is selected. |
|
tabTitle | string | "" | The tab title. |
|
tabTooltip | string | "" | The tab tooltip. |
|
title | string | Sets the window title. To work properly, there should be a title HTML tag in the page. |
||
top | number | 0 | Distance of the top left window corner from the top edge of the screen. |
|
url | string | The URL of the app to be loaded in the new window |
||
urlLoadOptions | LoadURLOptions | Options for loading the window URL. Can be used for POST requests like uploading a file or specifying additional headers. Available since version Glue42 3.17 |
||
useRandomFrameColor | boolean | false | If |
|
width | number | 400 | Window width. |
|
windowName | string | The name of the window |
||
windowState | FrameState | "normal" | If set, the window will start in the specified state (maximized, minimized, normal). |
WindowsConfigurationobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
approachingDistance | number | |||
autoAlign | boolean | |||
hideGroupCaption | boolean | |||
showExtractButton | boolean | |||
showFeedbackButton | boolean | |||
showStickyButton | boolean | |||
sticky | boolean |
WindowSettingsobject
Description
Settings for Glue42 Windows.
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
allowChannels | boolean | false | If |
|
allowClose | boolean | true | If |
|
allowCollapse | boolean | true | If |
|
allowExtract | boolean | false | If |
|
allowForward | boolean | true | If |
|
allowLockUnlock | boolean | false | If |
|
allowMaximize | boolean | true | If |
|
allowMinimize | boolean | true | If |
|
allowTabClose | boolean | true | If |
|
allowUnstick | boolean | true | If |
|
autoAlign | boolean | true | If |
|
autoSnap | boolean | true | If |
|
base64ImageSource | string | Image as |
||
borderColor | string | Can be a color name such as "red", or a hex-encoded RGB or ARGB value. |
||
channelId | string | Name of the Channel which the app will join. |
||
collapseHeight | number | -1 | Defines the height of the window when collapsed. |
|
devToolsEnable | boolean | true | If |
|
downloadSettings | DownloadSettings | Object that defines file download behavior in the window. |
||
focus | boolean | true | If |
|
hasMoveAreas | boolean | true | If |
|
hasSizeAreas | boolean | true | If |
|
height | number | 400 | Window height. |
|
hidden | boolean | false | If |
|
historyNavigationEnabled | boolean | true | If |
|
ignoreFromLayouts | boolean | If |
||
isChild | boolean | false | If |
|
isCollapsed | boolean | false | If |
|
isPopup | boolean | false | If |
|
isSticky | boolean | true | If |
|
left | number | 0 | Distance of the top left window corner from the left edge of the screen. |
|
loader | Loader | Object that defines loader behavior. |
||
maxHeight | number | Specifies the maximum window height. |
||
maxWidth | number | Specifies the maximum window width. |
||
minHeight | number | 30 | Specifies the minimum window height. |
|
minWidth | number | 50 | Specifies the minimum window width. |
|
mode | WindowMode | "flat" | Glue42 Window type. Possible values are |
|
moveAreaThickness | string | "0, 12, 0, 0" | How much of the window area is to be considered as a moving area (meaning you can move the window using it).
The string value corresponds to the left, top, right and bottom borders of the window.
Setting |
|
moveAreaTopMargin | string | "0, 0, 0, 0" | Margin for the top window move area. The string value corresponds to the left, top, right and bottom borders of the move area.
Setting |
|
onTop | boolean | false | If |
|
placement | PlacementSettings | Specifies the window position relative to the screen. Available since version Glue42 3.11 |
||
relativeDirection | RelativeDirection | "right" | Direction ( |
|
relativeTo | string | The ID of the window that will be used to relatively position the new window. Can be combined with |
||
showInTaskbar | boolean | true | If |
|
showTitleBar | boolean | true | Determines whether the window will have a title bar. |
|
sizeAreaThickness | string | "5, 5, 5, 5" | How much of the window area is to be considered as a sizing area (meaning you can resize the window using that area). The string value corresponds to the left, top, right and bottom borders. |
|
snappingEdges | string | "all" | Specifies the active Glue42 Window snapping edges.
Possible values are: |
|
startLocation | string | Specifies the start window location.
Possible options are |
||
stickyFrameColor | string | "#5b8dc9" | Specifies the Glue42 window frame color. Accepts hex color as string (e.g. |
|
stickyGroup | string | "Any" | If set, the Glue42 Window can only stick to windows that have the same group. |
|
tabGroupId | string | Specifies the tab group ID. If two or more tab windows are defined with the same ID, they will be hosted in the same tab window. |
||
tabIndex | number | The tab index of the current window. All tabs in a common tab container have different indices. |
||
tabSelected | boolean | true | Tab is selected. |
|
tabTitle | string | "" | The tab title. |
|
tabTooltip | string | "" | The tab tooltip. |
|
title | string | Sets the window title. To work properly, there should be a title HTML tag in the page. |
||
top | number | 0 | Distance of the top left window corner from the top edge of the screen. |
|
urlLoadOptions | LoadURLOptions | Options for loading the window URL. Can be used for POST requests like uploading a file or specifying additional headers. Available since version Glue42 3.17 |
||
useRandomFrameColor | boolean | false | If |
|
width | number | 400 | Window width. |
|
windowState | FrameState | "normal" | If set, the window will start in the specified state (maximized, minimized, normal). |
WindowStyleobject
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
allowClose | boolean | |||
allowCollapse | boolean | |||
allowLockUnlock | boolean | |||
allowMaximize | boolean | |||
allowMinimize | boolean | |||
focus | boolean | |||
hidden | boolean | |||
maxHeight | number | |||
maxWidth | number | |||
minHeight | number | |||
minWidth | number |
DialogModeenumeration
Description
Mode for the dialog. Determines whether only the container (a Workspaces Frame, or a Glue42 Window group) of the window that is showing the dialog will be blocked for user interaction, or all visible containers (including frameless Glue42 Windows) will be blocked. (All windows within a blocked container are blocked too.)
- WindowContainer
- Global
DialogTypeenumeration
Description
Type of the dialog to show. Can be either a predefined Glue42 dialog type, or a custom one.
- YesNo
- YesNoCancel
- OkCancel
- Ok
- Custom
PopupTargetLocationenumeration
Description
Location of the window (flydown or popup) relative to the defined trigger zone (flydown trigger zone or popup trigger area).
- None
- Left
- Right
- Top
- Bottom
FlashModeenumeration
Description
Modes for flashing window
- "auto"
- "force"
- "forceAndKeep"
RelativeDirectionenumeration
Description
Relative direction of positioning the window.
- "top"
- "left"
- "right"
- "bottom"
WindowModeenumeration
Description
Glue42 Window mode.
- "html"
- "flat"
- "tab"
- "frameless"
WindowStateenumeration
Description
Window state.
- "normal"
- "maximized"
- "minimized"