WoW:XML UI: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with "XML elements")
 
No edit summary
Line 1: Line 1:
{{widget}}{{tocright}}
{{widget}}{{tocright}}
This is the WoW [[XML UI]] Reference.
This is the WoW [[XML UI]] Reference. See also an overview of the [[XML user interface]].


=== Reference ===
== Reference ==


* [[XML/Ui|XML UI Root]] - Main XML container for FrameXML elements, named '[[XML/Ui|Ui]]'.
* [[XML/Ui|XML UI Root]] - Main XML container for FrameXML elements, named '[[XML/Ui|Ui]]'.
Line 39: Line 39:
     </Frame>
     </Frame>
   </Ui>
   </Ui>
[[Category:XML elements| ]]

Revision as of 16:03, 2 August 2012

Widget API

This is the WoW XML UI Reference. See also an overview of the XML user interface.

Reference

Summary

WoW is capable of loading special .xml files used to describe and create UI elements. WoW uses this facility to create nearly all of its own native user interface frames and elements when WoW is started. These .xml files and facilities can also be used for custom user interface elements.

The XML UI reference is useful for creating and understanding these FrameXML files, and useful as a cross-reference for the Widget API, and for the base WoW API with reguards to frame and UI element creation and the relationships between the elements. The term 'element' is classically an XML term for describing hierarcical parts of an XML document. However you will see the terms 'elements', 'uiobjects', 'widgets', 'frames', and 'layout frames' sometimes used interchangebly. To disambiguate when we are referring to the WoW XML UI facility and files, we will use the WoW term for this: 'FrameXML'.

Example FrameXML file:

 <Ui xmlns="http://www.blizzard.com/wow/ui/"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Script file="MyFrame.lua" />
   <Frame name="MyAddon_MyFrame" parent="UIParent" toplevel="true" enableMouse="true">
     <Size>
       <AbsDimension x="200" y="200" />
     </Size>
     <Anchors>
       <Anchor point="CENTER" />
     </Anchors>
     <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background"
           edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
       <BackgroundInsets>
         <AbsInset left="11" right="12" top="12" bottom="11"/>
       </BackgroundInsets>
       <TileSize>
         <AbsValue val="32"/>
       </TileSize>
       <EdgeSize>
         <AbsValue val="32"/>
       </EdgeSize>
     </Backdrop>
   </Frame>
 </Ui>