• Back to Glue42 Enterprise Docs
Glue42 enterprise documentation

Reference Documentation

  • Back to Glue42 Enterprise Docs
Press/
  • Glue
  • Application Preferences
  • AppManager
  • Channels
  • Connection
  • Displays
  • Hotkeys
  • Intents
  • Interop
  • Layouts
  • Logger
  • Metrics
  • Notifications
  • Pub Sub
  • Shared Contexts
  • Themes
  • Windows
  • Workspaces

Windows

5.11.0

The 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

  • configure
  • createFlydown
  • find
  • findById
  • list
  • my
  • onTabAttached
  • onTabDetached
  • onWindowAdded
  • onWindowFrameColorChanged
  • onWindowGotFocus
  • onWindowLostFocus
  • onWindowRemoved
  • open
  • ready
  • showPopup
  • windowAdded
  • windowRemoved

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

Signature

(success: (windows: GDWindow[]) => void) => GDWindow[]

Description

Lists all windows.

Parameters

Name Type Required Description
success (windows: GDWindow[]) => void

Optional success callback to handle the returned windows.

mymethod

Signature

() => GDWindow

Description

Returns the current window.

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 boolean value showing whether the header of the tab is visible or not.

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 Promise which resolves with an unsubscribe function.

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

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Parameters

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

windowRemovedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Parameters

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

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 and/or height of the output image. If true and both width and height are set, then the specified width will be used as a basis for the output image aspect ratio.

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 base64 format.

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.

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 is supplied. Can be "bottom", "top", "left", "right".

relativeTo GDWindow

Position the new window relatively to an existing window.

width number

Window width.

DownloadOptionsobject

Properties

Property Type Default Required Description
autoOpenDownload boolean false

If true, will open the download file after the download is completed.

autoOpenPath boolean false

If true, will open the folder that contains the downloaded file after the download is completed.

name string

If specified, will be used when saving the file.

silent boolean false

If true, will not show the download bar on the page.

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 true, will open the download file after the download is completed.

autoOpenPath boolean false

If true, will open the folder that contains the downloaded file after the download is completed.

autoSave boolean true

If true, will autosave the file (without asking the user where to save it). If false, a system save dialog will appear.

enable boolean true

If true, enables the window to download files.

enableDownloadBar boolean true

If true, a download bar tracking the progress will appear at the bottom of the window when downloading. If false, the download process will be invisible.

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 ((data: ShowFlydownData, cancel: () => void) => Promise<Size>) | Size

The size of the rendered flydown window (width and height). Can be an object with a specific size, or a callback that calculates the size. The callback receives the flydown data and a function to cancel the flydown.

targetLocation PopupTargetLocation

The location ("bottom", "top", "left", "right" or "none") where the flydown will appear, relative to the defined flydown zone. If "none" is passed, the flydown will appear at { left: 0, top: 0 } of the flydown trigger zone.

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 { left: 0, top: 0 } correspond to the top left corner of the target window, rather than the top left corner of the monitor.

flydownSize Size | ((data: ShowFlydownData, cancel: () => void) => Promise<Size>)

The size of the rendered flydown window (width and height). Can be an object with a specific size, or a callback that calculates the size. The callback receives the flydown data and a function to cancel the flydown.

id string

Unique ID of the flydown trigger zone.

targetLocation PopupTargetLocation

The location ("bottom", "top", "left", "right" or "none") where the flydown will appear, relative to the defined flydown zone. If "none" is passed, the flydown will appear at { left: 0, top: 0 } of the flydown trigger zone.

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 (undefined if it is not part of an activity).

activityWindowId string

Returns the ID of the window if the window is an activity window (undefined if it is not part of an activity).

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 undefined if the window was not started as an application.

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 true if the window is collapsed.

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 true if the window is locked.

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 true if the window is visible.

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 - html, flat, tab.

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 getDisplay() instead.

settings WindowSettings

The settings of the current window.

state FrameState

Returns the state of the window - normal, maximized or minimized.

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 tab mode. Returns all tabs that are in the same tab group as the current window.

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 settings instead. The window styles of the current window.

windowType "electron" | "remote"

The type of the window.

zoomFactor number

Returns the current zoom factor.

Methods

  • activate
  • addFrameButton
  • attachTab
  • capture
  • center
  • close
  • collapse
  • configure
  • createFlydown
  • detachTab
  • download
  • expand
  • flash
  • focus
  • getBounds
  • getChildWindows
  • getContext
  • getDisplay
  • getIcon
  • getParentWindow
  • getTitle
  • getURL
  • hide
  • hideLoader
  • lock
  • maximize
  • maximizeRestore
  • minimize
  • moveResize
  • moveTo
  • navigate
  • onAttached
  • onBoundsChanged
  • onClose
  • onClosing
  • onCollapsed
  • onContextUpdated
  • onDetached
  • onExpanded
  • onFocusChanged
  • onFrameButtonAdded
  • onFrameButtonClicked
  • onFrameButtonRemoved
  • onFrameColorChanged
  • onGroupChanged
  • onLockingChanged
  • onMaximized
  • onMinimized
  • onNeighboursChanged
  • onNormal
  • onPlacementSettingsChanged
  • onRefreshing
  • onStickyChanged
  • onTabHeaderVisibilityChanged
  • onTabSelectionChanged
  • onTitleChanged
  • onUrlChanged
  • onVisibilityChanged
  • onWindowAttached
  • onWindowDetached
  • onZoomFactorChanged
  • place
  • print
  • printToPDF
  • refresh
  • removeFrameButton
  • resetButtons
  • resizeTo
  • restore
  • setContext
  • setFrameColor
  • setIcon
  • setModalState
  • setOnTop
  • setSizeConstraints
  • setSticky
  • setStyle
  • setTabHeaderVisible
  • setTabTooltip
  • setTitle
  • setVisible
  • setZoomFactor
  • show
  • showLoader
  • showPopup
  • snap
  • toggleCollapse
  • ungroup
  • unlock
  • updateContext
  • zoomIn
  • zoomOut

activatemethod

Signature

(success: (window: GDWindow) => void, error: (error: string) => void) => Promise<GDWindow>

Description

Activates 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.

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

Signature

(screen: Screen) => Promise<GDWindow>

Description

Moves the window to the center of the screen.

Parameters

Name Type Required Description
screen Screen

Optional parameter specifying the screen on which to center the window.

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.

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

focusmethod

Signature

(success: (window: GDWindow) => void, error: (error: string) => void) => Promise<GDWindow>

Description

Focuses 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.

getBoundsmethod

Signature

() => Promise<Bounds>

getChildWindowsmethod

Signature

() => Promise<GDWindow[]>

Description

Returns all child windows of this window

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

Signature

() => Promise<GDWindow>

Description

Returns the parent window of this window

getTitlemethod

Signature

() => Promise<string>

getURLmethod

Signature

() => Promise<string>

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

Signature

() => Promise<GDWindow>

Description

Hides the loader animation for the window.

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 navigate to.

success (window: GDWindow) => void

Optional success callback to handle the returned window.

error (error: string) => void

Optional callback to handle errors.

onAttachedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the current window is attached.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onBoundsChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window location is changed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onClosemethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is closed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onClosingmethod

Signature

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

Description

Notifies when the window is about to close.

Parameters

Name Type Required Description
callback () => Promise<void>

Callback function to handle the event. Returns a Promise that will be awaited before the window is closed. Subject to a timeout configured in Glue42 Desktop.

onCollapsedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is collapsed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the current window is detached.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onExpandedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is expanded.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onFocusChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window focus is changed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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

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. Returns an unsubscribe function.

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

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is locked or unlocked.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onMaximizedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is maximized.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onMinimizedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window is minimized.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the placement of the window has changed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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 Promise that will be awaited before the window is refreshed. Subject to a timeout configured in Glue42 Desktop. A prevent function is passed to the callback as a parameter. It allows the calling code to prevent the refresh.

onStickyChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window stickiness is changed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onTabHeaderVisibilityChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the visibility of the window tab header changes.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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

Signature

(callback: (url: string, window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window URL is changed.

Parameters

Name Type Required Description
callback (url: string, window: GDWindow) => void

Callback function to handle the event. Returns an unsubscribe function.

onVisibilityChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the window visibility changes.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onWindowAttachedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when a window is attached to the current window.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onWindowDetachedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when a window is detached from the current window.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

onZoomFactorChangedmethod

Signature

(callback: (window: GDWindow) => void) => UnsubscribeFunction

Description

Notifies when the zoom factor is changed.

Parameters

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

Callback function to handle the event. Returns an unsubscribe function.

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

Signature

(context: any) => Promise<GDWindow>

Parameters

Name Type Required Description
context any

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 base64 encoded string.

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, 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
success (window: GDWindow) => void
error (error: string) => void

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.

showLoadermethod

Signature

(options: Loader) => Promise<GDWindow>

Description

Shows a loader animation for the window or updates the loader properties (animation type, background or text).

Parameters

Name Type Required Description
options Loader

Settings for the loader animation.

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

Instance or name of the 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.

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

Signature

() => Promise<GDWindow>

Description

Zooms in the window.

zoomOutmethod

Signature

() => Promise<GDWindow>

Description

Zooms out the window.

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

  • capture
  • find
  • getTitle
  • hideHeader
  • maximize
  • onHeaderVisibilityChanged
  • onWindowAdded
  • onWindowRemoved
  • restore
  • setTitle
  • showHeader

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

Signature

(callback: (group: Group) => void) => UnsubscribeFunction

Description

Notifies when the visibility of the window group header is changed.

Parameters

Name Type Required Description
callback (group: Group) => void

Callback function to handle the event. Returns an unsubscribe function.

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) => void) => UnsubscribeFunction

Description

Notifies when a window is removed from the group.

Parameters

Name Type Required Description
callback (group: Group) => 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

  • findGroupByWindow
  • list

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

Signature

(success: (groups: Group[]) => void) => Group[]

Description

Lists all window groups.

Parameters

Name Type Required Description
success (groups: Group[]) => void

Optional callback to handle the returned window groups. Receives an array of the returned window groups as a parameter.

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).

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 default, none, printableArea, or custom. If custom is chosen, you will also need to specify top, bottom, left, and right.

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
display Display | "current"

Defines the current display.

height string | number

Defines the window height. Use a number to define the height in pixels. Use a string to define the height in pixels or percentage of the screen height - e.g., "10px" or "10%".".

horizontalAlignment "left" | "right" | "center" | "stretch"

Defines a horizontal alignment configuration. If verticalAlignment is set, then horizontalAlignment will default to "stretch".

margin string

Sets the margin for all four sides of the window.

snapped boolean

If true, the Glue42 Window will remain snapped to the specified screen position even in cases of resolution changes, window visibility changes or when the application virtualization window hosting the Glue42 Window has been resized. However, this doesn't include any API calls or manual user interaction which affect the window placement or bounds. If false, the window will be positioned at the specified screen location only once when created.

verticalAlignment "top" | "bottom" | "center" | "stretch"

Defines a vertical alignment configuration. If horizontalAlignment is set, then verticalAlignment will default to "stretch".

width string | number

Defines the window width. Use a number to define the width in pixels. Use a string to define the width in pixels or percentage of the screen width - e.g., "10px" or "10%".

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 left and right target locations).

size Size

The size of the rendered popup window (width and height).

targetBounds Bounds

The bounds of the area around which the popup will appear.

targetLocation PopupTargetLocation

The location ("bottom", "top", "left", "right" or "none") where the popup will appear, relative to the defined popup area. If "none" is passed, the popup will appear at { left: 0, top: 0 } of the popup area.

verticalOffset number

The vertical offset from the target bounds (applied only to top and bottom target locations).

windowId string

The ID of the window which will be used as a popup window.

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 true.

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 simplex, shortEdge, or longEdge.

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 false.

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 A3, A4, A5, Legal, Letter, Tabloid or an Object with height and width in microns.

pagesPerSheet number

The number of pages to print per sheet.

printBackground boolean

Prints the background color and image of the web page. Default is false.

scaleFactor number

The scale factor of the web page.

silent boolean

Whether to ask the user for print settings. Default is false.

PrintToPDFOptionsobject

Properties

Property Type Default Required Description
autoOpen boolean false

If true, will open the PDF file.

autoOpenPath boolean false

If true, will open the folder that contains the PDF file.

autoSave boolean false

If true, will autosave the file (without asking the user where to save it). If false, a system save dialog will appear.

headerFooter { title?: string; url?: string; }

Header and footer for the PDF.

landscape boolean

Set to true for landscape layout, false for portrait layout.

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 A3, A4, A5, Legal, Letter, Tabloid or an Object with height and width in microns.

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.

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 { left: 0, top: 0, height: 200, width: 200}.

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

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 true, the extracted window will be on focus.

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" | "onDemand" | "always" | "onFocus"

Determines the conditions under which the window buttons will be visible. Valid only for Glue42 Windows in html mode.

hasMoveAreas boolean

If false, a window in HTML mode can not be moved.

hasSizeAreas boolean

If false, a window cannot be resized by dragging its borders, maximizing, etc.

moveAreaBottomMargin string

The Glue42 window can contain a move area thickness bottom margin. The margin is related to the bottom border of moveAreaThickness only. The string value corresponds to the left, top, right and bottom.

moveAreaLeftMargin string

The Glue42 window can contain a move area thickness left margin. The margin is related to the left border of moveAreaThickness only. The string value corresponds to the left, top, right and bottom.

moveAreaRightMargin string

The Glue42 window can contain a move area thickness right margin. The margin is related to the right border of moveAreaThickness only. The string value corresponds to the left, top, right and bottom.

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 moveAreaThickness only. The string value corresponds to the left, top, right and bottom.

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
allowClose boolean true

If false, the window will not contain a close button.

allowCollapse boolean true

If false, the window will not contain a collapse button.

allowExtract boolean false

If true, the window will contain an Extract button when in a window group. The button can be used to break out the window from the window group.

allowForward boolean true

If false, the window will not contain an activity related forward button.

allowLockUnlock boolean false

If false, the window will not contain a lock/unlock button.

allowMaximize boolean true

If false, the window will not contain a maximize button.

allowMinimize boolean true

If false, the window will not contain a minimize button.

allowTabClose boolean true

If false, the tab header will not contain a close button.

allowUnstick boolean true

If false, the window will not unstick from other windows.

autoAlign boolean true

If true, a snapped window will adjust its bounds to the same width/height of the window it has stuck to, and/or will occupy the space between other windows (if any).

autoSnap boolean true

If true, when moving the window operation ends, the window will snap to one of the approaching edges of another window (if any of the approaching edges are marked with red).

base64ImageSource string

Image as base64 encoded string that will be used as a taskbar icon for the window. The supported formats are png, ico, jpg, apng.

borderColor string

Can be a color name such as "red", or a hex-encoded RGB or ARGB value.

collapseHeight number -1

Defines the height of the window when collapsed.

devToolsEnable boolean true

If true, allows opening a developer console (using F12) for the new window.

downloadSettings DownloadSettings

Object that defines file download behavior in the window.

focus boolean true

If false, the window will not be on focus when created.

hasMoveAreas boolean true

If false, the window cannot be moved.

hasSizeAreas boolean true

If false, the window cannot be resized by dragging its borders, maximizing, etc.

height number 400

Window height.

hidden boolean false

If true, the window will be started as a hidden window.

historyNavigationEnabled boolean true

If true, this will allow the users to navigate back (CTRL+Left) and forward (CTRL+Right) through the web page history.

ignoreFromLayouts boolean

If true, this window will not be saved when saving a layout, nor closed or restored when restoring a layout.

isChild boolean false

If true, the window will ope n as a child window, sharing the lifetime and the environment of the opener.

isCollapsed boolean false

If true, the window will start collapsed.

isPopup boolean false

If true, the window will open as a child window, sharing the lifetime and the environment of the opener.

isSticky boolean true

If true, the window will stick to other Glue42 Windows forming groups.

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 flat, tab and html.

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 moveAreaThickness to "0, 20, 0, 0" will set a 20 pixel thick move area at the top of the window.

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 moveAreaTopMargin to "10, 0, 0, 10" will take away 10 pixels from the left and the right side of the move area.

onTop boolean false

If true, the window will appear on top of the z-order.

relativeDirection RelativeDirection "right"

Direction ("bottom", "top", "left", "right") of positioning the window relatively to the relativeTo window. Considered only if relativeTo is supplied.

relativeTo string

The ID of the window that will be used to relatively position the new window. Can be combined with relativeDirection.

showInTaskbar boolean true

If false, the window will not appear on the Windows taskbar.

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: top, left, right, bottom, all or any combination of them (e.g., left, right).

startLocation string

Specifies the start window location. Possible options are center, topCenter, bottomCenter, leftCenter, rightCenter, full, topFull, bottomFull, leftFull, rightFull.

stickyFrameColor string "#5b8dc9"

Specifies the Glue42 window frame color. Accepts hex color as string (e.g. "#666666") or named HTML colors (e.g. "red").

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

useRandomFrameColor boolean false

If true, this will set a random (from a predefined list of colors) frame color to the new window.

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
hideGroupCaption boolean
showExtractButton boolean
showStickyButton boolean
sticky boolean

WindowSettingsobject

Description

Settings for Glue42 Windows.

Properties

Property Type Default Required Description
allowClose boolean true

If false, the window will not contain a close button.

allowCollapse boolean true

If false, the window will not contain a collapse button.

allowExtract boolean false

If true, the window will contain an Extract button when in a window group. The button can be used to break out the window from the window group.

allowForward boolean true

If false, the window will not contain an activity related forward button.

allowLockUnlock boolean false

If false, the window will not contain a lock/unlock button.

allowMaximize boolean true

If false, the window will not contain a maximize button.

allowMinimize boolean true

If false, the window will not contain a minimize button.

allowTabClose boolean true

If false, the tab header will not contain a close button.

allowUnstick boolean true

If false, the window will not unstick from other windows.

autoAlign boolean true

If true, a snapped window will adjust its bounds to the same width/height of the window it has stuck to, and/or will occupy the space between other windows (if any).

autoSnap boolean true

If true, when moving the window operation ends, the window will snap to one of the approaching edges of another window (if any of the approaching edges are marked with red).

base64ImageSource string

Image as base64 encoded string that will be used as a taskbar icon for the window. The supported formats are png, ico, jpg, apng.

borderColor string

Can be a color name such as "red", or a hex-encoded RGB or ARGB value.

collapseHeight number -1

Defines the height of the window when collapsed.

devToolsEnable boolean true

If true, allows opening a developer console (using F12) for the new window.

downloadSettings DownloadSettings

Object that defines file download behavior in the window.

focus boolean true

If false, the window will not be on focus when created.

hasMoveAreas boolean true

If false, the window cannot be moved.

hasSizeAreas boolean true

If false, the window cannot be resized by dragging its borders, maximizing, etc.

height number 400

Window height.

hidden boolean false

If true, the window will be started as a hidden window.

historyNavigationEnabled boolean true

If true, this will allow the users to navigate back (CTRL+Left) and forward (CTRL+Right) through the web page history.

ignoreFromLayouts boolean

If true, this window will not be saved when saving a layout, nor closed or restored when restoring a layout.

isChild boolean false

If true, the window will ope n as a child window, sharing the lifetime and the environment of the opener.

isCollapsed boolean false

If true, the window will start collapsed.

isPopup boolean false

If true, the window will open as a child window, sharing the lifetime and the environment of the opener.

isSticky boolean true

If true, the window will stick to other Glue42 Windows forming groups.

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 flat, tab and html.

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 moveAreaThickness to "0, 20, 0, 0" will set a 20 pixel thick move area at the top of the window.

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 moveAreaTopMargin to "10, 0, 0, 10" will take away 10 pixels from the left and the right side of the move area.

onTop boolean false

If true, the window will appear on top of the z-order.

relativeDirection RelativeDirection "right"

Direction ("bottom", "top", "left", "right") of positioning the window relatively to the relativeTo window. Considered only if relativeTo is supplied.

relativeTo string

The ID of the window that will be used to relatively position the new window. Can be combined with relativeDirection.

showInTaskbar boolean true

If false, the window will not appear on the Windows taskbar.

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: top, left, right, bottom, all or any combination of them (e.g., left, right).

startLocation string

Specifies the start window location. Possible options are center, topCenter, bottomCenter, leftCenter, rightCenter, full, topFull, bottomFull, leftFull, rightFull.

stickyFrameColor string "#5b8dc9"

Specifies the Glue42 window frame color. Accepts hex color as string (e.g. "#666666") or named HTML colors (e.g. "red").

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.

useRandomFrameColor boolean false

If true, this will set a random (from a predefined list of colors) frame color to the new window.

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

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"

  • © 2022 Glue42
  • Home
  • Privacy policy
  • Contact Sales
  • Glue42.com
  • Tick42.com
  • Overview
  • API
  • AbsoluteSizeOptions
  • AttachOptions
  • Bounds
  • ButtonInfo
  • CaptureOptions
  • DetachOptions
  • DownloadOptions
  • DownloadResult
  • DownloadSettings
  • Flydown
  • FlydownOptions
  • FlydownZone
  • GDWindow
  • Group
  • GroupsAPI
  • Loader
  • Margins
  • Neighbours
  • PageRange
  • PlacementSettings
  • PopupOptions
  • PrintOptions
  • PrintToPDFOptions
  • ScaleOptions
  • Screen
  • ShowFlydownData
  • Size
  • SizeConstraints
  • UngroupOptions
  • WindowButtons
  • WindowConfiguration
  • WindowCreateOptions
  • WindowsConfiguration
  • WindowSettings
  • WindowStyle
  • PopupTargetLocation
  • FlashMode
  • RelativeDirection
  • WindowMode
  • WindowState
Navigate
Go