XML properties

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

alpha
Effect: Elements can be transparent and this property used to define it.
 * 0 - full transparent
 * 1 - solid (default)

Type: Single

alphamode
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

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

Type: Unknown

bytes
Effect: unknown

Type: Unknown

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

Type: Boolean

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

Type: Boolean

defaultvalue
Effect: unknown

Type: Unknown

displayduration
Effect: unknown

Type: Unknown

drawlayer
Effect: unknown

Type: Unknown

enablekeyboard
Effect: Tell the frame to receive keyboard input.

Type: Boolean

enablemouse
Effect: Tell the frame to receive mouse input.

Type: Boolean

file
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:\\ \\Interface\\Wherever").

Type: String

font
Effect: unknown

Type: Unknown

framestrata
Effect: unknown

Type: Unknown

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

Type: Boolean

historylines
Effect: unknown

Type: Unknown

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

Type: Integer

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

Type: Unknown

inherits
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: Properties will be taken first from "OneTemplate" and then "TwoTemplate" so if they have the same properties from second will be taken.

Type: Element

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

Type: Unknown

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

Type: Unknown

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

Type: Unknown

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

Type: Unknown

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

Type: Unknown

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

Type: Single

minimaparrowmodel
Effect: unknown

Type: Unknown

minimapplayermodel
Effect: unknown

Type: Unknown

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

Type: Single

monochrome
Effect: unknown

Type: Unknown

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

Type: Boolean

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

Type: Boolean

name
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:   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:     will result in creation of element "RealFrame" with "RealFrameButton" inside it. If parent attribute undefined name of container of element used.  ...  ...     ...   </Frame> </Frame></Pre> Will create button named NamedFrameButton.

Type: String

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

Type: Unknown

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

Type: Unknown

orientation
Effect: unknown

Type: Unknown

outline
Effect: unknown

Type: Unknown

parent
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

protected
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

resizable
Effect: If true element can be resized. Default false

Type: Boolean

reverse
Effect: unknown

Type: Unknown

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

Type: Single

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

Type: Boolean

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

Type: String

toplevel
Effect: unknown

Type: Unknown

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

Type: Single

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

Type: Boolean

anchors
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)
 * TOPLEFT
 * BOTTOMLEFT
 * TOPRIGHT
 * BOTTOMRIGHT
 * 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<BR /> 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<BR /> Element size depends on position and size elements used to 'hook' element to. Distance between them increasing - this widget size too.<BR />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"/></PRE>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"/></PRE>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"/></PRE>Widget top remains same as top of parent, when left of widget goes to left of "One" <Anchor point="RIGHT"/> <Anchor point="CENTER"/></PRE>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.

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

disabledfont
Define the font to use when a button is disabled.

disabledtexture
Define the texture to use when a button is disabled.

frames
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

highlightfont
Mouseover font.

highlighttexture
Mouseover texture.

layers
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.

pushedtextoffset
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.

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

resizebounds
Define how big or small this frame can possibly be.

scripts
This tag only accepts Category:Widget event handlers.

shadow
Puts a shadow behind an element.

size
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.

texcoords
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.