<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">
	<Button name="QuestLogObjectiveItemTemplate" inherits="QuestItemTemplate" virtual="true">
		<Scripts>
			<OnEnter>
				if (( self:GetAlpha() > 0 ) and self.link) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
					GameTooltip:SetHyperlink(self.link);
					GameTooltip_ShowCompareItem();
				end
				CursorUpdate();
			</OnEnter>
			<OnUpdate>
				if (( self:GetAlpha() > 0 ) and self.link) then
					if (self.timerEnabled) then
						local name, link, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, texture = GetItemInfo(self.link);
						if (texture) then
							self.timerEnabled = nil;
							SetItemButtonTexture(self, texture);
							getglobal(self:GetName().."Name"):SetText(name);
							self:Show();
						end
					end
				end
			</OnUpdate>
		</Scripts>
	</Button>

	<Button name="QuestGuru_ColorPickerButtonTemplate" virtual="true">
		<Size x="16" y="16"/>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentSwatch">
					<Size x="12" y="12"/>
					<Anchors>
						<Anchor point="CENTER">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0" a="1.0"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter>
				if ( self.tooltipText ) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
					GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
				end
				if ( self.tooltipRequirement ) then
					GameTooltip:AddLine(self.tooltipRequirement, "", 1.0, 1.0, 1.0);
					GameTooltip:Show();
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="QuestGuru_QuestLogStartFinishTemplate" virtual="true">
		<Size x="285" y="14"/>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentLabel" inherits="QuestFont" justifyH="LEFT">
					<Size x="0" y="0"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentPos" inherits="QuestFontNormalSmall" justifyH="LEFT">
					<Size x="0" y="0"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLeave>
				QuestGuru_QuestStartInfoFrame:Hide();
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentNPCName" nonspacewrap="true">
			<Size x="0" y="10"/>
			<Anchors>
				<Anchor point="LEFT" relativeTo="$parentLabel" relativePoint="RIGHT">
					<Offset x="2" y="0"/>
				</Anchor>
			</Anchors> 
		</ButtonText>
		<NormalFont style="QuestFontLeft" />
		<HighlightFont style="QuestFontLeft" />
		<DisabledFont style="QuestFontLeft" />
	</Button>

	<Button name="QuestGuru_QuestLogTitleButtonTemplate" virtual="true">
		<Size x="300" y="16"/>
		<Attributes>
			<Attribute name="qID" type="text" value="" />
		</Attributes>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentTag" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="0" y="16"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="-2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentGuildMates" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="0" y="8"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentGroupMates" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="0" y="8"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="8" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLevel" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size x="32" y="8"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="30" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				QuestLogTitleButton_OnLoad(self);
			</OnLoad>
			<OnEvent>
				QuestLogTitleButton_OnEvent(self, event, ...);
			</OnEvent>
			<OnClick>
				QuestLogTitleButton_OnClick(self, button, down);
			</OnClick>
			<OnEnter>
				QuestLogTitleButton_OnEnter(self, motion);
			</OnEnter>
			<OnLeave>
				QuestLogTitleButton_OnLeave(self, motion);
			</OnLeave>
		</Scripts>
		<Frames>
			<CheckButton name="$parentCheck" inherits="OptionsCheckButtonTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="LEFT">
						<Offset x="16" y="0"/>
					</Anchor>
				</Anchors>
				<HitRectInsets>
					<AbsInset left="0" right="0" top="0" bottom="0" />
				</HitRectInsets>
				<Scripts>
					<OnClick>
						QuestLogTitleButtonCheck_OnClick(self, button, down);
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
		<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<ButtonText name="$parentNormalText" nonspacewrap="true">
			<Size x="0" y="10"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="62" y="0"/>
				</Anchor>
			</Anchors> 
		</ButtonText>
		<NormalFont style="GameFontNormalLeft" />
		<HighlightFont style="GameFontHighlightLeft" />
		<DisabledFont style="GameFontHighlightLeft" />
	</Button>

	<Button name="QuestGuru_QuestHistoryTitleButtonTemplate" virtual="true">
		<Size x="300" y="16"/>
		<Attributes>
			<Attribute name="qID" type="text" value="" />
		</Attributes>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentTag" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="0" y="16"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="-2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLevel" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size x="32" y="8"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="4" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				QuestGuru_QuestHistoryTitleButton_OnLoad(self);
			</OnLoad>
			<OnEvent>
				QuestGuru_QuestHistoryTitleButton_OnEvent(self, event, ...);
			</OnEvent>
			<OnClick>
				QuestGuru_QuestHistoryTitleButton_OnClick(self, button, down);
			</OnClick>
			<OnEnter>
				QuestGuru_QuestHistoryTitleButton_OnEnter(self, motion);
			</OnEnter>
			<OnLeave>
				if (self:GetID() ~= (QuestGuru_currHistory - FauxScrollFrame_GetOffset(QuestGuru_QuestHistoryListScrollFrame))) then
					getglobal(self:GetName().."Tag"):SetTextColor(self.r, self.g, self.b);
					getglobal(self:GetName().."Level"):SetTextColor(self.r, self.g, self.b);
				end
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<ButtonText name="$parentNormalText" nonspacewrap="true">
			<Size x="0" y="10"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="40" y="0"/>
				</Anchor>
			</Anchors> 
		</ButtonText>
		<NormalFont style="GameFontNormalLeft" />
		<HighlightFont style="GameFontHighlightLeft" />
		<DisabledFont style="GameFontHighlightLeft" />
	</Button>

	<Button name="QuestGuru_QuestAbandonTitleButtonTemplate" virtual="true">
		<Size x="300" y="16"/>
		<Attributes>
			<Attribute name="qID" type="text" value="" />
		</Attributes>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentTag" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="0" y="16"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="-2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentLevel" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size x="32" y="8"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="4" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				QuestGuru_QuestAbandonTitleButton_OnLoad(self);
			</OnLoad>
			<OnEvent>
				QuestGuru_QuestAbandonTitleButton_OnEvent(self, event, ...);
			</OnEvent>
			<OnClick>
				QuestGuru_QuestAbandonTitleButton_OnClick(self, button, down);
			</OnClick>
			<OnEnter>
				QuestGuru_QuestAbandonTitleButton_OnEnter(self, motion);
			</OnEnter>
			<OnLeave>
				if (self:GetID() ~= (QuestGuru_currAbandon - FauxScrollFrame_GetOffset(QuestGuru_QuestAbandonListScrollFrame))) then
					getglobal(self:GetName().."Tag"):SetTextColor(self.r, self.g, self.b);
					getglobal(self:GetName().."Level"):SetTextColor(self.r, self.g, self.b);
				end
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
			<Size x="16" y="16"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="3" y="0"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<ButtonText name="$parentNormalText" nonspacewrap="true">
			<Size x="0" y="10"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="40" y="0"/>
				</Anchor>
			</Anchors> 
		</ButtonText>
		<NormalFont style="GameFontNormalLeft" />
		<HighlightFont style="GameFontHighlightLeft" />
		<DisabledFont style="GameFontHighlightLeft" />
	</Button>

	<Button name="QuestGuru_QuestWatchButtonTemplate" virtual="true">
		<Size x="240" y="14"/>
		<Attributes>
			<Attribute name="qID" type="text" value="" />
		</Attributes>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD" hidden="true"/>
				<FontString name="$parentTag" inherits="GameFontNormal" justifyH="RIGHT">
					<Size x="0" y="16"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="-2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				QuestGuru_QuestWatchButton_OnClick(self, button, down);
			</OnClick>
			<OnEnter>
				QuestGuru_QuestWatchButton_OnEnter(self, motion);
				QuestGuru_QuestWatchFrameSlider:SetScript("OnMouseUp", nil);
				QuestGuru_ShowTrackerSlider(true);
			</OnEnter>
			<OnLeave>
				QuestGuru_QuestWatchButton_OnLeave(self, motion);
			</OnLeave>
		</Scripts>
		<NormalTexture name="$parentArrow" file="Interface\Buttons\UI-SortArrow">
			<Size x="8" y="8" />
			<Anchors>
				<Anchor point="LEFT" />
			</Anchors>
			<TexCoords left="0" right="0.5" top="0" bottom="1"/>
		</NormalTexture>
		<ButtonText name="$parentNormalText" nonspacewrap="true">
			<Size x="0" y="10"/>
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="0" y="0"/>
				</Anchor>
			</Anchors> 
		</ButtonText>
		<NormalFont style="GameFontNormalLeft" />
		<HighlightFont style="GameFontHighlightLeft" />
		<DisabledFont style="GameFontHighlightLeft" />
	</Button>

	<Button name="QuestGuru_QuestWatchMiniButtonTemplate" virtual="true">
		<Size x="16" y="16" />
		<ButtonText name="$parentText" nonspacewrap="true">
			<Anchors>
				<Anchor point="CENTER">
					<Offset x="0" y="0"/>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2">
			<Size x="25" y="25"/>
			<Anchors>
				<Anchor point="CENTER">
					<Offset x="0" y="-1"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
		<NormalFont style="GameFontNormalLeft" />
		<HighlightFont style="GameFontHighlightLeft" />
		<DisabledFont style="GameFontHighlightLeft" />
	</Button>
	
	<CheckButton name="QuestGuru_InterfaceOptionsBaseCheckButtonTemplate" virtual="true">
		<Size x="26" y="26"/>
		<HitRectInsets>
			<AbsInset left="0" right="-100" top="0" bottom="0"/>
		</HitRectInsets>
		<Scripts>
			<OnShow>
				self:SetHitRectInsets(0, -getglobal(self:GetName().."Text"):GetWidth(), 0, 0);
			</OnShow>
			<OnMouseUp>
				if ( self:GetChecked() ) then
					PlaySound("igMainMenuOptionCheckBoxOn");
				else
					PlaySound("igMainMenuOptionCheckBoxOff");
				end
			</OnMouseUp>
			<OnEnter>
				if ( self.tooltipText ) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
					GameTooltip:SetText(self.tooltipText, nil, nil, nil, nil, 1);
				end
				if ( self.tooltipRequirement ) then
					GameTooltip:AddLine(self.tooltipRequirement, "", 1.0, 1.0, 1.0);
					GameTooltip:Show();
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
		<NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
	 	<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>		
	</CheckButton>
	<CheckButton name="QuestGuru_InterfaceOptionsCheckButtonTemplate" virtual="true" inherits="QuestGuru_InterfaceOptionsBaseCheckButtonTemplate">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontHighlight">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</CheckButton>
	<CheckButton name="QuestGuru_InterfaceOptionsSmallCheckButtonTemplate" virtual="true" inherits="QuestGuru_InterfaceOptionsBaseCheckButtonTemplate">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</CheckButton>

	<Button name="QuestGuru_WorldmapIconTemplate" hidden="true" parent="WorldMapFrame" virtual="true">
		<Size x="24" y="24"/>
		<Attributes>
			<Attribute name="NPCName" type="text" value="" />
			<Attribute name="QuestName" type="text" value="" />
		</Attributes>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 3)
			</OnLoad>
			<OnEnter>
				WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT");
				WorldMapTooltip:SetText(self.NPCName);
				WorldMapTooltip:AddLine(self.QuestName);
				WorldMapTooltip:Show();
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide()
			</OnLeave>
		</Scripts>
		<NormalTexture name="QuestGuru_WorldmapIconTexture" setAllPoints="true" file="Interface\MINIMAP\Tracking\ObjectIcons">
			<TexCoords left="0.125" right="0.25" top="0.5" bottom="1"/>
		</NormalTexture>
	</Button>

	<Button name="QuestGuru_WorldmapQuestIconTemplate" hidden="true" parent="WorldMapFrame" virtual="true">
		<Size x="16" y="16"/>
		<Attributes>
			<Attribute name="NPCName" type="text" value="" />
			<Attribute name="QuestName" type="text" value="" />
		</Attributes>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(self:GetFrameLevel() + 2)
			</OnLoad>
			<OnEnter>
				WorldMapTooltip:SetOwner(self, "ANCHOR_RIGHT");
				WorldMapTooltip:SetText(self.NPCName);
				WorldMapTooltip:AddLine(self.QuestName);
				WorldMapTooltip:Show();
			</OnEnter>
			<OnLeave>
				WorldMapTooltip:Hide()
			</OnLeave>
		</Scripts>
		<NormalTexture name="$parentTexture" setAllPoints="true" file="Interface\MINIMAP\Tracking\ObjectIcons">
			<TexCoords left="0.125" right="0.25" top="0.5" bottom="1"/>
		</NormalTexture>
	</Button>
</Ui>