Class CvsPaneAbstract

This class provides most of the core functionality for the canvasGUI controls.

Hierarchy

Accessors

  • get id(): string
  • The unique identifier for this control.

    Returns string

  • get isClosed(): boolean
  • True if the pane is closed else false.

    Returns boolean

  • get isClosing(): boolean
  • True if the pane is closing else false.

    Returns boolean

  • 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 isOpaque(): boolean
  • This is true if the control background is opaque else false.

    Use opaque() and transparent() display / hide the background.

    Returns boolean

  • get isOpen(): boolean
  • True if the pane is open else false.

    Returns boolean

  • get isOpening(): boolean
  • true if the pane is opening else false.

    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 tab(): any
  • Get the tab button.

    Returns any

  • 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.

    Returns

    this control

    Parameters

    • c: string | CvsBaseControl

      is the actual control or its id

    • Optional rx: number
    • Optional ry: number

    Returns any

  • Close this pane.

    Returns

    this control

    Returns CvsPane

  • Get the 'depth' the pane will intrude into the canvas when open.

    Returns

    the depth

    Returns number

  • Sets the icon and its alignment relative to any text in the control.

    Processing constants are used to define the icon alignment.

    Returns

    this control

    Parameters

    • i: PGraphics

      the icon to use for this control

    • Optional align: number

      LEFT or RIGHT

    Returns CvsPane

  • Move this control relative to current position.

    Returns

    this control

    Parameters

    • x: number

      horizontal distance

    • y: number

      vertical distance

    Returns CvsPane

  • Move this control to an absolute position.

    Returns

    this control

    Parameters

    • x: number

      horizontal position

    • y: number

      vertical position

    Returns CvsPane

  • Removes the icon from the pane tab.

    Returns

    this control

    Returns CvsPane

  • Removes the text from the pane tab.

    Returns

    this control

    Returns CvsPane

  • Open this pane.

    Returns

    this control

    Returns void

  • Sets or gets the color scheme used by the pane's tab and the translucent background. Controls on the pane are not affected.

    Returns

    this pane or its color scheme

    Parameters

    • Optional name: string

      the color scheme name e.g. 'blue'

    Returns ColorScheme | CvsBaseControl

  • This sets the event handler to be used when this control fires an event. The parameter can take one of three forms:

    1. Arrow function definition
    2. Anonymous function definition
    3. Named function declaration

    Returns

    this control

    Parameters

    • event_handler: Function

      the function to handle this control's events.

    Returns CvsPane

  • Shrink the pane tab to fit its contents.

    To shrink on one dimension only pass either 'w' (width) or 'h' (height) to indicate which dimmension to shrink

    Returns

    this control

    Parameters

    • Optional dim: string

      the dimension to shrink

    Returns any

  • Sets the current text.

    Processing constants are used to define the alignment.

    Returns

    this control

    Parameters

    • t: string

      the text toset

    • Optional align: number

      LEFT, CENTER or RIGHT

    Returns CvsPane

  • Sets the text font for the pane tab.

    Returns

    this control

    Parameters

    • Optional tf: any

      the text font to use

    Returns CvsPane

  • Sets the text size for the pane tab.

    Returns

    this control

    Parameters

    • Optional ts: number

      the text size to use

    Returns CvsPane

  • Sets the text style for the pane tab.

    Returns

    this control

    Parameters

    • Optional ty: number

      the text style to use

    Returns CvsPane

Generated using TypeDoc