Class CvsPaneAbstract

Base class for all controls

It provides most of the functionality for the controls

Hierarchy

Properties

action: Function = ...

The event handler for this control. Although it is permitted to set this property directly it is recommended that the setAction(...) method is used to define the event handler actions.

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 name

    • Optional rx: number
    • Optional ry: number

    Returns any

  • Sets the pane background color to use when open. There are 2 predined option ...

    1. 'dark' semi transparent black background : 'rgba(0,0,0,0.6)'
    2. 'light' semi transparent white background : 'rgba(255,255,255,0.6)'

    Alternatively the user can provide any valid CSS color specification but if invalid the results are unpredicatable and likely to cause the sketch to fail.

    Returns

    this control

    Parameters

    • rgba: string

      'light', 'dark' or valid CSS color specification

    Returns CvsPane

  • 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

  • Returns

    true if the pane is closed else false

    Returns boolean

  • Returns

    true if the pane is closinging else false

    Returns boolean

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

    Returns

    true if the control is enabled else false

    Returns boolean

  • Returns

    true if the pane is open else false

    Returns boolean

  • Returns

    true if the pane is opening else false

    Returns boolean

  • Returns

    true if this control is visible

    Since

    0.9.3

    Returns boolean

  • Returns

    the unique identier for this control

    Returns string

  • Removes the icon from the pane tab.

    Returns

    this control

    Returns CvsPane

  • Removes the text from the pane tab.

    Returns

    this control

    Returns CvsPane

  • Close this pane

    Returns

    this control

    Returns void

  • Sets or gets the color scheme used by this control.

    Returns

    this control or the control's color scheme

    Parameters

    • Optional id: string

      the color scheme id e.g. 'blue'

    • Optional cascade: boolean

      if true propogate scheme to all child controls.

    Returns any

  • This sets the event handler to be used when this control fires an event. The parameter can take 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 controls event

    Returns CvsPane

  • Shrink the pane tab to fit 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

  • Returns

    the tab button

    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 size for the pane tab.

    Returns

    this control

    Parameters

    • Optional ts: number

      the text size to use

    Returns CvsPane

Generated using TypeDoc