WoW Ui XML Definition
I parsed the Ui.xsd and made it more readable to people who do already understand a bit of XML and programming.
General Frame
<Ui>
<LayoutFrame /> <!-- can be also any of the same type, e.g. Frame, Button,etc. -->
<Include />
<Script />
</Ui>
<LayoutFrame name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false">
<Size />
<Anchors />
</LayoutFrame>
<Size>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</Size>
<Anchors point="FRAMEPOINT" relativeTo="string" relativePoint="FRAMEPOINT">
<Offset />
</Anchors>
<Offset>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</Offset>
<!-- Frame of type LayoutFrame -->
<Frame name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
</Frame>
<Layers>
<Layer />
</Layers>
<Layer level="ARTWORK">
<Texture />
<FontString />
</Layer>
<!-- TitleRegion of type LayoutFrame -->
<TitleRegion name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false">
<Size />
<Anchors />
</TitleRegion>
<ResizeBounds>
<minResize>
<maxResize>
</ResizeBounds>
<minResize>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</minResize>
<maxResize>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</maxResize>
<Backdrop bgFile="string" edgeFile="string" tile="false">
<BackgroundInsets />
<TileSize>
<AbsValue x="int">
<RelValue x="float">
</TileSize>
<EdgeSize>
<AbsValue x="int">
<RelValue x="float">
</EdgeSize>
</Backdrop>
<BackgroundInsets>
<AbsInset left="[int]" right="[int]" top="[int]" bottom="[int]">
<RelInset left="float" right="float" top="float" bottom="float">
</BackgroundInsets>
<HitRectInsets>
<AbsInset left="[int]" right="[int]" top="[int]" bottom="[int]">
<RelInset left="float" right="float" top="float" bottom="float">
</HitRectInsets>
<Frames>
<Frame />
</Frames>
<!-- Texture of type LayoutFrame -->
<Texture name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
file="string" alphaMode="BLEND">
<Size />
<Anchors />
<TexCoords left="float" right="float" top="float" bottom="float" />
<Color />
<Gradient orientation="HORIZONTAL">
<MinColor r="float" g="float" b="float" a="1.0" />
<MaxColor r="float" g="float" b="float" a="1.0" />
</Gradient>
</Texture>
<Color r="float" g="float" b="float" a="1.0" />
<!-- FontString of type LayoutFrame -->
<FontString name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
text="string" spacing="0.0" outline="NONE" monochrome="false" nonspacewrap="false"
justifyV="MIDDLE" justifyH="CENTER" maxLines="0" font="string" bytes="255">
<FontHeight>
<AbsValue x="int">
<RelValue x="float">
</FontHeight>
<Color />
<Shadow>
<Color />
<Offset />
</Shadow>
</FontString>
|
Button
<!-- Button of Type Frame -->
<Button name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
text="string">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<NormalTexture /> <!-- see Texture -->
<PushedTexture /> <!-- see Texutre -->
<DisabledTexture /> <!-- see Texture -->
<HighlightTexture /> <!-- See Texture -->
<NormalText /> <!-- See FontString -->
<HighlightText /> <!-- See FontString -->
<DisabledText /> <!-- See FontString -->
<PushedTextOffset>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</PushedTextOffset>
</Button>
|
CheckButton
<!-- CheckButton of Type Button -->
<CheckButton name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
text="string"
checked="false">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<NormalTexture /> <!-- see Texture -->
<PushedTexture /> <!-- see Texutre -->
<DisabledTexture /> <!-- see Texture -->
<HighlightTexture /> <!-- See Texture -->
<NormalText /> <!-- See FontString -->
<HighlightText /> <!-- See FontString -->
<DisabledText /> <!-- See FontString -->
<PushedTextOffset>
<AbsDimension x="int" y="int" />
<RelDimension x="float" y="float" />
</PushedTextOffset>
<CheckedTexture /> <!-- See Texture -->
<DisabledCheckedTexture /> <!-- See Texture -->
</CheckButton>
|
ColorSelect
<!-- ColorSelect of type Frame -->
<ColorSelect name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<ColorWheelTexture /> <!-- see Texture -->
<ColorWheelThumbTexture /> <!-- see Texture -->
<ColorValueTexture /> <!-- see Texture -->
<ColorValueThumbTexture /> <!-- see Texture -->
</ColorSelect>
|
EditBox
<!-- EditBox of type Frame -->
<EditBox name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
letters="0" blinkSpeed="0.5" numeric="false" password="false" mulitLine="false"
historyLines="0" autoFocus="true" ignoreArrows="false">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<FontString />
<HighlightColor r="float" g="float" b="float" a="1.0" />
<TextInsets>
<AbsInset left="[int]" right="[int]" top="[int]" bottom="[int]">
<RelInset left="float" right="float" top="float" bottom="float">
</TextInsets>
</EditBox>
|
MessageFrame
<!-- Frame of type LayoutFrame -->
<MessageFrame name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
fadeDuration="3.0" insertMode="BOTTOM">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<FontString />
<TextInsets>
<AbsInset left="[int]" right="[int]" top="[int]" bottom="[int]">
<RelInset left="float" right="float" top="float" bottom="float">
</TextInsets>
</MessageFrame>
|
Model
<!-- Model of type Frame -->
<Model name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
file="string" scale="1.0" fogNear="0.0" fogFar="1.0">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<FogColor r="float" g="float" b="float" a="float" />
</Model>
|
MovieFrame
ScrollFrame
ScrollingMessageFrame
<!-- Frame of type LayoutFrame -->
<ScrollingMessageFrame name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
fade="true" fadeDuration="3.0" displayDuration="10.0" maxLines="8">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<FontString />
<TextInsets>
<AbsInset left="[int]" right="[int]" top="[int]" bottom="[int]">
<RelInset left="float" right="float" top="float" bottom="float">
</TextInsets>
</ScrollingMessageFrame>
|
Slider
<!-- Slider of type Frame -->
<Slider name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
drawLayer="OVERLAY" minValue="float" maxValue="float" defaultValue="float" valueStep="float" orientation="VERTICAL">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<ThumbTexture /> <!-- See Texture -->
</Slider>
|
SimpleHTML
<!-- SimpleHTML of type Frame -->
<SimpleHTML name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
file="string">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<FontStringHeader1 /> <!-- See FontString -->
<FontStringHeader2 /> <!-- See FontString -->
<FontStringHeader3 /> <!-- See FontString -->
</SimpleHTML>
|
StatusBar
<!-- StatusBar of type Frame -->
<StatusBar name="string" inherits="string" virtual="false" setAllPoints="false" hidden="false"
alpha="float" parent="string" toplevel="false" movable="false" resizable="false" frameStrata="PARENT" framelevel="int" id="0"
enableMouse="false" enableKeyboard="false"
drawLayer="ARTWORK" minValue="float" maxValue="float" defaultValue="float">
<Size />
<Anchors />
<TitleRegion />
<ResizeBounds />
<Backdrop />
<HitRectInsets />
<Layers />
<Frames />
<Scripts />
<BarTexture /> <!-- See Texture -->
<BarColor r="float" g="float" b="float" a="1.0" />
</StatusBar>
|
Scripts
<Scripts>
<OnLoad />
<OnSizeChanged />
<OnEvent />
<OnUpdate />
<OnShow />
<OnHide />
<OnEnter />
<OnLeave />
<OnMouseDown />
<OnMouseUp />
<OnMouseWheel />
<OnDragStart />
<OnDragStop />
<OnReceiveDrag />
<OnClick />
<OnDoubleClick />
<OnValueChanged />
<OnUpdateModel />
<OnAnimFinished />
<OnEnterPressed />
<OnEscapePressed />
<OnSpacePressed />
<OnTabPressed />
<OnTextChanged />
<OnTextSet />
<OnCursorChanged />
<OnInputLanguageChanged />
<OnEditFocusGained />
<OnEditFocusLost />
<OnHorizontalScroll />
<OnVerticalScroll />
<OnScrollRangeChanged />
<OnChar />
<OnKeyDown />
<OnKeyUp />
<OnColorSelect />
<OnHyperlinkEnter />
<OnHyperlinkLeave />
<OnHyperlinkClick />
<OnMessageScrollChanged />
<OnMovieFinished />
<OnMovieShowSubtitle />
<OnMovieHideSubtitle />
</Scripts> |
Attribute Explanation
--General
name="string" -- Used to Define the name of an Element, most Elements can be named.
inherits="string" -- inherits from a virtual element (can only be used on Elements that have the virtual="true" attribute)
-- the new Element inherits all the Subelements and Attributes from it. (can only inherit from compatible elements)
hidden="false" -- the default is that an element is not hidden, if you want to hide it ,use hidden="true". If a parent is hidden, his children are too.
parent="string" -- Defines the Parent. Needed?
virtual="false" -- create a non virtual (=real) Element. This is by default ,so you can obmit it, use virtual="true", when you want to create a virtual element.
id="0" -- gives the element an ID ,that can be retrieved later on ,Example: this:GetID()
-- Frame State and Order
toplevel="false" -- defines if a frame is on the highest level (on top) of any other frame. Default is not.
movable="false" -- defines if a frame can be moved. Use movable="true" to enable.
resizable="false" -- defines if a frame can be resized. Default is false. To make it resizable set it true.
frameStrata="PARENT" -- defines the FRAMESTRATA (see enum section) of the Frame. Default is "PARENT".
framelevel="int" -- defines the Frame Level (i guess another way to steer the display order)
-- Frame Interactive
enableMouse="false" -- used to enable interaction on the frame with the mouse (OnClick etc.)
enableKeyboard="false" -- used to enable keyboard interaction with the frame (if you use this, you can't press keys anymore in the normal UI ,use it with care)
--Positioning
x="int" y="int" -- Set X/Y (for example the Size) . int is an integer number such as "5" or "-10".
-- UI Resolution is 1024x768 independend of the actual screen size.
x="float" y="float" -- Set X/Y using floating point numbers. 1.0 = 100% ,0.5 = 50% (for example to set a size or position relative to another element)
left="[int]"
right="[int]"
top="[int]"
bottom="[int]" -- Optional Integers that defines the distance from the Border of an Element. Values can be obmited.
left="float"
right="float"
top="float"
bottom="float" -- Floating Point numbers (0-1) ,that define the distance from the Border of an Element in Percentage (0.5 = 50%). Values can't be obmited.
point="FRAMEPOINT" -- use one of the FRAMEPOINT enums to declare the Anchor Point (Example: TOPLEFT)
relativePoint="FRAMEPOINT" -- Difference to Point?
relativeTo="string" -- normaly an Anchor is relativ to it's parent. With this you can specify any other named element.
setAllPoints="false" -- no idea yet
orientation="HORIZONTAL" -- set the orientation, See Enums "ORIENTATION"
--Color and Alpha
r="float"
g="float"
b="float"
a="1.0" -- Used to define the Color of an Element. r=Red, G=Green,B=Blue, A=Alpha. 1 = full ,0 = nothing. 0.5 = half value. Example Yellow with 50% alpha: 1,1,0,0.5
alpha="float" -- a floating point number between 0 and 1, where 0 is invisible and 1 is solid and 0.5 is half-transparent.
level="ARTWORK" -- Set the level to draw, see the DRAWLAYER enum for the values. Default is "ARTWORK".
alphaMode="BLEND" -- Different Options to use Alpha Transparency. See Enums "ALPHAMODE"
-- Textures and Backdrop
file="string" -- Defines the Texture file or SimpleHTML file.
bgFile="string" -- Set the Background Texture File for a Backdrop , if not specified the Background will not be there.
edgeFile="string" -- Set the Edge Texture File for a Backdrop , The Image contains 4 sub-images with the 4 corners.
tile="false" -- Defines if a Texture will be tiled (multiplied to fill the area)
-- Fontstring
text="string" -- The Text to write.
spacing="0.0" -- Spacing between the Lines if Text is wrapped?
outline="NONE" -- Defines the Outline of the Text, see Enums "OUTLINETYPE"
monochrome="false" -- Black and White Text?
nonspacewrap="false" -- If true it wraps a Line even there are no spaces (words) ?
justifyV="MIDDLE" -- Vertical Justification ,See Enums "JUSTIFYVTYPE"
justifyH="CENTER" -- Horizontal Justification, See Enums "JUSTIFYHTYPE"
maxLines="0" -- Maximal Lines if a Text is wrapped (for example with |n)
font="string" -- defines the Font (name)
bytes="255" -- Buffer?
-- Buttons
checked="false" -- Used in a CheckBox to define if it's checked or not.
-- EditBox
letters="0" -- ?
blinkSpeed="0.5" -- TextCursor blinking
numeric="false" -- If set to true, only numeric values will be accepted
password="false" -- If set to true, the text will be hidden (password entry)
mulitLine="false" -- if set to true, the Text can be wrapped in multiple lines (for example with |n)
historyLines="0" -- ALT+Arrow Up History?
autoFocus="true" -- Set the Focus automatically (to what?)
ignoreArrows="false" -- Ignore the Arrow Keys (to avoid multiple lines, set this to true)
-- MessageFrame
fadeDuration="3.0" -- 3 seconds (default) until the Text is faded out
insertMode="BOTTOM" -- Insert Text at BOTTOM or TOP, see Enums "INSERTMODE"
-- ScrollingMessageFrame
displayDuration="10.0" -- Time to display the Text in a Scrolling Message Frame?
maxLines="8" -- Max. Lines in a Scrolling Message Frame
-- Model
scale="1.0" -- Set the Scale of a Model ?
fogNear="0.0" -- No idea, need to try out first
fogFar="1.0" -- No idea, need to try out first
-- Slider and StatusBar
drawLayer="OVERLAY" -- Set the level to draw, see the DRAWLAYER enum for the values. Default is "ARTWORK". Only used in Slider
minValue="float"
maxValue="float"
defaultValue="float"
valueStep="float" -- The Default Settings for a Slider. Values can be Integers or Floating Point. Except valueStep, they are also used for a StatusBar.
|
Type Definitions (Enums)
-- Alpha Graphic Mode
ALPHAMODE = {
"DISABLE",
"BLEND",
"ALPHAKEY",
"ADD",
}
|
-- Layer Level
DRAWLAYER = {
"BACKGROUND",
"BORDER",
"ARTWORK",
"OVERLAY",
"HIGHLIGHT",
}
|
-- Anchor Point
FRAMEPOINT = {
"TOPLEFT",
"TOPRIGHT",
"BOTTOMLEFT",
"BOTTOMRIGHT",
"TOP",
"BOTTOM",
"LEFT",
"RIGHT",
"CENTER",
}
|
-- Frame Screen Level
FRAMESTRATA = {
"PARENT",
"BACKGROUND",
"LOW",
"MEDIUM",
"HIGH",
"DIALOG",
"FULLSCREEN",
"FULLSCREEN_DIALOG",
"TOOLTIP",
} |
-- InsertMode
INSERTMODE = {
"TOP",
"BOTTOM",
} |
-- Justify Vertical
JUSTIFYVTYPE = {
"TOP",
"MIDDLE",
"BOTTOM",
} |
-- Justify Horizontal
JUSTIFYHTYPE = {
"LEFT",
"CENTER",
"RIGHT",
}
|
-- Outlinetype
OUTLINETYPE = {
"NONE",
"NORMAL",
"THICK",
}
|
-- Orientation
ORIENTATION = {
"HORIZONTAL",
"VERTICAL",
} |
|