Options
All
  • Public
  • Public/Protected
  • All
Menu

Class used to load GUI via XML.

Hierarchy

  • XmlLoader

Index

Constructors

  • Create a new xml loader

    Parameters

    • Optional parentClass: any

      Sets the class context. Used when the loader is instanced inside a class and not in a global context

    Returns XmlLoader

Methods

  • dispose(): void
  • Disposes the loaded layout

    Returns void

  • getNodeById(id: string): any
  • Gets a loaded node / control by id.

    Parameters

    • id: string

      the Controls id set in the xml

    Returns any

    element of type Control

  • getNodes(): any
  • Gets all loaded nodes / controls

    Returns any

    Array of controls

  • isLoaded(): boolean
  • Gets if the loading has finished.

    Returns boolean

    whether the loading has finished or not

  • loadLayout(xmlFile: any, rootNode: any, onSuccess?: Nullable<() => void>, onError?: Nullable<(error: string) => void>): void
  • Initiates the xml layout loading

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    • Optional onSuccess: Nullable<() => void>

      defines the callback called on layout load successfully.

    • Optional onError: Nullable<(error: string) => void>

      defines the callback called on layout load failure.

    Returns void

  • loadLayoutAsync(xmlFile: any, rootNode: any): Promise<any>
  • Initiates the xml layout loading asynchronously

    Parameters

    • xmlFile: any

      defines the xml layout to load

    • rootNode: any

      defines the node / control to use as a parent for the loaded layout controls.

    Returns Promise<any>

    Promise

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme