<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/
C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">

	<!-- Macaroon, a World of WarcraftÂ® user interface addon. -->
	<!-- CopyrightÂ© 2006-2012 Connor H. Chenoweth, aka Maul - All rights reserved. -->

	<!-- Font Templates -->

	<Font name="MacaroonShadowFontSmall" font="Fonts\FRIZQT__.TTF" virtual="true">
		<Shadow>
			<Offset x="1" y="-1"/>
			<Color r="0" g="0" b="0"/>
		</Shadow>
		<FontHeight>
			<AbsValue val="11"/>
		</FontHeight>
		<Color r="1.0" g="1.0" b="1.0"/>
	</Font>

	<!-- Texture Templates -->

	<Texture name="MacaroonCheckButtonTextureTemplate" virtual="true">
		<Size x="36" y="36"/>
		<Anchors>
			<Anchor point="CENTER">
				<Offset x="0" y="0"/>
			</Anchor>
		</Anchors>
	</Texture>

	<!-- Button Templates -->

	<Button name="MacaroonButtonTemplate1" virtual="true">
		<Size x="60" y="20"/>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormal" justifyH="CENTER" text="">
					<Anchors>
						<Anchor point="CENTER"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<NormalTexture file="Interface\Buttons\UI-Panel-Button-Up">
			<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
		</NormalTexture>
		<PushedTexture file="Interface\Buttons\UI-Panel-Button-Down">
			<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
		</PushedTexture>
		<HighlightTexture file="Interface\Buttons\UI-Panel-Button-Highlight" alphaMode="ADD">
			<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
		</HighlightTexture>
		<DisabledTexture file="Interface\Buttons\UI-Panel-Button-Disabled">
			<TexCoords left="0" right="0.625" top="0" bottom="0.6875"/>
		</DisabledTexture>
		<NormalFont inherits="GameFontNormalSmall"/>
		<HighlightFont inherits="GameFontHighlightSmall"/>
		<DisabledFont inherits="GameFontDisableSmall"/>
	</Button>

	<Button name="MacaroonButtonTemplate2" virtual="true">
		<!--
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="14"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="2" right="2" top="3" bottom="3"/>
			</BackgroundInsets>
		</Backdrop>
		-->
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER" nonspacewrap="false">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="2" y="0"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<NormalTexture file="Interface\QuestFrame\UI-QuestTitleHighlight">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<CheckedTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<Scripts>
			<OnLoad>
				self:GetNormalTexture():SetVertexColor(0.7,0.7,0.7)
				--self:SetBackdropColor(0, 0, 0)
				--self:SetBackdropBorderColor(0.5, 0.5, 0.5)
			</OnLoad>
			<OnEnter>
				if (self.tooltip) then
					GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
					GameTooltip:SetText(self.tooltip)
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="MacaroonButtonTemplate3" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER" nonspacewrap="false">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="2" y="0"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<CheckedTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<Scripts>
			<OnLoad>
				self:SetBackdropColor(0, 0, 0)
				self:SetBackdropBorderColor(0.5, 0.5, 0.5)
			</OnLoad>
			<OnClick>
				local text = _G[self:GetName().."Text"]:GetText()
				local parent = self:GetParent()
				local parentparent = self:GetParent():GetParent()
				local edit = _G[parentparent:GetName().."Edit"]

				if (text) then

					if (parentparent:GetObjectType() == "EditBox") then

						parentparent:SetText("")
						parentparent:SetText(text)
						parentparent:SetFocus()
						parentparent:ClearFocus()

						if (self.value) then
							parentparent.value = self.value
						end

					elseif (edit and self.value) then

						edit:SetText("")
						edit:SetText(self.value)

					elseif (edit) then

						edit:SetText("")
						edit:SetText(text)
					end
				end

				parent:Hide()
			</OnClick>
			<OnEnter>
				if (self.tooltip) then
					GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
					GameTooltip:SetText(self.tooltip)
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
	</Button>

	<Button name="MacaroonBindFrameTemplate" frameStrata="TOOLTIP" hidden="true" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentType" parentKey="type" inherits="ChatFontSmall" justifyH="CENTER" justifyV="CENTER" nonspacewrap="true" text="bind">
					<Anchors>
						<Anchor point="TOP">
							<Offset x="0" y="-1"/>
						</Anchor>
						<Anchor point="BOTTOM">
							<Offset x="0" y="3"/>
						</Anchor>
					</Anchors>
					<Shadow>
						<Offset x="1" y="-1"/>
						<Color r="0" g="0" b="0"/>
					</Shadow>
					<Color r="1" g="1" b="1"/>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentSelect" parentKey="select" setAllPoints="true" hidden="true">
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentReticle" file="Interface\Buttons\UI-AutoCastableOverlay">
							<TexCoords left="0.24" right="0.75" top="0.24" bottom="0.75"/>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				Macaroon.BindFrame_OnLoad(self)
			</OnLoad>
			<OnClick>
				Macaroon.BindFrame_OnClick(self, button, down, self:GetParent())
			</OnClick>
			<OnShow>
				Macaroon.BindFrame_OnShow(self, self:GetParent())
			</OnShow>
			<OnMouseWheel>
				Macaroon.BindFrame_OnMouseWheel(self, delta, self:GetParent())
			</OnMouseWheel>
			<OnKeyDown>
				Macaroon.BindFrame_OnKeyDown(self, key, self:GetParent())
			</OnKeyDown>
			<OnEnter>
				Macaroon.BindFrame_OnEnter(self, self:GetParent())
			</OnEnter>
			<OnLeave>
				Macaroon.BindFrame_OnLeave(self, self:GetParent())
			</OnLeave>
			<OnUpdate>
				Macaroon.BindFrame_OnUpdate(self, elapsed)
			</OnUpdate>
		</Scripts>
	</Button>

	<Button name="MacaroonEditFrameTemplate" frameStrata="TOOLTIP" hidden="true" virtual="true">
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="8"/>
			</EdgeSize>
			<BackgroundInsets>
				<AbsInset left="2" right="2" top="2" bottom="2"/>
			</BackgroundInsets>
			<Anchors>
				<Anchor point="TOPLEFT"/>
				<Anchor point="BOTTOMRIGHT"/>
			</Anchors>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentType" inherits="ChatFontSmall" justifyH="CENTER" justifyV="CENTER" nonspacewrap="true">
					<Anchors>
						<Anchor point="TOP">
							<Offset x="0" y="-1"/>
						</Anchor>
						<Anchor point="BOTTOM">
							<Offset x="0" y="3"/>
						</Anchor>
					</Anchors>
					<Shadow>
						<Offset x="1" y="-1"/>
						<Color r="0" g="0" b="0"/>
					</Shadow>
					<Color r="1" g="1" b="1"/>
				</FontString>
				<FontString name="$parentMessage" inherits="GameFontNormalSmall" justifyH="CENTER" justifyV="CENTER" nonspacewrap="true">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parent" relativePoint="BOTTOM">
							<Offset x="0" y="-1"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentSelect" parentKey="select" setAllPoints="true" hidden="true">
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentReticleTL" parentKey="TL" file="Interface\Buttons\UI-AutoCastableOverlay">
							<Size x="8" y="8"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="1" y="-1"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.234375" right="0.328125" top="0.234375" bottom="0.328125"/>
						</Texture>
						<Texture name="$parentReticleTR" parentKey="TR" file="Interface\Buttons\UI-AutoCastableOverlay">
							<Size x="8" y="8"/>
							<Anchors>
								<Anchor point="TOPRIGHT">
									<Offset x="-1" y="-1"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.640625" right="0.75" top="0.234375" bottom="0.328125"/>
						</Texture>
						<Texture name="$parentReticleBL" parentKey="BL" file="Interface\Buttons\UI-AutoCastableOverlay">
							<Size x="8" y="8"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT">
									<Offset x="1" y="1"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.234375" right="0.328125" top="0.640625" bottom="0.75"/>
						</Texture>
						<Texture name="$parentReticleBR" parentKey="BR" file="Interface\Buttons\UI-AutoCastableOverlay">
							<Size x="8" y="8"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-1" y="1"/>
								</Anchor>
							</Anchors>
							<TexCoords left="0.640625" right="0.75" top="0.640625" bottom="0.75"/>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				Macaroon.EditFrame_OnLoad(self)
			</OnLoad>
			<OnClick>
				Macaroon.EditFrame_OnClick(self, button, down, self:GetParent())
			</OnClick>
			<OnMouseWheel>
				Macaroon.EditFrame_OnMouseWheel(self, delta, self:GetParent())
			</OnMouseWheel>
			<OnEnter>
				Macaroon.EditFrame_OnEnter(self:GetParent())
			</OnEnter>
			<OnLeave>
				Macaroon.EditFrame_OnLeave(self:GetParent())
			</OnLeave>
			<OnUpdate>
				Macaroon.EditFrame_OnUpdate(self, elapsed)
			</OnUpdate>
		</Scripts>
	</Button>

	<Button name="MacaroonBarTemplate" enableMouse="true" movable="true" hidden="true" frameStrata="MEDIUM" virtual="true" inherits="SecureBarStateTemplate" clampedToScreen="false">
		<Size x="195" y="36"/>
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="8"/>
			</EdgeSize>
			<BackgroundInsets>
				<AbsInset left="2" right="2" top="2" bottom="2"/>
			</BackgroundInsets>
			<Anchors>
				<Anchor point="TOPLEFT"/>
				<Anchor point="BOTTOMRIGHT"/>
			</Anchors>
		</Backdrop>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormal" justifyH="CENTER">
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="$parent" relativePoint="TOP">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</FontString>
				<Texture name="$parentMessageBG" parentKey="messagebg" hidden="true">
					<Size x="1" y="1"/>
					<Anchors>
						<Anchor point="TOP" relativeTo="$parent" relativePoint="BOTTOM">
							<Offset x="0" y="-1"/>
						</Anchor>
					</Anchors>
					<Color r="0" g="0" b="0" a="0.9"/>
				</Texture>
				<FontString name="$parentMessage" parentKey="message" inherits="FriendsFont_UserText" justifyH="CENTER" justifyV="TOP">
					<Anchors>
						<Anchor point="CENTER" relativeTo="$parentMessageBG" relativePoint="CENTER">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="12"/>
					</FontHeight>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<CheckButton name="$parentKeyBind" parentKey="keybind" inherits="SecureActionButtonTemplate">
				<Scripts>
					<OnLoad>
						self:RegisterForClicks("AnyUp, AnyDown")
						self:RegisterEvent("ADDON_LOADED")
						self.config = {	clickAnchor = true, mouseoverAnchor = true }
					</OnLoad>
					<OnEvent>
                                                if (... == "Macaroon") then
							Macaroon.SetAnchors(self)
                                                end
					</OnEvent>
					<PostClick>
						--DEFAULT_CHAT_FRAME:AddMessage(self:GetName())
					</PostClick>
				</Scripts>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				Macaroon.Bar_OnLoad(self)
			</OnLoad>
			<OnEvent>
				Macaroon.Bar_OnEvent(self, event)
			</OnEvent>
			<OnClick>
				Macaroon.Bar_OnClick(self, button, down)
			</OnClick>
			<OnDoubleClick>
				Macaroon.Bar_OnDoubleClick(self, button, down)
			</OnDoubleClick>
			<OnKeyDown>
				Macaroon.Bar_OnKeyDown(self, key)
			</OnKeyDown>
			<OnKeyUp>
				Macaroon.Bar_OnKeyUp(self, key)
			</OnKeyUp>
			<OnDragStart>
				Macaroon.Bar_OnDragStart(self)
			</OnDragStart>
			<OnDragStop>
				Macaroon.Bar_OnDragStop(self)
			</OnDragStop>
			<OnEnter>
				Macaroon.Bar_OnEnter(self)
			</OnEnter>
			<OnLeave>
				Macaroon.Bar_OnLeave(self)
			</OnLeave>
			<OnUpdate>
				Macaroon.Bar_OnUpdate(self, elapsed)
			</OnUpdate>
			<OnMouseWheel>
				Macaroon.Bar_OnMouseWheel(self, delta)
			</OnMouseWheel>
			<OnShow>
				Macaroon.Bar_OnShow(self)
			</OnShow>
			<OnHide>
				Macaroon.Bar_OnHide(self)
			</OnHide>
		</Scripts>
	</Button>

	<Button name="MacaroonOptionTabTemplate" virtual="true">
		<Size x="72" y="36"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameTab-BGLeft" parentKey="leftTexture">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentMiddle" file="Interface\ChatFrame\ChatFrameTab-BGMid" horizTile="true" parentKey="middleTexture">
					<Size x="44" y="32"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameTab-BGRight" parentKey="rightTexture">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentSelectedLeft" file="Interface\ChatFrame\ChatFrameTab-SelectedLeft" alphaMode="ADD" parentKey="leftSelected">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentLeft" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentSelectedMiddle" file="Interface\ChatFrame\ChatFrameTab-SelectedMid" horizTile="true" alphaMode="ADD" parentKey="middleSelected">
					<Size x="44" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentMiddle" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentMiddle" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentSelectedRight" file="Interface\ChatFrame\ChatFrameTab-SelectedRight" alphaMode="ADD" parentKey="rightSelected">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentRight" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="8"/>
						<Anchor point="BOTTOMRIGHT" x="-8"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="HIGHLIGHT">
				<Texture name="$parentHighlightLeft" file="Interface\ChatFrame\ChatFrameTab-HighlightLeft" alphaMode="ADD" parentKey="leftHighlight">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentLeft" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentHighlightMiddle" file="Interface\ChatFrame\ChatFrameTab-HighlightMid" horizTile="true" alphaMode="ADD" parentKey="middleHighlight">
					<Size x="44" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentMiddle" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentMiddle" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
				<Texture name="$parentHighlightRight" file="Interface\ChatFrame\ChatFrameTab-HighlightRight" alphaMode="ADD" parentKey="rightHighlight">
					<Size x="16" y="32"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentRight" relativePoint="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMRIGHT"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnLoad>
		</Scripts>
		<ButtonText name="$parentText" parentKey="text">
			<Size x="60" y="8"/>
			<Anchors>
				<Anchor point="CENTER">
					<Offset x="3" y="-4"/>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalFont style="GameFontNormalSmall"/>
	</Button>

	<Button name="MacaroonColorSwatchTempate" virtual="true">
		<Size x="16" y="16"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBG" parentKey="bg">
					<Size x="14" y="14"/>
					<Anchors>
						<Anchor point="CENTER">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
					<Color r="1" g="1" b="1"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:GetNormalTexture():SetVertexColor(0,0,0)
				self.bg:SetVertexColor(0.5, 0.5, 0.5)
			</OnLoad>
			<OnEnter>
				self.bg:SetVertexColor(1, 0.82, 0)
			</OnEnter>
			<OnLeave>
				self.bg:SetVertexColor(0.5, 0.5, 0.5)
			</OnLeave>
		</Scripts>
		<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
	</Button>

	<!-- Check Buttons Templates -->

	<CheckButton name="MacaroonActionButtonTemplate" hidden="true" inherits="SecureActionButtonTemplate, SecureHandlerEnterLeaveTemplate" virtual="true" clampedToScreen="false">
		<Size x="43" y="43"/>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentFlash" file="Interface\Buttons\UI-QuickslotRed" hidden="true"/>
				<Texture name="$parentFlyoutArrow" parentKey="FlyoutArrow" hidden="true"/>
				<Texture name="$parentFlyoutBorder" parentKey="FlyoutBorder" hidden="true"/>
				<Texture name="$parentFlyoutBorderShadow" parentKey="FlyoutBorderShadow" hidden="true"/>
				<FontString name="$parentMacroName" inherits="GameFontHighlightSmallOutline">
					<Anchors>
						<Anchor point="BOTTOMLEFT">
							<Offset x="2" y="2"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-2" y="2"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
				<Texture name="$parentBorder" file="Interface\Buttons\UI-ActionButton-Border" hidden="true" alphaMode="ADD">
					<Size x="64" y="64"/>
					<Anchors>
						<Anchor point="CENTER">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="$parentGloss" file="" hidden="false" alphaMode="ADD">
					<Size x="63" y="63"/>
					<Anchors>
						<Anchor point="CENTER">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</Texture>
				<Texture name="$parentFlyoutTop" file="Interface\AddOns\Macaroon\Images\flyout.tga" hidden="true">
					<Size x="56" y="16"/>
					<Anchors>
						<Anchor point="TOP">
							<Offset x="0" y="5"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="1" top="0" bottom="0.28125"/>
				</Texture>
				<Texture name="$parentFlyoutBottom" file="Interface\AddOns\Macaroon\Images\flyout.tga" hidden="true">
					<Size x="56" y="16"/>
					<Anchors>
						<Anchor point="BOTTOM">
							<Offset x="0" y="-5"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="1" top="0.71875" bottom="1"/>
				</Texture>
				<Texture name="$parentFlyoutLeft" file="Interface\AddOns\Macaroon\Images\flyout.tga" hidden="true">
					<Size x="16" y="56"/>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="-5" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.28125" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentFlyoutRight" file="Interface\AddOns\Macaroon\Images\flyout.tga" hidden="true">
					<Size x="16" y="56"/>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="5" y="0"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.71875" right="1" top="0" bottom="1"/>
				</Texture>
				<FontString name="$parentHotKey" parentKey="hotkey" inherits="NumberFontNormal" monochrome="false" justifyH="RIGHT">
					<Size x="43" y="10"/>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="-3" y="-4"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentCount" inherits="NumberFontNormal" monochrome="false" justifyH="RIGHT">
					<Anchors>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-2" y="2"/>
						</Anchor>
					</Anchors>
				</FontString>
				<Texture name="$parentAutoCastable" file="Interface\Buttons\UI-AutoCastableOverlay" hidden="true">
					<Anchors>
						<Anchor point="TOPLEFT"/>
						<Anchor point="BOTTOMRIGHT"/>
					</Anchors>
					<TexCoords left="0.1875" right="0.8125" top="0.1875" bottom="0.8125"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentIconFrame" hidden="false">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="3" y="-3"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-3" y="3"/>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentIcon">
							<TexCoords left="0.01" right="0.99" top="0.01" bottom="0.99"/>
						</Texture>
					</Layer>
					<Layer level="BACKGROUND">
						<Texture name="$parentBackGround">
							<Size x="60" y="60"/>
							<Anchors>
								<Anchor point="CENTER">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Frames>
					<Cooldown name="$parentCooldown" inherits="CooldownFrameTemplate">
						<Anchors>
							<Anchor point="TOPLEFT"/>
							<Anchor point="BOTTOMRIGHT"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="$parentTimer" parentKey="timer" inherits="GameFontNormal" justifyH="CENTER" justifyV="CENTER" hidden="true">
									<Anchors>
										<Anchor point="CENTER">
											<Offset x="0.5" y="0"/>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								self:SetFrameLevel(3)
								self.button = self:GetParent():GetParent()
							</OnLoad>
							<OnHide>
								self.active = nil
							</OnHide>
						</Scripts>
					</Cooldown>
					<Cooldown name="$parentAuraWatch" inherits="CooldownFrameTemplate" reverse="true">
						<Anchors>
							<Anchor point="TOPLEFT" relativeTo="$parentCooldown" relativePoint="TOPLEFT"/>
							<Anchor point="BOTTOMRIGHT" relativeTo="$parentCooldown" relativePoint="BOTTOMRIGHT"/>
						</Anchors>
						<Layers>
							<Layer level="OVERLAY">
								<FontString name="$parentTimer" parentKey="timer" inherits="GameFontNormal" justifyH="CENTER" justifyV="CENTER" hidden="true">
									<Anchors>
										<Anchor point="CENTER">
											<Offset x="0.5" y="0"/>
										</Anchor>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								self:SetFrameLevel(3)
								self.button = self:GetParent():GetParent()
								self.alphafade = true
							</OnLoad>
							<OnHide>
								self.active = nil
							</OnHide>
						</Scripts>
					</Cooldown>
				</Frames>
				<Scripts>
					<OnLoad>
						self:SetFrameLevel(2)
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentShine" inherits="AutoCastShineTemplate">
				<Size x="32" y="32"/>
				<Anchors>
					<Anchor point="CENTER">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentHitBox" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT"/>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture>
							<Size x="1" y="1"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="0" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMLEFT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1"/>
						</Texture>
						<Texture>
							<Size x="1" y="1"/>
							<Anchors>
								<Anchor point="TOPRIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1"/>
						</Texture>
						<Texture>
							<Size x="1" y="1"/>
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="0" y="0"/>
								</Anchor>
								<Anchor point="TOPRIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1"/>
						</Texture>
						<Texture>
							<Size x="1" y="1"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT">
									<Offset x="0" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="0" y="0"/>
								</Anchor>
							</Anchors>
							<Color r="1" g="1" b="1"/>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
			<CheckButton name="$parentBindFrame" inherits="MacaroonBindFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentHitBox" relativePoint="TOPLEFT"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentHitBox" relativePoint="BOTTOMRIGHT"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						Macaroon.BindFrame_OnLoad(self)
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentEditFrame" inherits="MacaroonEditFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT"/>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
			</CheckButton>
		</Frames>
		<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot">
			<Anchors>
				<Anchor point="TOPLEFT" x="-12" y="12"/>
				<Anchor point="BOTTOMRIGHT" x="13" y="-13"/>
			</Anchors>
		</NormalTexture>
		<PushedTexture name="$parentPushedTexture" inherits="MacaroonCheckButtonTextureTemplate" file="Interface\Buttons\UI-Quickslot-Depress">
			<Anchors>
				<Anchor point="TOPLEFT" x="2" y="-2"/>
				<Anchor point="BOTTOMRIGHT" x="-2" y="2"/>
			</Anchors>
		</PushedTexture>
		<HighlightTexture name="$parentHighlightTexture" inherits="MacaroonCheckButtonTextureTemplate" alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square">
			<Anchors>
				<Anchor point="TOPLEFT" x="3" y="-3"/>
				<Anchor point="BOTTOMRIGHT" x="-3" y="3"/>
			</Anchors>
		</HighlightTexture>
		<CheckedTexture name="$parentCheckedTexture" inherits="MacaroonCheckButtonTextureTemplate" alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight">
			<Anchors>
				<Anchor point="TOPLEFT" x="3" y="-3"/>
				<Anchor point="BOTTOMRIGHT" x="-3" y="3"/>
			</Anchors>
		</CheckedTexture>
		<Scripts>
			<OnLoad>
				Macaroon.Button_OnLoad(self)
			</OnLoad>
			<OnDragStart>
				Macaroon.Button_OnDragStart(self, button)
			</OnDragStart>
			<OnDragStop>
				Macaroon.Button_OnDragStop(self)
			</OnDragStop>
			<OnReceiveDrag>
				Macaroon.Button_OnReceiveDrag(self)
			</OnReceiveDrag>
			<PreClick>
				Macaroon.Button_PreClick(self)
			</PreClick>
			<PostClick>
				Macaroon.Button_PostClick(self)
			</PostClick>
			<OnEnter>
				Macaroon.Button_OnEnter(self)
			</OnEnter>
			<OnLeave>
				Macaroon.Button_OnLeave(self)
			</OnLeave>
		</Scripts>
	</CheckButton>

	<CheckButton name="MacaroonAdjustOptionButtonTemplate" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormal" justifyH="LEFT" nonspacewrap="false">
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="18" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentTextRight" parentKey="textR" inherits="GameFontHighlight" justifyH="RIGHT" text="---" nonspacewrap="false">
					<Anchors>
						<Anchor point="TOPRIGHT">
							<Offset x="-18" y="0"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-18" y="0"/>
						</Anchor>
						<Anchor point="LEFT" relativeTo="$parentText" relativePoint="RIGHT">
							<Offset x="2" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentAdd" parentKey="add" hidden="true">
				<Size>
					<AbsDimension x="24" y="30"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset x="3" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						Macaroon.AdjustOptionButtonAdd_OnClick(self, button, down, self:GetParent())
					</OnClick>
					<OnUpdate>
						Macaroon.AdjustOptionButtonAddSub_OnUpdate(self, elapsed, self:GetParent())
					</OnUpdate>
				</Scripts>
				<NormalTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionRight-Up"/>
				<PushedTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionRight-Down"/>
				<HighlightTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionRight-Highlight" alphaMode="ADD"/>
			</Button>
			<Button name="$parentSubtract" parentKey="sub" hidden="true">
				<Size>
					<AbsDimension x="24" y="30"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT">
						<Offset x="-3" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnClick>
						Macaroon.AdjustOptionButtonSubtract_OnClick(self, button, down, self:GetParent())
					</OnClick>
					<OnUpdate>
						Macaroon.AdjustOptionButtonAddSub_OnUpdate(self, elapsed, self:GetParent())
					</OnUpdate>
				</Scripts>
				<NormalTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionLeft-Up"/>
				<PushedTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionLeft-Down"/>
				<HighlightTexture file="Interface\AddOns\Macaroon\Images\AdjustOptionLeft-Highlight" alphaMode="ADD"/>
			</Button>
		</Frames>
		<NormalTexture>
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<CheckedTexture file="" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="6" y="0"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-6" y="-1"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="6" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-6" y="2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<PushedTexture file="" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="4" y="-4"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-8" y="0"/>
				</Anchor>
			</Anchors>
		</PushedTexture>
		<Scripts>
			<OnLoad>
				self:RegisterForClicks("AnyUp", "AnyDown")
				self:GetNormalTexture():SetVertexColor(0.7,0.7,0.7)
				self.elapsed = 0
				self.limit = 3
			</OnLoad>
			<OnClick>
				Macaroon.AdjustOptionButton_OnClick(self, button, down)
			</OnClick>
			<OnShow>
				Macaroon.AdjustOptionButton_OnShow(self)
			</OnShow>
			<OnEnter>
				if (self.onenter_func) then
					self.onenter_func(self)
				end

				if (self.tooltip) then
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT")
					GameTooltip:SetText(self.tooltip)
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
			<OnUpdate>
				Macaroon.AdjustOptionButton_OnUpdate(self, elapsed)
			</OnUpdate>
		</Scripts>
	</CheckButton>

	<CheckButton name="MacaroonScrollFrameButtonTemplate" virtual="true">
		<!--
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="14"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="2" right="2" top="3" bottom="3"/>
			</BackgroundInsets>
		</Backdrop>
		-->
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER" nonspacewrap="false">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="2" y="0"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="-4" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentToggle" parentKey="toggle" hidden="true">
				<Size x="14" y="14"/>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset x="-3" y="0"/>
					</Anchor>
				</Anchors>
				<NormalTexture name="$parentNormalTexture" urgency="5" file="Interface\Buttons\UI-PlusButton-Up"/>
				<PushedTexture name="$parentPushedTexture" file="Interface\Buttons\UI-MinusButton-Up"/>
				<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD"/>
			</Button>
		</Frames>
		<NormalTexture file="Interface\QuestFrame\UI-QuestTitleHighlight">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<CheckedTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="2" y="-2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="-2" y="2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<Scripts>
			<OnLoad>
				self:GetNormalTexture():SetVertexColor(0.7,0.7,0.7)
				--self:SetBackdropColor(0, 0, 0)
				--self:SetBackdropBorderColor(0.5, 0.5, 0.5)
			</OnLoad>
			<OnEnter>
				if (self.tooltip) then
					GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
					GameTooltip:SetText(self.tooltip)
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
		</Scripts>
	</CheckButton>

	<CheckButton name="MacaroonMacroButtonTemplate" virtual="true">
		<Size x="28" y="28"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\Buttons\UI-EmptySlot" parentKey="bg">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset x="-2" y="2"/>
						</Anchor>
						<Anchor point="BOTTOMRIGHT">
							<Offset x="2" y="-2"/>
						</Anchor>
					</Anchors>
					<TexCoords left="0.15625" right="0.8125" top="0.15625" bottom="0.8125"/>
				</Texture>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self.elapsed = 0
				self.click = false
				self:RegisterForClicks("AnyUp")
			</OnLoad>
			<OnClick>
				if (self.onclick_func) then
					self.onclick_func(self, button, down)
				end
			</OnClick>
			<OnUpdate>
				if (self.onupdate_func) then
					self.onupdate_func(self, elapsed)
				end
			</OnUpdate>
		</Scripts>
		<NormalTexture name="$parentIcon" parentKey="icon">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="1" y="-1"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="1" y="-1"/>
				</Anchor>
			</Anchors>
			<TexCoords left="0.01" right="0.99" top="0.01" bottom="0.99"/>
		</NormalTexture>
		<CheckedTexture alphaMode="ADD" file="Interface\Buttons\CheckButtonHilight"/>
	</CheckButton>

	<CheckButton name="MacaroonAnchorButtonTemplate" hidden="true" inherits="SecureActionButtonTemplate" virtual="true" clampedToScreen="true">
		<Size x="36" y="36"/>
		<Frames>
			<CheckButton name="$parentEditFrame" inherits="MacaroonEditFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT"/>
					<Anchor point="BOTTOMRIGHT"/>
				</Anchors>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				self:SetFrameLevel(2)
			</OnLoad>
		</Scripts>
		<NormalTexture name="$parentIcon" parentKey="icon">
			<Anchors>
				<Anchor point="TOPLEFT" x="-12" y="12"/>
				<Anchor point="BOTTOMRIGHT" x="13" y="-13"/>
			</Anchors>
		</NormalTexture>
	</CheckButton>

	<CheckButton name="MacaroonOptionCBTemplate" virtual="true">
		<Size x="16" y="16"/>
		<HitRectInsets>
			<AbsInset left="2" right="2" top="2" bottom="2"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset x="3" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				Macaroon.CheckButtonOptions_OnClick(self)
			</OnClick>
			<OnShow>
				Macaroon.CheckButtonOptions_OnShow(self)
			</OnShow>
			<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">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</PushedTexture>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-1" y="1"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="1" y="-1"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
	</CheckButton>

	<CheckButton name="MacaroonOptionCBTemplateLarge" virtual="true">
		<Size x="24" y="24"/>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset x="1" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				Macaroon.CheckButtonOptions_OnClick(self)
			</OnClick>
			<OnShow>
				Macaroon.CheckButtonOptions_OnShow(self)
			</OnShow>
			<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 urgency="5" file="Interface\Buttons\UI-CheckBox-Up"/>
		<PushedTexture urgency="5" file="Interface\Buttons\UI-CheckBox-Down"/>
		<HighlightTexture urgency="5" file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
		<CheckedTexture urgency="5" file="Interface\Buttons\UI-CheckBox-Check"/>
		<DisabledCheckedTexture urgency="5" file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
	</CheckButton>

	<CheckButton name="MacaroonOptionRadioButtonTemplate" virtual="true">
		<Size x="16" y="16"/>
		<HitRectInsets>
			<AbsInset left="2" right="2" top="2" bottom="2"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="LEFT" relativePoint="RIGHT">
							<Offset x="3" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				Macaroon.RadioButtonOptions_OnClick(self, button)
			</OnClick>
			<OnShow>
				Macaroon.RadioButtonOptions_OnShow(self)
			</OnShow>
			<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\Addons\Macaroon\Images\RoundCheckBox.tga"/>
		<CheckedTexture file="Interface\Addons\Macaroon\Images\RoundCheck.tga"/>
		<DisabledTexture file="Interface\Addons\Macaroon\Images\RoundCheckDisabled.tga"/>
		<HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
	</CheckButton>

	<CheckButton name="MacaroonOptionCBColorSwatchTemplate" virtual="true">
		<Size x="20" y="20"/>
		<HitRectInsets>
			<AbsInset left="2" right="2" top="2" bottom="2"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" justifyH="RIGHT" parentKey="text" inherits="GameFontNormal">
					<Anchors>
						<Anchor point="RIGHT" relativePoint="LEFT">
							<Offset x="-10" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentSwatch1" parentKey="swatch1" inherits="MacaroonColorSwatchTempate">
				<Anchors>
					<Anchor point="LEFT" relativePoint="RIGHT">
						<Offset x="15" y="0"/>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentSwatch2" parentKey="swatch2" inherits="MacaroonColorSwatchTempate">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentSwatch1" relativePoint="RIGHT">
						<Offset x="15" y="0"/>
					</Anchor>
				</Anchors>
			</Button>
		</Frames>
		<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>
		<NormalTexture file="Interface\Buttons\UI-CheckBox-Up">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<PushedTexture file="Interface\Buttons\UI-CheckBox-Down">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</PushedTexture>
		<CheckedTexture file="Interface\Buttons\UI-CheckBox-Check">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-1" y="1"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="1" y="-1"/>
				</Anchor>
			</Anchors>
		</CheckedTexture>
		<HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD">
			<Anchors>
				<Anchor point="TOPLEFT">
					<Offset x="-2" y="2"/>
				</Anchor>
				<Anchor point="BOTTOMRIGHT">
					<Offset x="2" y="-2"/>
				</Anchor>
			</Anchors>
		</HighlightTexture>
		<DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled"/>
	</CheckButton>

	<!-- EditBox Templates -->

	<EditBox name="MacaroonEditBoxTemplate1" historyLines="0" numeric="false" autoFocus="false" nonspacewrap="true" virtual="true" >
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="14"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="3" right="3" top="2" bottom="2"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" justifyH="CENTER" inherits="GameFontNormalSmall" nonspacewrap="true">
					<Anchors>
						<Anchor point="BOTTOM" relativePoint="TOP">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentButton" hidden="false">
				<Size x="20" y="20"/>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="RIGHT">
						<Offset x="-2" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:RegisterEvent("ADDON_LOADED")
					</OnLoad>
					<OnEvent>
                                                if (... == "Macaroon") then
							self:SetWidth(self:GetParent():GetHeight())
							self:SetHeight(self:GetParent():GetHeight())
                                                end
					</OnEvent>
					<OnClick>
						self:GetParent().show = nil
						self:GetParent().popup.timer = 0;
						if (self:GetParent().popup:IsVisible()) then
							self:GetParent().popup:Hide()
						else
							if (self:GetParent().popup.data) then
								self:GetParent().popup:Show()
							end
						end
						PlaySound("igMainMenuOptionCheckBoxOn")
					</OnClick>
				</Scripts>
				<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up"/>
				<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down"/>
				<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled"/>
				<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
			</Button>
			<Frame name="$parentPopUp" toplevel="true" clampedToScreen="true">
				<Anchors>
					<Anchor point="TOPRIGHT">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop name="$parentBackdrop" bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="18"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="8"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="3" right="3" top="2" bottom="2"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self.timer = 0
						self.options = {}
						self:RegisterEvent("ADDON_LOADED")
						self:SetBackdropColor(0, 0, 0)
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:Hide()
					</OnLoad>
					<OnShow>
						self.timer = 0
					</OnShow>
					<OnHide>
						self:GetParent().click = nil
					</OnHide>
					<OnUpdate>
						self.timer = self.timer + elapsed
						if (self:IsVisible() and self.timer > 5) then
							if (not self:IsMouseOver()) then
								self:Hide()
							end
						end
					</OnUpdate>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self:RegisterEvent("PLAYER_LOGIN")
				self:SetBackdropColor(0, 0, 0)
				self:SetBackdropBorderColor(0.5, 0.5, 0.5)
				self.popup = _G[self:GetName().."PopUp"]
				self.text = _G[self:GetName().."Text"]
			</OnLoad>
			<OnTabPressed>
				self:ClearFocus()
			</OnTabPressed>
			<OnEnterPressed>
				self:ClearFocus()
			</OnEnterPressed>
			<OnEscapePressed>
				self:ClearFocus()
			</OnEscapePressed>
			<OnEditFocusLost>
				self:HighlightText(0, 0)
			</OnEditFocusLost>
			<OnEditFocusGained>
				self:HighlightText()
			</OnEditFocusGained>
		</Scripts>
		<FontString name="$parentFont" justifyH="CENTER" inherits="GameFontHighlightSmall"/>
	</EditBox>

	<EditBox name="MacaroonEditBoxTemplate2" historyLines="0" numeric="false" autoFocus="false" nonspacewrap="true" virtual="true" >
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="14"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="3" right="3" top="2" bottom="2"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" justifyH="CENTER" inherits="GameFontNormalSmall" nonspacewrap="true">
					<Anchors>
						<Anchor point="BOTTOM" relativePoint="TOP">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:RegisterEvent("ADDON_LOADED")
				self:SetBackdropColor(0, 0, 0)
				self:SetBackdropBorderColor(0.5, 0.5, 0.5)
				self.text = _G[self:GetName().."Text"]
			</OnLoad>
			<OnEnterPressed>
				self:ClearFocus()
			</OnEnterPressed>
			<OnEscapePressed>
				self:ClearFocus()
			</OnEscapePressed>
			<OnEditFocusLost>
				self:HighlightText(0, 0)
			</OnEditFocusLost>
			<OnEditFocusGained>
				self:HighlightText()
			</OnEditFocusGained>
		</Scripts>
		<FontString name="$parentFont" justifyH="LEFT" inherits="GameFontHighlightSmall"/>
	</EditBox>

	<EditBox name="MacaroonEditBoxTemplate3" historyLines="0" numeric="false" autoFocus="false" nonspacewrap="true" virtual="true" >
		<Size x="37" y="21"/>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText" parentKey="text" inherits="GameFontNormalSmall" nonspacewrap="true">
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="LEFT">
							<Offset x="0" y="1"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:RegisterEvent("ADDON_LOADED")
				self:SetBackdropBorderColor(0.5, 0.5, 0.5)
				self:SetBackdropColor(0,0,0,0.5)
			</OnLoad>
			<OnEscapePressed>
				self:ClearFocus()
			</OnEscapePressed>
			<OnEditFocusLost>
				self:HighlightText(0, 0)
			</OnEditFocusLost>
			<OnEditFocusGained>
				self:HighlightText()
			</OnEditFocusGained>
		</Scripts>
		<FontString name="$parentFont" justifyH="CENTER" inherits="GameFontHighlightSmall"/>
	</EditBox>

	<!-- Slider Templates -->

	<Slider name="MacaroonSliderTemplate1" inherits="OptionsSliderTemplate" virtual="true">
		<Size x="170" y="16"/>
		<HitRectInsets>
			<AbsInset left="0" right="0" top="-1" bottom="-1"/>
		</HitRectInsets>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentText2" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="BOTTOM" relativePoint="TOP"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self.text2 = _G[self:GetName().."Text2"]
				self.low = _G[self:GetName().."Low"]
				self.high = _G[self:GetName().."High"]

				self.low:SetText("")
				self.high:SetText("")
			</OnLoad>
			<OnShow>
				Macaroon.OptionsSlider_OnShow(self)
			</OnShow>
			<OnValueChanged>
				Macaroon.OptionsSlider_OnValueChanged(self, value)
			</OnValueChanged>
		</Scripts>
	</Slider>

	<!-- ScrollFrame Templates -->

	<ScrollFrame name="MacaroonScrollFrameTemplate1" toplevel="true"  inherits="UIPanelScrollFrameTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				self.offset = 0
				self.scrollbar = _G[self:GetName().."ScrollBar"]
				self.scrollbarup = _G[self.scrollbar:GetName().."ScrollUpButton"]
				self.scrollbardown = _G[self.scrollbar:GetName().."ScrollDownButton"]

				self.scrollbar:ClearAllPoints()
				self.scrollbar:SetPoint("TOPLEFT", self, "TOPRIGHT", -18, -10)
				self.scrollbar:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", -18, 8)

				self.scrollbarup:SetPoint("BOTTOM", self.scrollbar, "TOP", 0, -4)
				self.scrollbardown:SetPoint("TOP", self.scrollbar, "BOTTOM", 0, 4)

				self.parent = self:GetParent()
			</OnLoad>
			<OnScrollRangeChanged>
				ScrollFrame_OnScrollRangeChanged(self, yrange)
			</OnScrollRangeChanged>
			<OnVerticalScroll>
				self.scrollbar:SetValue(offset)
				local min, max = self.scrollbar:GetMinMaxValues()
				if ( offset == 0 ) then
					self.scrollbarup:Disable()
				else
					self.scrollbarup:Enable()
				end
				if ((self.scrollbar:GetValue() - max) == 0) then
					self.scrollbardown:Disable()
				else
					self.scrollbardown:Enable()
				end
			</OnVerticalScroll>
			<OnMouseWheel>
				ScrollFrameTemplate_OnMouseWheel(self, delta)
			</OnMouseWheel>
		</Scripts>
	</ScrollFrame>

	<ScrollFrame name="MacaroonScrollFrameTemplate2" inherits="UIPanelScrollFrameTemplate" virtual="true">
		<Frames>
			<Button name="$parentFocusButton" parentKey="focus" setAllPoints="true">
				<Scripts>
					<OnClick>
						self:GetParent().edit:SetFocus()
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<ScrollChild>
			<EditBox name="$parentEditBox" parentKey="edit" multiLine="true" letters="1023" countInvisibleLetters="true" autoFocus="false">
				<Size x="330" y="1"/>
				<Scripts>
					<OnTextChanged>
						ScrollingEdit_OnTextChanged(self, self:GetParent())
					</OnTextChanged>
					<OnCursorChanged function="ScrollingEdit_OnCursorChanged"/>
					<OnEscapePressed>
						self:ClearFocus()
					</OnEscapePressed>
					<OnTabPressed>
						self:ClearFocus()
					</OnTabPressed>
					<OnHide>
						self:ClearFocus()
					</OnHide>
					<OnEditFocusLost>
						self:GetParent().focus:Show()
					</OnEditFocusLost>
					<OnEditFocusGained>
						self:GetParent().focus:Hide()
					</OnEditFocusGained>
					<OnUpdate>
						ScrollingEdit_OnUpdate(self, elapsed, self:GetParent())
					</OnUpdate>
				</Scripts>
				<FontString inherits="GameFontHighlight"/>
			</EditBox>
		</ScrollChild>
		<Scripts>
			<OnLoad>
				self.scrollbar = _G[self:GetName().."ScrollBar"]
				self.scrollbarup = _G[self.scrollbar:GetName().."ScrollUpButton"]
				self.scrollbardown = _G[self.scrollbar:GetName().."ScrollDownButton"]

				self.scrollbar:SetFrameLevel(self.focus:GetFrameLevel() + 2)
				self.scrollbar:ClearAllPoints()
				self.scrollbar:SetPoint("TOPLEFT", self, "TOPRIGHT", -18, -10)
				self.scrollbar:SetPoint("BOTTOMLEFT", self, "BOTTOMRIGHT", -18, 8)

				self.scrollbarup:SetPoint("BOTTOM", self.scrollbar, "TOP", 0, -4)
				self.scrollbardown:SetPoint("TOP", self.scrollbar, "BOTTOM", 0, 4)
			</OnLoad>
		</Scripts>
	</ScrollFrame>

	<Frame name="MacaroonDockTemplate" clampedToScreen="true" virtual="true">
		<!--
		<Backdrop name="$parentBackdrop" bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="14"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="3" right="3" top="2" bottom="2"/>
			</BackgroundInsets>
		</Backdrop>
		-->
		<Scripts>
			<OnLoad>
				--self:SetBackdropBorderColor(0.5, 0.5, 0.5)
				--self:SetBackdropColor(0,0,0,0.7)
			</OnLoad>
			<OnShow>
				self:SetFrameStrata("DIALOG")
				self.elapsed = 0
			</OnShow>
		</Scripts>
	</Frame>

	<!-- Normal Frames -->

	<Frame name="MacaroonPanelMover" movable="true" frameStrata="DIALOG" parent="UIParent" clampedToScreen="true">
		<Size x="20" y="20"/>
		<Anchors>
			<Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER">
				<Offset x="0" y="0"/>
			</Anchor>
		</Anchors>
		<Scripts>
			<OnLoad>
				self:Hide()
			</OnLoad>
			<OnShow>
				for k,v in pairs(Macaroon.Panels) do
					v[1]:ClearAllPoints()
					v[1]:SetUserPlaced(false)
					v[1]:SetPoint("CENTER", self, "CENTER")
				end
			</OnShow>
		</Scripts>
	</Frame>

	<Button name="MacaroonMinimapButton" parent="Minimap" enableMouse="true" movable="true">
		<Size x="32" y="32"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentIcon" file="Interface\AddOns\Macaroon\Images\macaroon_logo_m">
					<Size x="20" y="20"/>
					<Anchors>
						<Anchor point="CENTER">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<Texture name="$parentBorder" file="Interface\Minimap\MiniMap-TrackingBorder">
					<Size x="52" y="52"/>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>

			<Frame name="$parentDragFrame" hidden="true" toplevel="true">
				<Scripts>
					<OnUpdate>
						Macaroon.DragFrame_OnUpdate()
					</OnUpdate>
				</Scripts>
			</Frame>

			<Frame name="$parentPopUp" frameStrata="DIALOG" toplevel="true" clampedToScreen="true">
				<Anchors>
					<Anchor point="CENTER">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop name="$parentBackdrop" bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="18"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="8"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="3" right="3" top="2" bottom="2"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self.timer = 0
						self.options = {}
						self:RegisterEvent("ADDON_LOADED")
						self:SetBackdropColor(0, 0, 0)
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:Hide()
					</OnLoad>
					<OnShow>
						self.timer = 0
					</OnShow>
					<OnUpdate>
						self.timer = self.timer + elapsed
						if (self:IsVisible() and self.timer > 5) then
							if (not self:IsMouseOver()) then
								self:Hide()
							end
						end
					</OnUpdate>
				</Scripts>
			</Frame>

			<EditBox name="$parentEdit" historyLines="0" numeric="false" autoFocus="false" nonspacewrap="true">
				<Anchors>
					<Anchor point="CENTER">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEditFocusGained>
						self:ClearFocus()
					</OnEditFocusGained>
					<OnTextChanged>
						if (Macaroon.Strings["MINIMAP_ACTION_"..self:GetText().."_FUNC"]) then
							local arg = Macaroon.Strings["MINIMAP_ACTION_"..self:GetText().."_ARG"]
							Macaroon[Macaroon.Strings["MINIMAP_ACTION_"..self:GetText().."_FUNC"]](arg)
						end
					</OnTextChanged>
				</Scripts>
			</EditBox>

		</Frames>
		<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
		<Scripts>
			<OnLoad>
				Macaroon.MinimapButton_OnLoad(self)
			</OnLoad>
			<OnEvent>
				Macaroon.MinimapButton_OnEvent(self)
			</OnEvent>
			<OnDragStart>
				Macaroon.MinimapButton_OnDragStart(self)
			</OnDragStart>
			<OnDragStop>
				Macaroon.MinimapButton_OnDragStop(self)
			</OnDragStop>
			<OnShow>
				Macaroon.MinimapButton_OnShow(self)
			</OnShow>
			<OnHide>
				Macaroon.MinimapButton_OnHide(self)
			</OnHide>
			<OnEnter>
				Macaroon.MinimapButton_OnEnter(self)
			</OnEnter>
			<OnLeave>
				Macaroon.MinimapButton_OnLeave(self)
			</OnLeave>
			<OnClick>
				Macaroon.MinimapButton_OnClick(self, button)
			</OnClick>
		</Scripts>
	</Button>

	<Frame name="MacaroonMainMenu" hidden="true" parent="InterfaceOptionsFramePanelContainer">
		<Frames>
			<Frame name="$parentHeader">
				<Size x="225" y="75"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="InterfaceOptionsFrame" relativePoint="TOP">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="80"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="24"/>
					</EdgeSize>
				</Backdrop>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentTexture" file="Interface\AddOns\Macaroon\Images\macaroon_logo_full.tga">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="5" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-5" y="-5"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetBackdropColor(0.5,0.5,0.5,1)
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentCheckbuttonBorder" parentKey="chkBorder">
				<Size x="1" y="140"/>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="10" y="-72"/>
					</Anchor>
					<Anchor point="TOPRIGHT">
						<Offset x="-10" y="-72"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:SetBackdropColor(0,0,0,0.7)
						self:SetFrameLevel(self:GetParent():GetFrameLevel())
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentDropdownBorder">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="10" y="-10"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentCheckbuttonBorder" relativePoint="TOPRIGHT">
						<Offset x="0" y="5"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:SetBackdropColor(0,0,0,0.7)
						self:SetFrameLevel(self:GetParent():GetFrameLevel())
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentSliderBorder">
				<Size x="1" y="100"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentCheckbuttonBorder" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="-5"/>
					</Anchor>
					<Anchor point="TOPRIGHT" relativeTo="$parentCheckbuttonBorder" relativePoint="BOTTOMRIGHT">
						<Offset x="0" y="-5"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:SetBackdropColor(0,0,0,0.7)
						self:SetFrameLevel(self:GetParent():GetFrameLevel())
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self.name = "Macaroon"
				self:RegisterEvent("ADDON_LOADED")
				self:Hide()
			</OnLoad>
			<OnEvent>
                                if (... == "Macaroon") then
				    Macaroon.MacaroonMainMenu_BuildOptions(self)
				    InterfaceOptions_AddCategory(self)
                                end
			</OnEvent>
			<OnShow>
				if (MacaroonBarEditor:IsVisible()) then
					MacaroonBarEditor.shrink = true
				elseif (MacaroonObjectEditor:IsVisible()) then
					Macaroon.ObjectEditorHide()
				end
			</OnShow>
		</Scripts>
	</Frame>

	<Frame name="MacaroonButtonStorage" hidden="true" parent="InterfaceOptionsFramePanelContainer">
		<Frames>
			<Frame name="$parentHeader">
				<Size x="225" y="75"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="InterfaceOptionsFrame" relativePoint="TOP">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="80"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="24"/>
					</EdgeSize>
				</Backdrop>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentTexture" file="Interface\AddOns\Macaroon\Images\macaroon_logo_full.tga">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="5" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-5" y="-5"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetBackdropColor(0.5,0.5,0.5,1)
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentButtonBorder">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset x="10" y="-26"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-10" y="60"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:SetBackdropColor(0.4,0.4,0.4,1)
						self:SetFrameLevel(self:GetParent():GetFrameLevel())
					</OnLoad>
				</Scripts>
			</Frame>
			<Frame name="$parentOptionsBorder">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentButtonBorder" relativePoint="BOTTOMLEFT">
						<Offset x="0" y="-1"/>
					</Anchor>
					<Anchor point="BOTTOMRIGHT">
						<Offset x="-10" y="10"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="16"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Frames>
					<Button name="$parentBind" inherits="OptionsButtonTemplate">
						<Size x="85" y="25"/>
						<Anchors>
							<Anchor point="LEFT">
								<Offset x="5" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetText(Macaroon.Strings.MINIMAP_ACTION_4)
							</OnLoad>
							<OnClick>
								Macaroon.ButtonBind()
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentEdit" inherits="OptionsButtonTemplate">
						<Size x="85" y="25"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentBind" relativePoint="RIGHT">
								<Offset x="1" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetText(Macaroon.Strings.MINIMAP_ACTION_2)
							</OnLoad>
							<OnClick>
								Macaroon.ObjectEdit()
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentCreate" inherits="OptionsButtonTemplate">
						<Size x="105" y="25"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentEdit" relativePoint="RIGHT">
								<Offset x="1" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetText(Macaroon.Strings.CREATE_BUTTON)
							</OnLoad>
							<OnClick>
								Macaroon.StorageCreateButton()
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentDelete" inherits="OptionsButtonTemplate">
						<Size x="105" y="25"/>
						<Anchors>
							<Anchor point="LEFT" relativeTo="$parentCreate" relativePoint="RIGHT">
								<Offset x="1" y="0"/>
							</Anchor>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:SetText(Macaroon.Strings.DELETE_BUTTON)
							</OnLoad>
							<OnClick>
								Macaroon.StorageDeleteButton()
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(0.5, 0.5, 0.5)
						self:SetBackdropColor(0,0,0,0.7)
						self:SetFrameLevel(self:GetParent():GetFrameLevel())
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self.name = "Stored Buttons"
				self.parent = "Macaroon"
				self:RegisterEvent("ADDON_LOADED")
				self:RegisterEvent("PLAYER_LOGIN")
				self.config = Macaroon.GetBarDefaults()
				self.handler = self
				self.homestate = {}
				self.btnType = "MacaroonButton"
				self.hasAction = "Interface\\Buttons\\UI-Quickslot2"
				self.noAction = "Interface\\Buttons\\UI-Quickslot"

				self.ButtonBorder = _G[self:GetName().."ButtonBorder"]
				self.OptionsBorder = _G[self:GetName().."OptionsBorder"]
			</OnLoad>
			<OnEvent>
                       		if (... == "Macaroon") then
					InterfaceOptions_AddCategory(self)
				elseif (event == "PLAYER_LOGIN") then
					Macaroon.ButtonStorage_BuildOptions(self)
				end
			</OnEvent>
			<OnShow>
				Macaroon.UpdateButtonStorage()
				self.origW = InterfaceOptionsFrame:GetWidth()
				InterfaceOptionsFrame:SetWidth(648)
			</OnShow>
			<OnHide>
				InterfaceOptionsFrame:SetWidth(self.origW)
			</OnHide>
		</Scripts>
	</Frame>

	<Frame name="MacaroonProfileManager" hidden="true" parent="InterfaceOptionsFramePanelContainer">
		<Frames>
			<Frame name="$parentHeader">
				<Size x="225" y="75"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="InterfaceOptionsFrame" relativePoint="TOP">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="80"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="24"/>
					</EdgeSize>
				</Backdrop>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentTexture" file="Interface\AddOns\Macaroon\Images\macaroon_logo_full.tga">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="5" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-5" y="-5"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetBackdropColor(0.5,0.5,0.5,1)
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self.name = "Profiles"
				self.parent = "Macaroon"
				self:RegisterEvent("ADDON_LOADED")
				self:Hide()
			</OnLoad>
			<OnEvent>
                                if (... == "Macaroon") then
				    InterfaceOptions_AddCategory(self)
                                end
			</OnEvent>
			<OnShow>
				if (not IsAddOnLoaded("MacaroonProfiles")) then
					LoadAddOn("MacaroonProfiles")
				end
				self.origW = InterfaceOptionsFrame:GetWidth()
				InterfaceOptionsFrame:SetWidth(648)
			</OnShow>
			<OnHide>
				InterfaceOptionsFrame:SetWidth(self.origW)
			</OnHide>
		</Scripts>
	</Frame>

	<!--
	<Frame name="MacaroonInfoManager" hidden="true" parent="InterfaceOptionsFramePanelContainer">
		<Frames>
			<Frame name="$parentHeader">
				<Size x="225" y="75"/>
				<Anchors>
					<Anchor point="CENTER" relativeTo="InterfaceOptionsFrame" relativePoint="TOP">
						<Offset x="0" y="0"/>
					</Anchor>
				</Anchors>
				<Backdrop bgFile="Interface\ItemTextFrame\ItemText-Stone-TopLeft" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="80"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="24"/>
					</EdgeSize>
				</Backdrop>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentTexture" file="Interface\AddOns\Macaroon\Images\macaroon_logo_full.tga">
							<Anchors>
								<Anchor point="TOPLEFT">
									<Offset x="5" y="0"/>
								</Anchor>
								<Anchor point="BOTTOMRIGHT">
									<Offset x="-5" y="-5"/>
								</Anchor>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnLoad>
						self:SetBackdropColor(0.5,0.5,0.5,1)
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self.name = "Information"
				self.parent = "Macaroon"
				self:RegisterEvent("ADDON_LOADED")
				self:Hide()
			</OnLoad>
			<OnEvent>
                                if (... == "Macaroon") then
				    InterfaceOptions_AddCategory(self)
                                end
			</OnEvent>
			<OnShow>
				if (not IsAddOnLoaded("MacaroonInfo")) then
					LoadAddOn("MacaroonInfo")
				end
				self.origW = InterfaceOptionsFrame:GetWidth()
				InterfaceOptionsFrame:SetWidth(648)
			</OnShow>
			<OnHide>
				InterfaceOptionsFrame:SetWidth(self.origW)
			</OnHide>
		</Scripts>
	</Frame>
	-->

	<MessageFrame name="MacaroonMessageFrame" displayDuration="5" insertMode="TOP" parent="UIParent" frameStrata="HIGH" hidden="false">
		<Size x="512" y="60"/>
		<Anchors>
			<Anchor point="TOP">
				<Offset x="0" y="-100"/>
			</Anchor>
		</Anchors>
		<FontString inherits="ErrorFont" justifyH="CENTER"/>
	</MessageFrame>
</Ui>
