XML attributes

102,364pages on
this wiki

WoW XML attributes that can be applied to the major XML elements. This describes common XML attributes for WoW XML Ui elements, and should not be confused with the actual WoW XML type of Attribute or Attributes .

Summary Edit

For XML, attributes are 'inline properties' of an 'element' which can only have one value, like so: <element attribute="value"/>, but could also be written as an element like so: <element><attribute>value</attribute></element>. Consequently, attributes can not contain 'child elements' like complex properties do: <element><element attribute="value"/></element>. An element's is defined by both the attributes, and by the 'child elements' of that element which both can be called 'properties'.

Reference Edit

The intent for this reference is document in one place the common attributes that make up the definitions of a major XML Ui elements, like 'virtual' or 'name'. This page is broken down into one major section for the attributes that share common definitions among major XML elements.

Type key for attributes

  • string - String, just some text
  • int - Integer, number (0,1,2,3,4,5...)
  • float - Single, number with point (0.3 or 1.65 etc)
  • bool - Boolean, one of '0', '1', 'true', 'false' to indicate enable or disable, or on or off, etc...
  • enum - List, an enumeration, or one of a set of predefined values
  • [Element] - Element Type, name of element

Attributes Edit

alpha Edit

(float) - Elements can be transparent and this property used to define it.

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

alphaMode Edit

(ALPHAMODE) - 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

autoFocus Edit

(bool) - Automatically place the cursor bar inside a text box and receive all of the keyboard's attention. Default is 'true'.

blinkSpeed Edit

(float) - Default is '0.5'.

bytes Edit

(int) -

checked Edit

(bool) - If set to true - CheckButton is checked when loaded. Default is false

clampedToScreen Edit

(bool) - Prohibits element to go out of screen. Way applied unknown, probably just moved.

defaultvalue Edit

displayduration Edit

drawlayer Edit

enableKeyboard Edit

(bool) - Tell the frame to receive keyboard input.

enableMouse Edit

(bool) - Tell the frame to receive mouse input.

edgeFile Edit

(string) - refers to a texture used by element as the edge of a background, 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\\Whereever").

file Edit

(string) - 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\\Whereever").

font Edit

(string) -

frameStrata Edit

hidden Edit

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

historyLines Edit

(int) -

password Edit

(bool) - Determines if text should be viewed using hidden 'password' format.

id Edit

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

ignoreArrows Edit

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

countInvisibleLetters Edit

(bool) -

inherits Edit

(Element) - 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.

insertmode Edit

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

justifyH Edit

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

justifyV Edit

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

letters Edit

Defines the maximum characters to allow in a text box.

multiLine Edit

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

maxLines Edit

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

maxvalue Edit

(float) - Defines the highest numeric value a widget will accept.

minimaparrowmodel Edit

minimapplayermodel Edit

minvalue Edit

(float) - Defines the lowest numeric value a widget will accept.

monochrome Edit

movable Edit

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

name Edit

(string) - 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". See: LayoutFrame

parentKey Edit

Name of Lua object reference to set in the parent, to this elements Lua object at runtime. in LayoutFrame, AnimationGroup, Animation.

parentArray Edit

Array name in the parent frame to add this LayoutFrame. in LayoutFrame.

nonspacewrap Edit

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

numeric Edit

Tells the text box to accept only numeric values.

orientation Edit

relativeTo Edit

Name of an element to make this element relative to. in Anchor

relativeKey Edit

Name of an 'parentKey' or other object refernce to make this element relative to. in Anchor

outline Edit

parent Edit

(Element) - 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

protected Edit

(bool) - 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.

resizable Edit

(bool) - If true element can be resized. Default false

reverse Edit

scale Edit

(float) - Sets the scale. Default is the parent's scale. Accepts values greater than and not equal to 0.

setAllPoints (bool) Edit

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

text Edit

(string) - Used to define text to show on buttons, fontstrings etc.

target Edit

Name of an element to use as this elements target. in Animation.

targetKey Edit

Name of a parentKey object refernce to use as this elements target. in Animation.

toplevel Edit

valuestep Edit

(float) - Tells a slider how far to jump per click.

virtual Edit

(bool) - If true element will not created, but used as template for other elements. Default false

See also Edit

Around Wikia's network

Random Wiki