<Ui xmlns="http://www.blizzard.com/wow/ui/" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">

	<Include file="..\..\FrameXML\Fonts.xml"/>
	<Include file="..\..\FrameXML\MoneyFrame.xml"/>
	<Include file="..\..\FrameXML\UIPanelTemplates.xml"/>
	<Include file="item\Item.xml"/>
	
	<!-- A bag frame template -->
	<Button name="BagnonBagFrame" frameStrata="MEDIUM" movable="true" enableMouse="true" parent="UIParent" hidden="true" virtual="true">
	
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border">
			<BackgroundInsets>
				<AbsInset left="4" right="4" top="4" bottom="4"/>
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
		</Backdrop>
		
		<Frames>
			<Button name="$parentCloseButton" inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-2" y="-2"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>

			<Button name="$parentTitle">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="14" y="8"/>
						</Offset>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentCloseButton" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="-2" y="-8"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<NormalText inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
				</NormalText>
				
				<HighlightText inherits="GameFontHighlight" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
				</HighlightText>
				
				<Scripts>
					<OnLoad>
						this:RegisterForClicks("LeftButtonDown", "LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnClick>
						BagnonCore_OnClick(this:GetParent(), arg1);
					</OnClick>
					<OnDoubleClick>
						BagnonCore_OnDoubleClick(this:GetParent());
					</OnDoubleClick>
					<OnMouseDown>
						BagnonCore_StartMoving(this:GetParent());
					</OnMouseDown>
					<OnMouseUp>
						BagnonCore_StopMoving(this:GetParent());
					</OnMouseUp>
				</Scripts>
			</Button>
			
			<Frame name="$parentMoneyFrame" inherits="SmallMoneyFrameTemplate" hidden="false">
				<Anchors>
					<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT">
						<Offset>
							<AbsDimension x="-4" y="12"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
		</Frames>
		
		<Scripts>
			<OnClick>
				BagnonCore_OnClick(this, arg1);
			</OnClick>
			<OnMouseDown>
				BagnonCore_StartMoving(this);
			</OnMouseDown>
			<OnMouseUp>
				BagnonCore_StopMoving(this);
			</OnMouseUp>
		</Scripts>
	</Button>
	
	<!-- Global Event Handler -->
	<Frame name="BagnonEvents" hidden="true">
		<Scripts>
			<OnLoad>
				BagnonEvents_OnLoad();
			</OnLoad>
			<OnEvent>
				BagnonEvents_OnEvent(event);
			</OnEvent>
		</Scripts>
	</Frame>
</Ui>
