Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a window object.

Hierarchy

  • StandardWindow

Index

Constructors

constructor

  • [internal] Creates a new window with the specified parameters.

    This should not be used in user applications.

    Parameters

    Returns StandardWindow

Properties

_childWindowDlg

_childWindowDlg: null

[internal] Do not use.

_ext

_ext: { windowSnap: { originalSize: WMSizeVector; snapped: boolean; snappedSize: WMSizeVector } }

[internal] Window extensions, do not use.

Type declaration

_ownerProps

_ownerProps: null

[internal] Do not use.

_waitResolveFn

_waitResolveFn: boolean

[internal] Do not use.

_wmStylingAllowed

_wmStylingAllowed: boolean

[internal] Do not use.

animations

animations: WMAnimations

The window animations to use.

appbarRegistered

appbarRegistered: boolean

Whether this window is registered on the app bar (taskbar)

id

id: string

The window ID.

isRegistered

isRegistered: boolean

Whether this window is registered.

maximizeInfo

maximizeInfo: WMMaximizeInfo

Window maximization info.

maximized

maximized: boolean

Whether this window is maximized.

minimized

minimized: boolean

Whether this window is minimized.

ownerWindow

ownerWindow: null

[internal] Do not use.

params

params: WindowParams

A copy of the creation parameters.

shown

shown: boolean

Whether the window is shown.

title

title: string

The window title.

uiUpdating

uiUpdating: boolean

Whether the UI is being updated.

useIcon

useIcon: boolean

Whether the window uses an icon.

Optional windowIcon

windowIcon: string

The window icon URL.

wndObject

wndObject: HTMLDivElement

The underlying HTML element for this window.

Methods

_destroy

  • _destroy(): void
  • [internal] Do not use.

    Returns void

_onCloseEnd

  • _onCloseEnd(): void
  • [internal] Called when the window close animation is finished.

    Returns void

activate

  • activate(): void
  • Activates the window.

    Returns void

center

  • center(current?: boolean): void
  • Centers the window.

    Parameters

    • Optional current: boolean

    Returns void

close

  • close(ignoreEvents?: boolean): void
  • Closes the window.

    Parameters

    • Optional ignoreEvents: boolean

      Whether to ignore closing events.

    Returns void

darkenElements

  • darkenElements(): void
  • Darkens all UI elements when a window is about to be deactivated.

    Returns void

getBodyContainer

  • getBodyContainer(): HTMLDivElement
  • Returns the HTML container.

    Returns HTMLDivElement

getBounds

  • getBounds(): DOMRect
  • Return window bounds.

    Returns DOMRect

getComputedBounds

  • getComputedBounds(): DOMRect
  • Get computed window bounds.

    deprecated
    • getBounds() is the default now.

    Returns DOMRect

isActive

  • isActive(): void
  • Returns whether this window is active.

    Returns void

lightenElements

  • lightenElements(): void
  • Does the reverse of darkenElements().

    Returns void

Optional onactivate

  • onactivate(): void
  • Called when the window is activated.

    Returns void

Optional onclose

  • Called on window closure.

    Parameters

    Returns void

Optional ondarkenelements

  • ondarkenelements(): void
  • [internal] Do not use.

    Returns void

Optional ondeactivate

  • ondeactivate(): void
  • Called when the window is deactivated.

    Returns void

Optional onfinalclose

  • onfinalclose(): void
  • [internal] Do not use.

    Returns void

Optional onlightenelements

  • onlightenelements(): void
  • [internal] Do not use.

    Returns void

Optional onload

  • onload(): void
  • [internal] Do not use.

    Returns void

Optional onminimize

  • onminimize(): void
  • Called when the window is minimized.

    Returns void

Optional onmove

  • onmove(): void
  • Called when the window is moved.

    Returns void

Optional onresize

  • onresize(): void
  • Called when the window is resized.

    Returns void

Optional onshown

  • onshown(): void
  • Called when the window is shown.

    Returns void

randomizePosition

  • randomizePosition(): void
  • Randomizes the window position.

    Returns void

registerAppBar

  • registerAppBar(): void
  • Registers the application bar for this window.

    Returns void

registerWindow

  • registerWindow(): void
  • Registers the Window in the window system and creates appbar elements, etc.

    Returns void

setControlBoxStyle

  • setControlBoxStyle(cbstyle: "WS_CBX_MINMAXCLOSE" | "WS_CBX_CLOSE" | "WS_CBX_MINCLOSE" | "WS_CBX_NONE"): void
  • Sets the control box style for this window.

    This also respects the Aero-like setting of disabling buttons rather than removing them.

    Parameters

    • cbstyle: "WS_CBX_MINMAXCLOSE" | "WS_CBX_CLOSE" | "WS_CBX_MINCLOSE" | "WS_CBX_NONE"

      Control box style.

    Returns void

setHtml

  • setHtml(text: string): void
  • Sets the window HTML contents.

    Parameters

    • text: string

      The HTML text to use.

    Returns void

setOwner

  • [internal] Sets the owner for this window.

    deprecated

    Parameters

    Returns void

setPosition

  • setPosition(x: number, y: number): void
  • Sets the position of a window.

    Parameters

    • x: number

      The x coordinate to use.

    • y: number

      The y coordinate to use.

    Returns void

setSize

  • setSize(w: number, h: number, ignoreThemeOffsets?: boolean): void
  • Sets a new window size.

    Parameters

    • w: number

      The new width of the window.

    • h: number

      The new height of the window.

    • Optional ignoreThemeOffsets: boolean

    Returns void

setStartPos

  • setStartPos(noMax?: boolean): void
  • Set the window starting position

    Parameters

    • Optional noMax: boolean

      If the window should continue past a threshold or not

    Returns void

setTitle

  • setTitle(text: string): void
  • Sets the title of the window.

    Parameters

    • text: string

      The text to use as title.

    Returns void

setVisible

  • setVisible(visibility: boolean): void
  • Sets the window visibility.

    Parameters

    • visibility: boolean

      Should the window be visible?

    Returns void

setWindowIcon

  • setWindowIcon(iconUrl: string): false | HTMLElement
  • Sets the window icon to the specified URL.

    Parameters

    • iconUrl: string

      The URL of the icon to use.

    Returns false | HTMLElement

show

  • show(): void
  • Shows the window.

    Returns void

showTitlebarMenu

  • showTitlebarMenu(e: MouseEvent): void
  • Shows the titlebar menu

    Parameters

    • e: MouseEvent

      The mouse event

    Returns void

toggleMaximize

  • toggleMaximize(): void
  • Toggles whether the window is maximized or not.

    Returns void

toggleMinimize

  • toggleMinimize(skipAnimation?: boolean): void
  • Minimizes the window.

    Parameters

    • Optional skipAnimation: boolean

      Disable bounceIn animation.

    Returns void

wait

  • wait(): Promise<void>
  • Waits for window closure.

    Returns Promise<void>

Generated using TypeDoc