Class XmlLoader
Hierarchy
- XmlLoader
Index
Constructors
Methods
Constructors
constructor
-
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
disposeSearch playground for dispose
-
Disposes the loaded layout
Returns void
get Node ByIdSearch playground for getNodeById
-
Gets a loaded node / control by id.
Parameters
-
id: string
the Controls id set in the xml
Returns any
element of type Control
-
get NodesSearch playground for getNodes
-
Gets all loaded nodes / controls
Returns any
Array of controls
is LoadedSearch playground for isLoaded
-
Gets if the loading has finished.
Returns boolean
whether the loading has finished or not
load LayoutSearch playground for loadLayout
-
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
-
load Layout AsyncSearch playground for loadLayoutAsync
-
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
-
Class used to load GUI via XML.