<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">

	<Script file="BFQuest.lua"/>

	<Frame name="WatchFrame" parent="UIParent" movable="true" clampedToScreen="true" hidden="false" resizable="true" frameStrata="LOW">
		<Size x="280" y="140"/>
		<Anchors>
			<Anchor point="TOPRIGHT" relativeTo="MinimapCluster" relativePoint="BOTTOMRIGHT">
				<Offset x="0" y="10"/>
			</Anchor>
		</Anchors>
		<ResizeBounds>
			<minResize x="220" y="128"/>
			<maxResize x="360" y="600"/>
		</ResizeBounds>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentTitleBG" file="Interface\PaperDollInfoFrame\UI-GearManager-Title-Background">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="9" y="-6"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT">
							<Offset x="-28" y="-24"/>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="$parentDialogBG" file="Interface\Tooltips\UI-Tooltip-Background">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="8" y="-24"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-6" y="8"/>
						</Anchor>
					</Anchors>
					<Color r="0" g="0" b="0" a=".75"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentTopLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0.501953125" right="0.625" top="0" bottom="1"/>
				</Texture>			
				<Texture name="$parentTopRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="TOPRIGHT"/>
					</Anchors>
					<TexCoords left="0.625" right="0.75" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentTop" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="0" y="64"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT"/>
						<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0.25" right="0.369140625" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentBottomLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0.751953125" right="0.875" top="0" bottom="1"/>
				</Texture>			
				<Texture name="$parentBottomRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
					<TexCoords left="0.875" right="1" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentBottom" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="0" y="64"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="BOTTOMRIGHT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0.376953125" right="0.498046875" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="0"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT"/>
						<Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeft" relativePoint="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0.001953125" right="0.125" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Border">
					<Size x="64" y="0"/>
					<Anchors>
						<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMRIGHT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="TOPRIGHT"/>
					</Anchors>
					<TexCoords left="0.1171875" right="0.2421875" top="0" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentCollapsedBorderLeft" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">	
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="1" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.125" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentCollapsedBorderRight" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">
					<Size x="48" y="32"/>
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset x="2" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.625" right="1" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentCollapsedBorderCenter" file="Interface\PaperDollInfoFrame\UI-GearManager-Collapsed">
					<Size x="0" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentCollapsedBorderLeft" relativePoint="TOPRIGHT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentCollapsedBorderRight" relativePoint="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0.125" right="0.625" top="0" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="$parentTitle" inherits="GameFontNormal" text="OBJECTIVES_LABEL">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="12" y="-8"/>
						</Anchor>
						<Anchor point="TOPRIGHT">
							<Offset x="-32" y="-8"/>
						</Anchor>
					</Anchors>
				</FontString>					
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentCollapseExpandButton">
				<Size>
					<AbsDimension x="32" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="2" y="1"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick function="WatchFrame_CollapseExpandButton_OnClick"/>
				</Scripts>
				<NormalTexture file="Interface\Buttons\UI-Panel-CollapseButton-Up"/>
				<PushedTexture file="Interface\Buttons\UI-Panel-CollapseButton-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-Panel-CollapseButton-Disabled"/>
				<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
			</Button>
			<Button name="$parentTitleButton">
				<Frames>
					<Frame name="$parentHighlight" setAllPoints="true" hidden="true">
						<Layers>
							<Layer level="OVERLAY">
								<Texture file="Interface\Buttons\UI-ListBox-Highlight" setAllPoints="true">
									<Color r="1" g="1" b="1" a="0.4"/>
								</Texture>
							</Layer>
						</Layers>
					</Frame>
				</Frames>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTitleBG"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentTitleBG"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("RightButtonUp");
						self:RegisterForDrag("LeftButton");
					</OnLoad>
					<OnMouseUp function="WatchFrameTitleButton_OnClick"/>
					<OnDragStart>
						local watchFrame = _G["WatchFrame"];
						watchFrame.moving = true;
						watchFrame:StartMoving();
					</OnDragStart>
					<OnDragStop>
						local watchFrame = _G["WatchFrame"];
						watchFrame.moving = nil;
						watchFrame:StopMovingOrSizing();
					</OnDragStop>
				</Scripts>
			</Button>
			<Frame name="$parentMouseover">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCollapsedBorderLeft"/>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
			</Frame>		
			<Button name="$parentRightResizeThumb">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-4" y="4"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForDrag("LeftButton");
					</OnLoad>
					<OnDragStart>
						local watchFrame = _G["WatchFrame"];
						if ( not watchFrame.locked ) then
							watchFrame.sizing = true;
							watchFrame:StartSizing("BOTTOMRIGHT");
						end
					</OnDragStart>
					<OnDragStop>
						local watchFrame = _G["WatchFrame"];
						watchFrame.sizing = nil;
						watchFrame:StopMovingOrSizing();
					</OnDragStop>
				</Scripts>
			</Button>
			<Button name="$parentLeftResizeThumb">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset x="4" y="4"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterForDrag("LeftButton");
					</OnLoad>
					<OnDragStart>
						local watchFrame = _G["WatchFrame"];
						if ( not watchFrame.locked ) then
							watchFrame.sizing = true;
							watchFrame:StartSizing("BOTTOMLEFT");
						end
					</OnDragStart>
					<OnDragStop>
						local watchFrame = _G["WatchFrame"];
						watchFrame.sizing = nil;
						watchFrame:StopMovingOrSizing();
					</OnDragStop>
				</Scripts>
			</Button>					
			<Frame name="WatchFrameLines" hidden="false">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="WatchFrame" relativePoint="TOPLEFT">
						<Offset x="12" y="-30"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativeTo="WatchFrame" relativePoint="BOTTOMRIGHT">
						<Offset x="-12" y="12"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetParent(UIParent) -- Freeedoom~!
						self:SetFrameStrata("LOW");
						self.updateFunctions = {};
						self.numFunctions = 0;
					</OnLoad>
				</Scripts>
			</Frame>			
		</Frames>		
		<Scripts>
			<OnLoad function="WatchFrame_OnLoad"/>
			<OnEvent function="WatchFrame_OnEvent"/>
			<OnUpdate function="WatchFrame_OnUpdate"/>
		</Scripts>
	</Frame>
	
</Ui>