<?xml version="1.0"?>
<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="RSExplorerMixin.lua" />

	<Frame name="RSExplorerUITemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Background" atlas="GarrLanding-MiddleTile" useAtlasSize="true">
					<Anchors>
	            		<Anchor point="TOPLEFT" x="5" y="-5"/>
	            		<Anchor point="BOTTOMRIGHT" x="-5" y="5"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER" textureSubLevel="4">
				<Texture parentKey="BaseFrameTopEdge" atlas="GarrLanding-Top" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" y="-4" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="TOPRIGHT" y="-82" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameBottomEdge" atlas="GarLanding-Bottom" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="BOTTOMLEFT" y="86" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameLeftEdge" atlas="GarLanding-Left" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="-5" y="-5" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMLEFT" x="83" y="5" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameRightEdge" atlas="GarLanding-Right" useAtlasSize="false">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPRIGHT" x="-83" y="-30" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" x="3" y="30" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER" textureSubLevel="5">
				<Texture parentKey="BaseFrameTopLeftCorner" atlas="GarrLanding-upperleft" useAtlasSize="true">
					<Size>
						<AbsDimension x="32" y="32" />
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT" x="-4" y="-2" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameTopRightCorner" atlas="GarrLanding-upperright" useAtlasSize="true">
					<Size>
						<AbsDimension x="32" y="32" />
					</Size>
					<Anchors>
						<Anchor point="TOPRIGHT" x="4" y="-2" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameBottomLeftCorner" atlas="GarrLanding-lowerleft" useAtlasSize="true">
					<Size>
						<AbsDimension x="32" y="32" />
					</Size>
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="-5" y="-2" />
					</Anchors>
				</Texture>
				<Texture parentKey="BaseFrameBottomRightCorner" atlas="GarrLanding-lowerright" useAtlasSize="true">
					<Size>
						<AbsDimension x="32" y="32" />
					</Size>
					<Anchors>
						<Anchor point="BOTTOMRIGHT" x="4" y="-1" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="CloseButton" inherits="UIPanelCloseButton" frameLevel="800">
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="5" y="5"/>
				</Anchors>
			</Button>
		</Frames>
	</Frame>
	<Frame name="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
		<Layers>
			<Layer level="BORDER">
				<Texture parentKey="BaseFrameBackground" atlas="GarrLanding-MiddleTile" horizTile="true" vertTile="true">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER" textureSubLevel="1">
				<Texture parentKey="BoardDropShadow" atlas="GarrLanding-MiddleTile">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame parentKey="RaisedFrameEdges" setAllPoints="true" frameLevel="50">
				<Layers>
					<Layer level="BORDER" textureSubLevel="4">
						<Texture parentKey="BaseFrameTopEdge" atlas="GarrLanding-Top" useAtlasSize="false">
							<Size>
								<AbsDimension x="600" y="32" />
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameBottomEdge" atlas="GarLanding-Bottom" useAtlasSize="false">
							<Size>
								<AbsDimension x="600" y="20" />
							</Size>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameLeftEdge" atlas="GarLanding-Left" useAtlasSize="false">
							<Size>
								<AbsDimension x="12" y="626" />
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT"  />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameRightEdge" atlas="GarLanding-Right" useAtlasSize="false">
							<Size>
								<AbsDimension x="12" y="626" />
							</Size>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" relativeKey="$parent" relativePoint="BOTTOMRIGHT" />
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BORDER" textureSubLevel="5">
						<Texture parentKey="BaseFrameTopLeftCorner" atlas="GarrLanding-upperleft" useAtlasSize="false">
							<Size>
								<AbsDimension x="32" y="32" />
							</Size>
							<Anchors>
								<Anchor point="TOPLEFT" y="-1" />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameTopRightCorner" atlas="GarrLanding-upperright" useAtlasSize="false">
							<Size>
								<AbsDimension x="32" y="32" />
							</Size>
							<Anchors>
								<Anchor point="TOPRIGHT" y="-1" x="1" />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameBottomLeftCorner" atlas="GarrLanding-lowerleft" useAtlasSize="false">
							<Size>
								<AbsDimension x="32" y="32" />
							</Size>
							<Anchors>
								<Anchor point="BOTTOMLEFT" />
							</Anchors>
						</Texture>
						<Texture parentKey="BaseFrameBottomRightCorner" atlas="GarrLanding-lowerright" useAtlasSize="false">
							<Size>
								<AbsDimension x="32" y="32" />
							</Size>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" />
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
	</Frame>

	<Frame name="RSMapCanvasDetailLayerTemplate" mixin="RSExplorerDetailMap" useParentLevel="true" virtual="true">
		<Scripts>
			<OnLoad method="OnLoad" />
			<OnUpdate method="OnUpdate" />
		</Scripts>
	</Frame>

	<Frame name="RSMapCanvasDetailIconsTemplate" useParentLevel="true" virtual="true">
		<Size x="18" y="18" />
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Texture">
					<Size x="18" y="18" />
					<Anchors>
						<Anchor point="CENTER" x="0" y="0" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
	</Frame>

	<Button name="RSExplorerRareInfoLootItemTemplate" virtual="true">
		<Size x="30" y="30" />
		<Layers>
			<Layer level="ARTWORK">
				<Texture parentKey="Icon">
					<Size x="30" y="30" />
					<Anchors>
						<Anchor point="CENTER" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="5">
				<Texture parentKey="IconBorder" atlas="GarrMission_RewardsShadow">
					<Size x="32" y="32" />
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Icon" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY" textureSubLevel="5">
				<Texture parentKey="IconOverlay" hidden="true">
					<Size x="34" y="34" />
					<Anchors>
						<Anchor point="CENTER" relativeKey="$parent.Icon" />
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter function="RSExplorerRareInfoLootItem_OnEnter" />
			<OnLeave function="RSExplorerRareInfoLootItem_OnLeave" />
			<OnClick>
				RSExplorerRareInfoLootItem_OnClick(self, button);
			</OnClick>
		</Scripts>
	</Button>

	<Frame name="RSExplorerRareInfoLootTemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="Background1" atlas="UI-Frame-Neutral-CardParchmentWider">
					<Anchors>
						<Anchor point="TOPLEFT" />
						<Anchor point="BOTTOMRIGHT" />
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture parentKey="Texture" alphaMode="BLEND">
					<Size x="40" y="40" />
					<Anchors>
						<Anchor point="TOPRIGHT" relativeKey="$parent.Background1" y="-3" x="-4" relativePoint="TOPRIGHT" />
					</Anchors>
					<Color r="1" g="1" b="1" a=".2" />
					<Scripts>
						<OnEnter>
							self:GetParent():GetParent():GetParent():ShowTooltip(self)
						</OnEnter>
						<OnLeave>
							self:GetParent():GetParent():GetParent():HideTooltip(self)
						</OnLeave>
					</Scripts>
				</Texture>
			</Layer>
		</Layers>
	</Frame>
	
	<Frame name="RSExplorerRareInfoTemplate" inherits="RSExplorerRareInfoBaseFrameTemplate" virtual="true">
		<Layers>
			<Layer level="BORDER" textureSubLevel="3">
				<Texture parentKey="Header">
					<Anchors>
						<Anchor point="TOPLEFT" x="10" y="0" />
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="0" y="-66" />
					</Anchors>
					<Color r="0" g="0" b="0" a=".35" />
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<FontString parentKey="Name" inherits="QuestFont_Enormous" justifyH="LEFT">
					<Size x="0" y="18" />
					<Color r="1.0" g="1.0" b="1.0" />
					<Anchors>
						<Anchor point="TOPLEFT" x="30" y="-5" />
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" y="-70" />
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button parentKey="AchievementIcon" hidden="true">
				<Size x="54" y="54" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Header" relativePoint="TOPRIGHT" x="-70" y="-20" />
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture file="Interface\AchievementFrame\UI-Achievement-Progressive-Shield">
							<Size x="54" y="52" />
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter function="RSExplorerRareInfoAchievement_OnEnter" />
					<OnLeave function="RSExplorerRareInfoAchievement_OnLeave" />
				</Scripts>
			</Button>
			<Frame parentKey="Map">
				<Size x="580" y="385"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Header" relativePoint="BOTTOMLEFT" />
				</Anchors>
			</Frame>
			<Frame parentKey="Mounts" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="196" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Map" relativePoint="BOTTOMLEFT" y="-5" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Pets" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="196" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="TOPRIGHT" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Toys" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="197" y="47"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Pets" relativePoint="TOPRIGHT" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Custom" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="295" y="144"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Mounts" relativePoint="BOTTOMLEFT" y="-1" x="-2" />
				</Anchors>
			</Frame>
			<Frame parentKey="Appearances" inherits="RSExplorerRareInfoLootTemplate">
				<Size x="295" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.Custom" relativePoint="TOPRIGHT" x="-2" />
					<Anchor point="BOTTOM" relativeKey="$parent.Custom" relativePoint="BOTTOM" />
				</Anchors>
			</Frame>
		</Frames>
	</Frame>

	<Frame name="RSExplorerControlTemplate" virtual="true">
		<Frames>
			<CheckButton parentKey="AutoFilterCheckButton" inherits="ChatConfigCheckButtonTemplate">
				<Anchors>
					<Anchor point="LEFT" x="25" y="5" />
				</Anchors>
				<Scripts>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</CheckButton>
			<Button parentKey="ApplyFiltersButton" inherits="StaticPopupButtonTemplate">
				<Anchors>
					<Anchor point="RIGHT" x="-20" y="5" />
				</Anchors>
				<KeyValues>
					<KeyValue key="atlasName" value="128-RedButton" type="string" />
				</KeyValues>
				<Scripts>
					<OnClick>
						self:GetParent():ApplyFilters(self, button)
					</OnClick>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</Button>
			<CheckButton parentKey="CreateProfilesBackupCheckButton" inherits="ChatConfigCheckButtonTemplate">
				<Anchors>
					<Anchor point="RIGHT" relativeKey="$parent.ApplyFiltersButton" relativePoint="LEFT" x="-160" />
				</Anchors>
				<Scripts>
					<OnEnter>
						self:GetParent():GetParent():ShowTooltip(self)
					</OnEnter>
					<OnLeave>
						self:GetParent():GetParent():HideTooltip(self)
					</OnLeave>
				</Scripts>
			</CheckButton>
		</Frames>
	</Frame>

	<Frame name="RSExplorerFrame" hidden="true" inherits="RSExplorerUITemplate" mixin="RSExplorerMixin" enableMouse="true" movable="true" frameLevel="1" frameStrata="HIGH" parent="UIParent" topLevel="true">
		<Size x="1000" y="785" />
		<Anchors>
			<Anchor point="CENTER" />
		</Anchors>
		<Frames>
			<Frame parentKey="OverlayElements" frameLevel="2" setAllPoints="true">
				<Size x="32" y="32" />
				<Anchors>
					<Anchor point="TOPRIGHT" x="4" y="6" />
				</Anchors>
				<Layers>
					<Layer level="BORDER">
						<Texture parentKey="CloseButtonBorder" atlas="UI-Frame-Neutral-ExitButtonBorder" useAtlasSize="true">
							<Anchors>
								<Anchor point="CENTER" relativeKey="$parent.CloseButton" x="0" y="0" />
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
			<Frame parentKey="Filters" mixin="RSExplorerFilters" name="$parentFilters" frameLevel="4">
				<Anchors>
					<Anchor point="TOPLEFT" x="60" y="-30" relativePoint="TOPLEFT" />
					<Anchor point="BOTTOMRIGHT" x="-60" y="-70" relativePoint="TOPRIGHT" />
				</Anchors>
				<Frames>
					<DropdownButton parentKey="FilterDropDown" inherits="WowStyle1FilterDropdownTemplate">
						<Size x="100" y="25" />
						<Anchors>
							<Anchor point="LEFT" x="0" y="1" />
						</Anchors>
						<Scripts>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</DropdownButton>
					<DropdownButton parentKey="ContinentDropDown" inherits="WowStyle1DropdownTemplate">
						<Size x="300" y="25" />
						<Anchors>
							<Anchor point="LEFT" relativeKey="$parent.FilterDropDown" relativePoint="RIGHT" x="10" y="0" />
						</Anchors>
					</DropdownButton>
					<CheckButton parentKey="LockCurrentZoneCheckButton" inherits="ChatConfigCheckButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" relativeKey="$parent.ContinentDropDown" relativePoint="RIGHT" x="10" y="0" />
						</Anchors>
						<Scripts>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</CheckButton>
					<Button parentKey="RestartScanningButton" inherits="StaticPopupButtonTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-5" y="-2" />
						</Anchors>
						<KeyValues>
							<KeyValue key="atlasName" value="128-RedButton" type="string" />
						</KeyValues>
						<Scripts>
							<OnClick>
								self:GetParent():RestartScanning(self, button)
							</OnClick>
							<OnEnter>
								self:GetParent():GetParent():ShowTooltip(self)
							</OnEnter>
							<OnLeave>
								self:GetParent():GetParent():HideTooltip(self)
							</OnLeave>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Frame parentKey="RareNPCList" hidden="true" inherits="RSExplorerRareListTemplate" mixin="RSExplorerRareList" name="$parentRareList">
				<Size x="305" y="648" />
				<Anchors>
					<Anchor point="TOPLEFT" x="33" y="-64" />
				</Anchors>
			</Frame>
			<Frame parentKey="RareInfo" hidden="true" inherits="RSExplorerRareInfoTemplate" frameLevel="3">
				<Size x="600" y="655" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.RareNPCList" relativePoint="TOPRIGHT" x="5" y="0" />
				</Anchors>
			</Frame>
			<Frame parentKey="Control" inherits="RSExplorerControlTemplate" mixin="RSExplorerControl" hidden="true" frameLevel="4">
				<Size x="574" y="60" />
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.RareNPCList" relativePoint="BOTTOMLEFT" x="0" y="-20" />
					<Anchor point="BOTTOMRIGHT" x="-38" y="20" />
				</Anchors>
			</Frame>
			<Frame parentKey="CustomLoot" inherits="RSExplorerCustomLootTemplate" hidden="true" mixin="RSExplorerLoot" name="$customLoot">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent" relativePoint="TOPLEFT" x="60" y="-50" />
					<Anchor point="TOPRIGHT" relativeKey="$parent" relativePoint="TOPRIGHT" x="-60" />
					<Anchor point="BOTTOM" relativeKey="$parent" relativePoint="CENTER" y="-100" />
				</Anchors>
			</Frame>
			<Frame parentKey="ScanRequired" mixin="RSExplorerControl" hidden="true" name="$scannerFrame">
				<Anchors>
          			<Anchor point="TOPLEFT"/>
          			<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString parentKey="ScanRequiredText" maxLines="2" wordwrap="true" inherits="GameFontNormalHuge">
							<Size x="750" y="40" />
							<Anchors>
								<Anchor point="CENTER" x="0" y="10" />
							</Anchors>
						</FontString>
						<FontString parentKey="ScanProcessText" hidden="true" inherits="GameFontNormal">
							<Anchors>
								<Anchor point="TOP" relativeKey="$parent.ScanRequiredText" relativePoint="BOTTOM" x="0" y="-15" />
							</Anchors>
							<Color r="1.0" g="1.0" b="1.0" a="1.0" />
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button parentKey="StartScanningButton" inherits="StaticPopupButtonTemplate">
						<Anchors>
							<Anchor point="TOP" relativeKey="$parent.ScanRequiredText" relativePoint="BOTTOM" x="0" y="-15" />
						</Anchors>
						<Scripts>
							<OnClick>
								self:GetParent():StartScanning(self, button)
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<GameTooltip parentKey="Tooltip" name="ExplorerTooltip" inherits="GameTooltipTemplate" frameStrata="HIGH" frameLevel="1000" virtual="true">
				<KeyValues>
					<KeyValue key="textLeft1Font" value="GameFontHighlight" type="string" />
					<KeyValue key="minimumWidth" value="150" type="number"/>
				</KeyValues>
			</GameTooltip>
		</Frames>
		<Scripts>
			<OnShow method="OnShow" />
			<OnLoad method="OnLoad" />
			<OnDragStart>self:StartMoving()</OnDragStart>
			<OnDragStop>self:StopMovingOrSizing()</OnDragStop>
		</Scripts>
	</Frame>

</Ui>