cheatgui
    Preparing search index...

    Interface ValueWidget

    Widget with value

    interface ValueWidget {
        listeners: { [key: string]: EventCallback[] };
        ref: HTMLElement;
        view: View;
        _init(): void;
        addClass(...classes: string[]): this;
        destroy(): void;
        getRef(): HTMLElement | null;
        getValue(): any;
        off(event: string, callback: EventCallback): void;
        on(event: string, callback: EventCallback): void;
        onClick(f: () => void): this;
        removeClass(...classes: string[]): this;
        setContent(value: string): this;
        setText(value: string): this;
        setValue(value: any): this;
        trigger(event: string, ...args: any[]): void;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    listeners: { [key: string]: EventCallback[] }
    ref: HTMLElement
    view: View

    Methods

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • Add a click event listener to the widget.

      Parameters

      • f: () => void

        The function to call when the widget is clicked.

      Returns this

    • Set the content of the widget.

      Parameters

      • value: string

        The value to set the content to.

      Returns this

    • Set the text of the widget.

      Parameters

      • value: string

        The value to set the text to.

      Returns this