WoW:XML inheritance
← XML UI
This is a reference for Inheritance of the XML elements of the WoW XML Ui hieracry.
SummaryEdit
WoW UI XML elements have multiple types of hierarchical relationships between them. Some XML elements are derived from others, which means that they inherit the attributes and other element definitions of their parent. Generally the same rules for inheritance hierarchy and attributes apply to both the XML based FrameXML, and the Lua based UIObject API. However, this is not always true.
Inheritance ExampleEdit
- LayoutFrame
- name (attribute)
- Frame (is a LayoutFrame too)
- name (attribute, inherited from LayoutFrame)
- Frames (element array of Frame)
- Button (is a Frame too, which is also a LayoutFrame)
- name (attribute, inherited from LayoutFrame through Frame)
- Frames (element array of Frame, inherited from Frame)
- Button (is a Frame too, which is also a LayoutFrame)
- Frame (is a LayoutFrame too)
ReferenceEdit
Note: This inheritance hierarchy is not to be confused with the parent-child relationships of the actual widgets created when the XML files are loaded, or confused with the containership hierarcy. It also shouldn't be confused with the actual inheritance mechanism when templates (or virtual elements) are defined and used.
In the XML files, wherever a particular type of element is expected, you may instead use a element of a type that is derived from that one. In the actual XML elements reference, curly braces {} are used to indicate when such substitution is possible.