Options
All
  • Public
  • Public/Protected
  • All
Menu

Controllers are the main unit of the library. They store an array of Widgets that are to be displayed together on a client.

example

const device = new Device({
      name:"testDevice",
      actions:[
          new HttpAction({
              name:"on",
              method:"GET",
              base:"http://device.ip/",
              path:"turnOn"
          })
      ]
})

new Controller({
    name:"Test Controller",
    layout:[
      new Button({
          action:device.getAction("on"),
          icon:"power-on"
     })
   ]
})

Hierarchy

  • Controller

Constructors

Properties

Methods

Constructors

constructor

  • new Controller(__namedParameters: object): Controller

Parameters

  • __namedParameters: object
    • layout: Widget[]

      An array of Widgets that will be displayed stacked or potentially wrapped on the client

    • name: string

      The name of the Controller displayed in the client

Returns Controller

Properties

layout

layout: Widget[]

name

name: string

Methods

Static fromJSON

Parameters

  • json: object
    • layout: any []
    • name: string

Returns Controller

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.