cheatgui
    Preparing search index...

    Class TreeWidget

    A tree that can be expanded and collapsed, and can also have children.

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new tree that can be expanded and collapsed. You can add children to the tree with the addChild method so that they appear in the tree.

      Parameters

      • Optionaltitle: string = ''

        The title of the tree.

      • Optionalexpanded: boolean = false

        Whether the tree is expanded.

      Returns TreeWidget

    Properties

    arrowRef: HTMLSpanElement
    contentRef: HTMLDivElement
    headerRef: HTMLDivElement
    listeners: { [key: string]: EventCallback[] }
    ref: HTMLDivElement
    titleRef: HTMLSpanElement
    view: View

    Methods

    • The getConfig function returns a JSON representation of all values in the tree.

      Returns object

    • 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 text of the widget.

      Parameters

      • value: string

        The value to set the text to.

      Returns this

    • Set the title of the tree.

      Parameters

      • html: string

      Returns this