<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="GlueDropDownMenuButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="128" y="16"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentCheck" file="Interface\Common\UI-DropDownRadioChecks">
					<Size x="16" y="16"/>
					<Anchors>
						<Anchor point="LEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.5" top="0.5" bottom="1.0"/>
				</Texture>
				<Texture name="$parentUnCheck" file="Interface\Common\UI-DropDownRadioChecks">
					<Size x="16" y="16"/>
					<Anchors>
						<Anchor point="LEFT"/>
					</Anchors>
					<TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/>
				</Texture>
				<Texture name="$parentIcon" hidden="true">
					<Size>
						<AbsDimension x="16" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT">
							<Offset x="0" y="0"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentColorSwatch" hidden="true">
				<Size>
					<AbsDimension x="16" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Layers>
					<Layer level="BACKGROUND">
						<Texture name="$parentSwatchBg">
							<Size>
								<AbsDimension x="14" y="14"/>
							</Size>
							<Anchors>
								<Anchor point="CENTER">
									<Offset>
										<AbsDimension x="0" y="0"/>
									</Offset>
								</Anchor>
							</Anchors>
							<Color r="1.0" g="1.0" b="1.0"/>
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						CloseMenus();
						GlueDropDownMenuButton_OpenColorPicker(self, self:GetParent());
					</OnClick>
					<OnEnter>
						CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
						_G[self:GetName().."SwatchBg"]:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
						GlueDropDownMenu_StopCounting(self:GetParent():GetParent());
					</OnEnter>
					<OnLeave>
						_G[self:GetName().."SwatchBg"]:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
						GlueDropDownMenu_StartCounting(self:GetParent():GetParent());
					</OnLeave>
				</Scripts>
				<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
			</Button>
			<Button name="$parentExpandArrow" hidden="true">
				<Size>
					<AbsDimension x="16" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-6" y="0"/>
						</Offset>
					</Anchor>                   
				</Anchors>
				<Scripts>
					<OnClick>
						ToggleDropDownMenu(self, self:GetParent():GetParent():GetID() + 1, self:GetParent().value);
					</OnClick>
					<OnEnter>
						ToggleDropDownMenu(self, self:GetParent():GetParent():GetID() + 1, self:GetParent().value);
						GlueDropDownMenu_StopCounting(self:GetParent():GetParent());
					</OnEnter>
					<OnLeave>
						GlueDropDownMenu_StartCounting(self:GetParent():GetParent());
					</OnLeave>
				</Scripts>
				<NormalTexture file="Interface\ChatFrame\ChatFrameExpandArrow"/>
			</Button>
			<Button name="$parentInvisibleButton" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT"/>
					<Anchor point="BOTTOMLEFT"/>
					<Anchor point="RIGHT" relativeTo="$parentColorSwatch" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						GlueDropDownMenu_StopCounting(self:GetParent():GetParent());
						CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
					</OnEnter>
					<OnLeave>
						GlueDropDownMenu_StartCounting(self:GetParent():GetParent());
					</OnLeave>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnClick>
				GlueDropDownMenuButton_OnClick(self);
			</OnClick>
			<OnEnter>
				if ( self.hasArrow ) then
					ToggleDropDownMenu(self, self:GetParent():GetID() + 1, self.value);
				else
					CloseDropDownMenus(self:GetParent():GetID() + 1);
				end
				_G[self:GetName().."Highlight"]:Show();
				GlueDropDownMenu_StopCounting(self:GetParent());
				if ( self.tooltipTitle ) then
					GlueTooltip:SetOwner(self, "ANCHOR_RIGHT");
					GlueTooltip:AddLine(self.tooltipTitle, 1.0, 1.0, 1.0);
					GlueTooltip:AddLine(self.tooltipText, nil, nil, nil, 1, 1);
					GlueTooltip:Show();
				end
			</OnEnter>
			<OnLeave>
				_G[self:GetName().."Highlight"]:Hide();
				GlueDropDownMenu_StartCounting(self:GetParent());
				GlueTooltip:Hide();
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentNormalText"/>
		<NormalFont style="GlueFontHighlightSmallLeft"/>
		<HighlightFont style="GlueFontHighlightSmallLeft"/>
		<DisabledFont style="GlueFontDisableSmallLeft"/>
	</Button>
	<Button name="UIDropDownListTemplate" frameStrata="DIALOG" enableMouse="true" virtual="true">
		<Frames>
			<Frame name="$parentBackdrop" setAllPoints="true">
				<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
					<BackgroundInsets>
						<AbsInset left="11" right="12" top="12" bottom="11"/>
					</BackgroundInsets>
					<TileSize>
						<AbsValue val="32"/>
					</TileSize>
					<EdgeSize>
						<AbsValue val="32"/>
					</EdgeSize>
				</Backdrop>
			</Frame>
			<Frame name="$parentMenuBackdrop" setAllPoints="true">
				<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(1,1,1);
						self:SetBackdropColor(0.9, 0.9, 0.9);
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Scripts>
			<OnLoad>
				self.maxButtons = 0;
			</OnLoad>
			<OnClick>
				self:Hide();
			</OnClick>
			<OnEnter>
				GlueDropDownMenu_StopCounting(self);
			</OnEnter>
			<OnLeave>
				GlueDropDownMenu_StartCounting(self);
			</OnLeave>
			<OnUpdate>
				GlueDropDownMenu_OnUpdate(self, elapsed);
			</OnUpdate>
			<OnShow>
				for i=1, self.maxButtons do
					if (not self.noResize) then
						_G[self:GetName().."Button"..i]:SetWidth(self.maxWidth);
					end
				end
				if (not self.noResize) then
					self:SetWidth(self.maxWidth+15);
				end
				self.showTime = nil;
				if ( self:GetID() > 1 ) then
					self.parent = _G["DropDownList"..(self:GetID() - 1)];
				end
			</OnShow>
		</Scripts>
	</Button>
	<Frame name="GlueDropDownMenuTemplate" virtual="true">
		<Size>
			<AbsDimension x="40" y="32"/>
		</Size>
		<Layers>
			<Layer level="ARTWORK">
				<Texture name="$parentLeft" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
					<Size>
						<AbsDimension x="25" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="0" y="17"/>
							</Offset>
						</Anchor>
					</Anchors>
					<TexCoords left="0" right="0.1953125" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
					<Size>
						<AbsDimension x="115" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
				</Texture>
				<Texture name="$parentRight" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
					<Size>
						<AbsDimension x="25" y="64"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.8046875" right="1" top="0" bottom="1"/>
				</Texture>
				<FontString name="$parentText" inherits="GlueFontHighlightSmall" justifyH="RIGHT">
					<Size>
						<AbsDimension x="0" y="10"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parentRight">
							<Offset>
								<AbsDimension x="-43" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
				<Texture name="$parentIcon" hidden="true">
					<Size>
						<AbsDimension x="16" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT">
							<Offset x="30" y="2"/>
						</Anchor>
					</Anchors>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentButton" motionScriptsWhileDisabled="true" >
				<Size>
					<AbsDimension x="24" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentRight">
						<Offset>
							<AbsDimension x="-16" y="-18"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnEnter>
						local parent = self:GetParent();
						local myscript = parent:GetScript("OnEnter");
						if(myscript ~= nil) then
							myscript(parent);
						end
					</OnEnter>
					<OnLeave>
						local parent = self:GetParent();
						local myscript = parent:GetScript("OnLeave");
						if(myscript ~= nil) then
							myscript(parent);
						end
					</OnLeave>
					<OnClick>
						ToggleDropDownMenu(self);
						PlaySound("igMainMenuOptionCheckBoxOn");
					</OnClick>
				</Scripts>
				<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
					<Size>
						<AbsDimension x="24" y="24"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT"/>
					</Anchors>
				</NormalTexture>
				<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
					<Size>
						<AbsDimension x="24" y="24"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT"/>
					</Anchors>
				</PushedTexture>
				<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
					<Size>
						<AbsDimension x="24" y="24"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT"/>
					</Anchors>
				</DisabledTexture>
				<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
					<Size>
						<AbsDimension x="24" y="24"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT"/>
					</Anchors>
				</HighlightTexture>
			</Button>
		</Frames>
		<Scripts>
			<OnHide>
				CloseDropDownMenus();
			</OnHide>
		</Scripts>
	</Frame>
</Ui>