Type alias MutableWindowOptions

MutableWindowOptions: {
    alphaMask: RGB;
    alwaysOnTop: boolean;
    aspectRatio: number;
    contextMenu: boolean;
    contextMenuOptions: ContextMenuOptions;
    contextMenuSettings: ContextMenuSettings;
    cornerRounding: Partial<CornerRounding>;
    customContext: any;
    customData: any;
    frame: boolean;
    hideOnClose: boolean;
    hotkeys: Hotkey[];
    icon: string;
    includeInSnapshots: boolean;
    interop: InteropConfig;
    maxHeight: number;
    maxWidth: number;
    maximizable: boolean;
    minHeight: number;
    minWidth: number;
    minimizable: boolean;
    opacity: number;
    resizable: boolean;
    resizeRegion: ResizeRegion;
    showBackgroundImages: boolean;
    showTaskbarIcon: boolean;
    workspacePlatform: WorkspacePlatformOptions;
}

Window options that can be changed after window creation.

Type declaration

  • alphaMask: RGB

    Turns anything of matching RGB value transparent.

    Caveats:

    • Runtime flags --disable-gpu and --allow-unsafe-compositing are required. Note: Unclear behavior on remote Desktop support
    • User cannot click-through transparent regions
    • Not supported on Mac
    • Windows Aero must be enabled
    • Won't make visual sense on Pixel-pushed environments such as Citrix
    • Not supported on rounded corner windows
  • alwaysOnTop: boolean

    Default Value

    false

    Always position the window at the top of the window stack.

  • aspectRatio: number

    Default Value

    0

    The aspect ratio of width to height to enforce for the window. If this value is equal to or less than zero, an aspect ratio will not be enforced.

  • contextMenu: boolean

    Deprecated

    Superseded by contextMenuOptions, which offers a larger feature-set and cleaner syntax.

    Default Value

    true

    Show the context menu when right-clicking on the window. Gives access to the devtools for the window.

  • contextMenuOptions: ContextMenuOptions

    Configure the context menu when right-clicking on a window.

  • contextMenuSettings: ContextMenuSettings

    Deprecated

    Superseded by contextMenuOptions, which offers a larger feature-set and cleaner syntax.

    Configure the context menu when right-clicking on a window.

  • cornerRounding: Partial<CornerRounding>

    Defines and applies rounded corners for a frameless window. NOTE: On macOS corner is not ellipse but circle rounded by the average of height and width.

  • customContext: any

    A field that the user can use to attach serializable data that will be saved when Platform.getSnapshot is called. If a window in a Platform is trying to update or retrieve its own context, it can use the Platform.setWindowContext and Platform.getWindowContext calls. When omitted, inherits from the parent application. As opposed to customData, this is meant for frequent updates and sharing with other contexts. [Example]{@tutorial customContext}

  • customData: any

    A field that the user can attach serializable data to be ferried around with the window options. When omitted, inherits from the parent application.

  • frame: boolean

    Default Value

    true

    Show the window's frame.

  • hideOnClose: boolean

    Default Value

    false

    Hides the window instead of closing it when the close button is pressed.

  • hotkeys: Hotkey[]

    Defines the hotkeys that will be emitted as a hotkey event on the window. For usage example see [example]{@tutorial hotkeys}. Within Platform, OpenFin also implements a set of pre-defined actions called [keyboard commands]https://developers.openfin.co/docs/platform-api#section-5-3-using-keyboard-commands that can be assigned to a specific hotkey in the platform manifest.

  • icon: string

    A URL for the icon to be shown in the window title bar and the taskbar. When omitted, inherits from the parent application._ note: Window OS caches taskbar icons, therefore an icon change might only be visible after the cache is removed or the uuid is changed.

  • includeInSnapshots: boolean

    Default Value

    true

    Include window in snapshots returned by Platform.getSnapshot(). Turning this off may be desirable when dealing with inherently temporary windows whose state shouldn't be preserved, such as modals, menus, or popups.

  • interop: InteropConfig
  • maxHeight: number

    Default Value

    -1

    The maximum height of a window. Will default to the OS defined value if set to -1.

  • maxWidth: number

    Default Value

    -1

    The maximum width of a window. Will default to the OS defined value if set to -1.

  • maximizable: boolean

    Default Value

    true

    Allows the window to be maximized.

  • minHeight: number

    Default Value

    0

    The minimum height of the window.

  • minWidth: number

    Default Value

    true

    The minimum width of the window.

  • minimizable: boolean

    Default Value

    true

    Allows the window to be minimized.

  • opacity: number

    Default Value

    1

    A flag that specifies how transparent the window will be. Changing opacity doesn't work on Windows 7 without Aero so setting this value will have no effect there. This value is clamped between 0.0 and 1.0. In software composition mode, the runtime flag --allow-unsafe-compositing is required.

  • resizable: boolean

    Default Value

    true

    A flag to allow the user to resize the window.

  • resizeRegion: ResizeRegion

    Defines a region in pixels that will respond to user mouse interaction for resizing a frameless window.

  • showBackgroundImages: boolean

    Default Value

    false

    Platforms Only. If true, will show background images in the layout when the Views are hidden. This occurs when the window is resizing or a tab is being dragged within the layout.

  • showTaskbarIcon: boolean

    Default Value

    true

    Shows the window's icon in the taskbar.

  • workspacePlatform: WorkspacePlatformOptions

Generated using TypeDoc