XML properties

From Wowpedia
Jump to: navigation, search

Types of properties:

  • String - just some text
  • Element - name of element
  • Integer - number (0,1,2,3,4,5...)
  • Single - number with point (0.3 or 1.65 etc)
  • Boolean - true (enabled) or false (disabled)
  • List - some predefined values to select from



Effect: Elements can be transparent and this property used to define it.

  • 0 - full transparent
  • 1 - solid (default)

Type: Single


Effect: Defines a way transparency applied:

  • DISABLE - no transparency.
  • BLEND - while background fades element gets stronger (default)
  • ADD - background and element colors added resulting in too bright colors
  • APLHAKEY - transparency depends on alpha channel of textures
  • MOD - Not tested

Type: List


Effect: Automatically place the cursor bar inside a text box and receive all of the keyboard's attention.

Type: Unknown


Effect: unknown

Type: Unknown


Effect: If set to true - checkbutton is checked when loaded. Default is false

Type: Boolean


Effect: Prohibits element to go out of screen. Way applied unknown, probably just moved. Default unknown

Type: Boolean


Effect: unknown

Type: Unknown


Effect: unknown

Type: Unknown


Effect: unknown

Type: Unknown


Effect: Tell the frame to receive keyboard input.

Type: Boolean


Effect: Tell the frame to receive mouse input.

Type: Boolean


This refers to a file used by element, path is relative to scheme path: if addon is in "MyAddon" folder file specified "myfile.lua" will be searched in this folder (i guess only, needs testing). "\\Interface\\Wherever" seems to be the same as "Interface\\Wherever" ("C:\\{{WoW}}\\Interface\\Wherever").

Type: String


Effect: unknown

Type: Unknown


Effect: unknown

Type: Unknown


Effect: If true element is skipped in drawing resulting it not appearing on screen (interactions also skipped). Default false.

Type: Boolean


Effect: unknown

Type: Unknown


Effect: Number of element. Used for same looking element to make difference between them (much easier than by names)

Type: Integer


Effect: Text fields will ignore directional arrows and move the character instead. (Holding <Alt> temporarily sets this to true). Default false.

Type: Unknown


Effect: Name of element to take properties from. Element must be marked with "virtual=true" attribute (not tested otherwise). For some reason it's allowed to inherit elements of different types. In that case properties are copied, and unused ones are ignored(need to be tested too). You can define more that one template to use:

<Button inherits="OneTemplate, TwoTemplate">

Properties will be taken first from "OneTemplate" and then "TwoTemplate" so if they have the same properties from second will be taken.

Type: Element


Effect: Tells a MessageFrame where to put new content. Accepts "TOP" or "BOTTOM". Default "TOP"

Type: Unknown


Effect: If true the frame is not created, but converted into a new widget type using the name as the new widget's name.

Type: Boolean

A simple intrinsic definition:

<Frame name="ExampleIntrinsic" intrinsic="true">
          <OnShow function="ExampleIntrinsic_OnPostShow" intrinsicOrder="postcall" />

This can then be used to create a new frame in Lua and XML.

local example = CreateFrame("ExampleIntrinsic")
example:SetScript("OnShow", ExampleIntrinsic_OnShow)
          <OnShow function="ExampleIntrinsic_OnShow" />


Effect: Sets the order a script will run relative to the main script.

  • precall
  • postcall


Effect: Align text "LEFT", "RIGHT", or "CENTER".

Type: Unknown


Effect: Align text "TOP", "BOTTOM", or "MIDDLE".

Type: Unknown


Effect: Defines the maximum characters to allow in a text box.

Type: Unknown


Effect: Defines the maximum number of lines to allow in a text box.

Type: Unknown


Effect: Defines the highest numeric value a widget will accept.

Type: Single


Effect: unknown

Type: Unknown


Effect: unknown

Type: Unknown


Effect: Defines the lowest numeric value a widget will accept.

Type: Single


Effect: unknown

Type: Unknown


Effect: (De)Activates the methods, :StartMoving() and :StopMovingOrSizing(). Default false.

Type: Boolean


Effect: Tells a text box to span multiple lines (<Enter> inserts a line break).

Type: Boolean


Effect: This string represents name of an element for scripting. Frames defined via XML must be named if they are to be accessed by scripts, but for showing up in interface unnamed are ok. Names are case sensitive - means "MyElement" not same as "myelement". For readability and errors avoiding it's strongly recommended to avoid same names with different letters. You can use "$parent" inside name, this one will be replaced with parent attribute of element to form final name:

 <Button name="$parentButton" parent="MyFrame"> 

gives out "MyFrameButton" name for element. When used without parent attribute it replaces with name of first named parent element. This needs for templates - if you use elements in template they will take name from real parent, not template one:

<Frame name="FrameTemplate" virtual="true">
 <Button name="$parentButton"/>
<Frame name="RealFrame" inherits="FrameTemplate">

will result in creation of element "RealFrame" with "RealFrameButton" inside it. If parent attribute undefined name of container of element used.

<Frame Name="NamedFrame">
  <Button name="$parentButton">

Will create button named NamedFrameButton.

Type: String


Effect: Don't wrap text when it gets to the end of the parent frame.

Type: Unknown


Effect: Tells the text box to accept only numeric values.

Type: Unknown


Effect: unknown

Type: Unknown


Effect: unknown

Type: Unknown


Effect: You can define another parent for an element. To make button around minimap you can move it inside minimap frame that way. I'm not sure do element really removed from this one, or it just defines drawing order. If skipped then parent is container of element

Type: Element


Effect: Can be defined only in blizzard interface files (At least no one checked yet). If set to true some special api functions can be used. Any element inherited from protected ones can use this functions too. Protected functions/actions cannot be circumvented with this attribute.

Type: Boolean


Effect: If true element can be resized. Default false

Type: Boolean


Effect: unknown

Type: Unknown


Effect: Sets the scale. Default is the parent's scale. Accepts values greater than and not equal to 0.

Type: Single


Effect: Attaches all four corners to the parent's inner corners.

Type: Boolean


Effect: Used to define text to show on buttons, fontstrings etc.

Type: String


Effect: unknown

Type: Unknown


Effect: Tells a slider how far to jump per click.

Type: Single


Effect: If true element will not created, but used as template for other elements. Default false

Type: Boolean



This defines position of element relative to its parent position. You can define one or more "anchor" tags within "anchors". Each anchor has four attributes:

  • Point - where the anchor is located on the element. Allowed values are:
    • TOP
    • BOTTOM
    • LEFT
    • RIGHT
    • CENTER (default) (notice not MIDDLE. Some addons use middle instead, but it's not supported at the moment)
  • RelativePoint - same as point, but defines not on this element but on its parent. Values are same as "Point". If undefined its value equals to "Point"
  • RelativeTo - normally element docked to its parent (container) but you can specify another element to use instead with this attribute, giving a name as a value
  • Offset - If point on element and point on its parent are separated between each other you need specify it with this tag. This is done normally by putting "AbsDimension" inside "Offset" tag with attributes "x" and "y". Bigger x - element goes right, bigger y - it goes top. If undefined it's taken as 0,0

If two or more anchors are defined they can override the size, so element size will depend on the size of its parent.

Each widget got only four borders:

  • Horizontal type borders
    • Left
    • Right
  • Vertical type borders
    • Top
    • Bottom

For each border type there are two ways of defining size and position:

  • By size and point
    Element size remains unchanged, position is defined by 'hook' (anchor) on left, middle or right part of widget and fixed to left, middle or right part to another widget
  • Without size
    Element size depends on position and size elements used to 'hook' element to. Distance between them increasing - this widget size too.
    In this case you need one 'hook' for left border and one for right border.

If undefined for both border types 'hook' is placed in center relative to its parent element center with zero offset and size equals to parent element size. Each anchor defined overrides one border rule. When 'hook' placed left or right it removes center 'hook'. When center 'hook' placed it removes 'left' and 'right' hooks if defined. Two borders type are separate, so horizontal size can be defined by one 'hook' and size, when vertical defined by two 'hooks'. TOPLEFT anchors should be processed as two anchors TOP anchor and LEFT anchor with all other properties same. Same for BOTTOMLEFT,TOPRIGHT,BOTTOMRIGHT. You can think about them just as shorter form of writing. CENTER anchor affects both border types.

Widget can be relative only to one other element. So each anchor with relativeto attribute defined changes it.

<Anchor point="LEFT"/>

Will put 'hook' to left-middle part of widget and fix it to left-middle part of parent widget with zero offset

<Anchor point="LEFT" relativepoint="TOPRIGHT"/>

makes left part of widget fixed to right part of parent while top of parent will be middle of widget

<Anchor point="TOPLEFT"/>
<Anchor point="LEFT" relativeto="One"/>

Widget top remains same as top of parent, when left of widget goes to left of "One"

<Anchor point="RIGHT"/>
<Anchor point="CENTER"/>

Element will be fixed to center of its parent

When element is inherited from another one and both got anchors defined, inherited processed first, then widget ones, so ones you override template anchors.

For all this size is taken from Size tag.













Define the texture to use when a check button is checked.


Define the font to use when a button is disabled.


Define the texture to use when a button is disabled.




Inside this tag all child elements are located. So if you want button inside a frame you need put it inside this tag of frame.

Still for some elements there is extra tags where elements can be placed. This depends completely on element type


Mouseover font.


Mouseover texture.



This is a place where actually defined what will be drawn on screen. If this tag omitted default representation is taken (this needs to be tested).

Only "layer" elements can be inside this tag, each have "level" property to define the order they will be drawn. Only fontstring and texture elements are allowed inside layer element.




Text moves when clicked (and held), this defines how far it moves. Text moves back to its previous location when the mouse button is released.


Change the texture to this when clicked (and held). The texture changes back to its texture when the mouse button is released.


Define how big or small this frame can possibly be.


This tag only accepts Widget handlers.



Puts a shadow behind an element.


Defines a size of an element. Normally this is done by putting "AbsDimension" tag inside with "x" and "y" attributes, but sometimes this is done by just giving "x" and "y" attributes to "Size" tag itself. Last one is probably old way of defining and left for a backward compatibility.


Determines how much of the specified texture is to be shown. There are four specifications: "left", "right", "top", and "bottom". Each one specifies the coordinates of what the image should show, using a scale value. IE: With left=0 and right=1, it would show all the pixels from the left side to the right, or 100% of the image's width.

<TexCoords left="0" right="0.5" top="0" bottom="0.5" />

This example shows only the top left quarter of the texture.