canvas-gui
    Preparing search index...

    Class CvsPin

    This is a placeholder for other controls (its children)

    A pin has a position but no visual representation and its children will be shown relative to the pin's xy position.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • gui: GUI
      • id: string
      • x: number
      • y: number

      Returns CvsPin

    Accessors

    • get id(): string

      The unique identifier for this control.

      Returns string

    • get isEnabled(): boolean

      This is true if the control can respond to UI events else false.

      Use enable() and disable() to enable and disable it.

      Returns boolean

    • get isVisible(): boolean

      This is true if the control is visible else false.

      Use hide() and show() to set visibility.

      Returns boolean

    • get type(): string

      The type name for this control.
      (type name = class name without the Cvs prefix)

      Returns string

    Methods

    • Add a child to this control using its relative position [rx, ry]. If rx and ry are not provided then it uses the values set in the child.

      Parameters

      • child: any

        is the actual control or its id

      • Optionalrx: number
      • Optionalry: number

      Returns any

      this control

    • Disables this control and all its children.

      Parameters

      • Optionalcascade: boolean

        if true disable child controls

      Returns CvsPin

      this control

    • Enables this control and all its children.

      Parameters

      • Optionalcascade: boolean

        if true enable child controls

      Returns CvsPin

      this control

    • Hide all the children for this 'pin'.

      Parameters

      • Optionalcascade: boolean

        always true

      Returns CvsPin

      this control

    • Remove this control from its parent

      Returns CvsPin

      this control

    • Move this control relative to current position.

      Parameters

      • x: number

        horizontal distance

      • y: number

        vertical distance

      Returns CvsPin

      this control

    • Move this control to an absolute position.

      Parameters

      • x: number

        horizontal position

      • y: number

        vertical position

      Returns CvsPin

      this control

    • Adds this control to another control which becomes its parent.

      Parameters

      • parent: any

        is the parental control or its id

      • Optionalrx: number

        x position relative to parent

      • Optionalry: number

        y position relative to parent

      Returns CvsPin

      this control

    • Remove a child control from this one so that it stays in same screen position.

      Parameters

      • child: any

        the control to remove or its id

      Returns CvsPin

      this control

    • An alternative to the enable / disable methods.

      Parameters

      • enable: boolean

        true / false

      • Optionalcascade: boolean

        true apply to all children

      Returns CvsPin

      this control

    • An alternative to the show / hide methods.

      Parameters

      • visible: boolean

        true / false

      • Optionalcascade: boolean

        if true hide children

      Returns CvsPin

      this control

    • Show all the children for this 'pin'.

      Parameters

      • Optionalcascade: boolean

        always true

      Returns CvsPin

      this control