Options
All
  • Public
  • Public/Protected
  • All
Menu

Class YesNoDialog

A simple confirm dialog

Input data:

{
     title: string, // window title
     icon?: string, // label icon
     iconclass?: string, // label iconclass
     text: string // label text
}

Callback data: boolean

export

Hierarchy

Index

Constructors

constructor

Properties

Protected _api

_api: typeof API

Reference to the core API namespace

memberof

BaseModel

Protected _gui

_gui: typeof GUI

Reference to the core GUI namespace

memberof

BaseModel

Protected _observable

_observable: Announcer

Each model has its own local announcement system to handle all local events inside that model.

This observable object is propagate to all the UI elements (AFXTag) inside the model

memberof

BaseModel

args

The argument of the model

memberof

BaseModel

birth

birth: number

Placeholder for the process creation timestamp

memberof

BaseModel

data

data: GenericObject<any>

Placeholder of the dialog input data

memberof

BaseDialog

dialog

dialog: BaseDialog

Reference to the model's dialog

memberof

BaseModel

handle

handle: (d: any) => void

Placeholder for the dialog callback on exit

memberof

BaseDialog

Type declaration

    • (d: any): void
    • Parameters

      • d: any

      Returns void

Protected host

host: string

The HTML element ID of the virtual desktop

memberof

BaseModel

Protected markup

markup: string | BaseFileHandle

Placeholder for the UI scheme to be rendered. This can be either the string definition of the scheme or the VFS file handle of the scheme file

memberof

BasicDialog

modal

modal: boolean

Placeholder indicates whether the sub window is in modal mode. This value is reserver for future use

memberof

SubWindow

name

name: string

The class name

memberof

BaseModel

parent

parent: BaseModel | typeof GUI

Reference to the parent of the current sub-window

memberof

SubWindow

pid

pid: number

The process number of the current model. For sub-window this number is the number of the parent window

memberof

BaseModel

scheme

scheme: HTMLElement

Reference the DOM element of the UI scheme belong to this model

memberof

BaseModel

Protected systemsetting

systemsetting: typeof setting

Reference to the system setting

memberof

BaseModel

Static dependencies

dependencies: string[]

The javascript or css files that the model depends on. All dependencies will be loaded before the model is rendered

static
memberof

BaseModel

Static meta

Place holder for model meta-data

static
memberof

BaseModel

Static scheme

scheme: string

If the markup variable is not provided, then the init function will find the scheme definition in this class variable

static
memberof

BasicDialog

Static singleton

singleton: boolean

Allow singleton on this model

static
memberof

BaseModel

Static style

style: HTMLElement | string

Reference to the CSS Element of the model

static
memberof

BaseModel

Static type

type: ModelType

Different model type

static
memberof

BaseModel

Accessors

observable

Methods

Protected ask

Protected call

  • Execute a server side script and get back the result

    memberof

    BaseModel

    Parameters

    • cmd: GenericObject<any>

      execution indication, should be:

      {
           path?: string, // VFS path to the server side script
           code: string, // or server side code to be executed
           parameters: any // the parameters of the server side execution
      }
      

    Returns Promise<any>

error

fail

  • fail(m: string, e?: Error): void

Protected find

hide

  • hide(): void

init

  • init(): void

main

  • main(): void

meta

notify

Protected off

  • off(e: string, f?: (d: any) => void): void
  • Unsubscribe an event

    memberof

    BaseModel

    Parameters

    • e: string

      event name or * (all events)

    • Optional f: (d: any) => void
        • (d: any): void
        • Parameters

          • d: any

          Returns void

    Returns void

Protected on

  • on(e: string, f: (d: any) => void): void
  • Subscribe to a local event

    memberof

    BaseModel

    Parameters

    • e: string

      event name

    • f: (d: any) => void

      event callback

        • (d: any): void
        • Parameters

          • d: any

          Returns void

    Returns void

Protected one

  • one(e: string, f: (d: any) => void): void
  • subscribe once to a local event

    memberof

    BaseModel

    Parameters

    • e: string

      name of the event

    • f: (d: any) => void

      event callback

        • (d: any): void
        • Parameters

          • d: any

          Returns void

    Returns void

Protected onexit

openDialog

path

  • path(): string

Protected publish

quit

  • quit(): void

Protected render

  • render(p: string): void

Protected select

show

  • show(): void

Protected stream

  • stream(): Promise<WebSocket>
  • Connect to the server side api using a websocket connection

    Server side script can be execute inside the stream by writing data in JSON format with the following interface

    {
         path?: string, // VFS path to the server side script
         code: string, // or server side code to be executed
         parameters: any // the parameters of the server side execution
    }
    
    memberof

    BaseModel

    Returns Promise<WebSocket>

Protected subscribe

  • subscribe(e: string, f: (d: any) => void): void
  • subscribe to an event on the global announcement system

    memberof

    BaseModel

    Parameters

    • e: string

      event name

    • f: (d: any) => void

      event callback

        • (d: any): void
        • Parameters

          • d: any

          Returns void

    Returns void

throwe

  • throwe(): Error

Protected trigger

  • trigger(e: string, d?: any): void

update

  • update(): void

Protected updateLocale

  • updateLocale(name: string): void

warn