cheatgui
    Preparing search index...

    Class Window

    This class represents a window with various settings and the ability to add child elements.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new window element.

      Parameters

      • options: {
            collapseThreshold?: number;
            collapsible?: boolean;
            draggable?: boolean;
            dragThreshold?: number;
            expanded?: boolean;
            height?: number;
            resizable?: boolean;
            title?: string;
            width?: number;
            x?: number;
            y?: number;
        }

        The options for the window

        • OptionalcollapseThreshold?: number

          The threshold at which the window can be collapsed

        • Optionalcollapsible?: boolean

          Whether the window can be collapsed

        • Optionaldraggable?: boolean

          Whether the window can be dragged

        • OptionaldragThreshold?: number

          The threshold at which the window can be dragged

        • Optionalexpanded?: boolean

          Whether the window is initially expanded

        • Optionalheight?: number

          The height of the window

        • Optionalresizable?: boolean

          Whether the window can be resized

        • Optionaltitle?: string

          The title of the window

        • Optionalwidth?: number

          The width of the window

        • Optionalx?: number

          The x position of the window

        • Optionaly?: number

          The y position of the window

      Returns Window

    Properties

    arrowRef: HTMLElement
    collapsed: boolean
    contentRef: HTMLElement
    headerRef: HTMLElement
    height: number
    isDragging: boolean
    isResizing: boolean
    listeners: { [key: string]: EventCallback[] }
    ref: HTMLElement
    resizeRef: HTMLElement
    titleRef: HTMLElement
    view: View
    width: number
    x: number
    y: number

    Accessors

    Methods

    • The append function appends a widget to a parent element and updates the list of children.

      Parameters

      Returns this

    • The collapse function collapses the window.

      Returns this

    • The expand function expands the window.

      Returns this

    • The focus function sends the window to the top of the window stack and adds active class.

      Returns this

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

      Returns object

    • The getRef function returns the reference to the window element.

      Returns HTMLElement

    • The hide function hides the window.

      Returns this

    • The loadConfig function loads a JSON configuration into the window.

      Parameters

      • config: object

        The JSON configuration.

      Returns this

    • The move function moves the window to the specified coordinates.

      Parameters

      • x: number

        The x coordinate of the window.

      • y: number

        The y coordinate of the window.

      Returns this

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • Parameters

      • event: string
      • callback: EventCallback

      Returns void

    • The resize function sets the width and height of the window.

      Parameters

      • width: number

        The new width of the window

      • height: number

        The new height of the window

      Returns this

    • The setContent function sets the content of a view.

      Parameters

      • value: string

        The value parameter in the setContent function represents the content that you want to set for a particular view. It is the data or information that you want to display or update in the view.

      Returns this

    • The setHeight function sets the height of the window.

      Parameters

      • height: number

      Returns this

    • The setText function sets the text value of a view element.

      Parameters

      • value: string

        The value parameter in the setText function represents the text that you want to set for a particular view. It is the text that you want to display or update in the view.

      Returns this

    • Set the title of the window to the specified HTML string.

      Parameters

      • html: string

        The HTML to set as the title

      Returns this

    • The setWidth function sets the width of the window.

      Parameters

      • width: number

      Returns this

    • The show function shows the window.

      Returns this

    • The toggle function toggles the window between collapsed and expanded.

      Returns this