Options
All
  • Public
  • Public/Protected
  • All
Menu

Class representing the DisplayContextFactory object.

The main function to use is openDisplayContext

Hierarchy

  • DisplayWorker

Index

Properties

io: Io
displayContext?: DisplayContext
uniformGridCellSize?: UniformGridCellSize

Constructors

Methods

  • getDisplays(): Promise<Map<string, Bounds>>
  • gets the Display Workers details running in the environment.

    Returns Promise<Map<string, Bounds>>

    A ES2015 Map object with displayNames as keys and bounds as values.

  • list(): Promise<string[]>
  • setActive(displayContextName: string, reset?: boolean): Promise<string | false>
  • sets a display context active. Making a display context active ensures only windows of the display context are visible. Windows from other display contexts are hidden.

    Parameters

    • displayContextName: string
    • reset: boolean = false

    Returns Promise<string | false>

    return false if the display context name is already active.

  • create(displayContextName: string, windowSettings?: {}): Promise<DisplayContext>
  • Creates a display context. If the display context already exists, it is made active and a DisplayContext Object is restored from store.

    example

    { 'windowA': { 'displayName': 'main', 'x': 0, 'y': 0, 'width': 500, 'height': 500, 'contentGrid': { 'row': 2, 'col': 2, 'padding': 5 }, 'fontSize': '50px' }, 'windowB': { 'displayName': 'main', 'x': 505, 'y': 0, 'width': 500, 'height': 500, 'contentGrid': { 'row': 2, 'col': 2, 'padding': 5 } }, 'windowC': { 'displayName': 'main', 'x': 1010, 'y': 0, 'width': 500, 'height': 500, 'contentGrid': { 'row': 2, 'col': 2, 'padding': 5 }, 'gridBackground' : { '1|1' : 'white', '1|2' : 'grey', '2|1' : 'grey', '2|2' : 'white' } } }

    Parameters

    • displayContextName: string
    • windowSettings: {} = {}

      Returns Promise<DisplayContext>

      A DisplayContext Object is returned.

    • hides all display contexts. If the display context already exists, it is made active and a DisplayContext Object is restored from store.

      Returns Promise<BaseResponse[]>

      A array of JSON object containing status of hide function execution at all display workers.

    • onViewObjectCreated(handler: any): void
    • onViewObjectHidden(handler: any): void
    • onViewObjectShown(handler: any): void
    • onViewObjectClosed(handler: any): void
    • onViewObjectBoundsChanged(handler: any): void
    • onViewObjectUrlChanged(handler: any): void
    • onViewObjectUrlReloaded(handler: any): void
    • onViewObjectCrashed(handler: any): void
    • onViewObjectGPUCrashed(handler: any): void
    • onViewObjectPluginCrashed(handler: any): void
    • onDisplayContextCreated(handler: any): void
    • onDisplayContextChanged(handler: any): void
    • onDisplayContextClosed(handler: any): void
    • onDisplayWorkerRemoved(handler: any): void
    • Display worker removed event. Use .onDisplayWorkerQuit instead if you want to listen to displayworker unexpected quit event.

      Parameters

      • handler: any

      Returns void

    • onDisplayWorkerAdded(handler: any): void

    Generated using TypeDoc