rad-gui
    Preparing search index...

    BaseControl is the foundation class for all controllers It provides common functionality for managing values, DOM elements, event handling, and state management that all specific controller types use

    BaseControl

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new controller

      Parameters

      • parent: any

        The parent GUI instance

      • object: any

        Object containing the property to control

      • property: any

        Name of the property to control

      • className: any

        CSS class name for the controller type

      • elementType: keyof HTMLElementTagNameMap = 'div'

        HTML element type for the controller

      Returns BaseControl

    Properties

    _changed: boolean = false

    Whether the value has changed since the last finishChange event

    _disabled: boolean = false

    Whether the controller is disabled

    _hidden: boolean = false

    Whether the controller is hidden

    _listenCallbackID: any

    ID of the animation frame when listening for changes

    _listening: boolean = false

    Whether the controller is actively listening for external changes

    _listenPrevValue: any

    Previous value when listening for changes

    _name: any

    Name of the controller (typically matches the property name)

    _onChange: any

    Callback for when the value changes

    _onFinishChange: any

    Callback for when value changes are completed

    $elForDisable: any

    DOM element that will be disabled when controller is disabled

    $name: HTMLDivElement

    DOM element for displaying the property name

    $widget: HTMLDivElement

    DOM element containing the control widget

    domElement: HTMLElement

    Main DOM element for this controller

    initialValue: any

    Initial value of the controlled property

    object: any

    Object containing the property to control

    parent: any

    Parent GUI instance

    property: any

    Property name being controlled

    nextNameID: any

    Used for generating unique IDs

    Methods

    • Enables or disables listening for external changes to the property

      Parameters

      • listen: boolean = true

        Whether to listen for changes

      Returns BaseControl

      This controller instance (for chaining)

    • Registers a callback for when value changes are completed

      Parameters

      • callback: any

        Function called when value changes are completed

      Returns BaseControl

      This controller instance (for chaining)

    • Replaces this controller with an options controller

      Parameters

      • options: any

        Option values for the new controller

      Returns any

      The new options controller