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

	<Slider name="DBM_GUI_PanelScrollBarTemplate" virtual="true">
		<Size x="16" y="0"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentTrack" parentKey="trackBG">
					<Anchors>
						<Anchor point="TOPLEFT" x="0" y="17"/>
						<Anchor point="BOTTOMRIGHT" x="0" y="-17"/>
					</Anchors>
					<Color r="0" g="0" b="0" a="0.4"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentScrollUpButton" inherits="UIPanelScrollUpButtonTemplate">
				<Anchors>
					<Anchor point="TOP" x="0" y="15"/>
				</Anchors>
				<Scripts>
					<OnClick>
						if self:GetName():find("DBM_GUI_DropDown") then
							DBM_GUI_DropDown:OnMouseWheel(1)
						else
							local parent = self:GetParent();
							parent:SetValue(parent:GetValue() - (parent:GetHeight() / 2));
						end
						PlaySound(1115);
					</OnClick>
				</Scripts>
			</Button>
			<Button name="$parentScrollDownButton" inherits="UIPanelScrollDownButtonTemplate">
				<Anchors>
					<Anchor point="BOTTOM" x="0" y="-15"/>
				</Anchors>
				<Scripts>
					<OnClick>
						if self:GetName():find("DBM_GUI_DropDown") then
							DBM_GUI_DropDown:OnMouseWheel(-1)
						else
							local parent = self:GetParent();
							parent:SetValue(parent:GetValue() + (parent:GetHeight() / 2));
						end
						PlaySound(1115);
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnValueChanged>
				self:GetParent():SetVerticalScroll(value);
				local min, max = self:GetMinMaxValues()
				if value == min then
					_G[self:GetName().."ScrollUpButton"]:Disable()
				else
					_G[self:GetName().."ScrollUpButton"]:Enable()
				end
				if value == max then
					_G[self:GetName().."ScrollDownButton"]:Disable()
				else
					_G[self:GetName().."ScrollDownButton"]:Enable()
				end
			</OnValueChanged>
		</Scripts>
		<ThumbTexture name="$parentThumbTexture" inherits="UIPanelScrollBarButton" file="Interface\Buttons\UI-ScrollBar-Knob">
			<Size x="18" y="24"/>
			<TexCoords left="0.20" right="0.80" top="0.125" bottom="0.875"/>
		</ThumbTexture>
	</Slider>

	<Frame name="DBM_GUI_DropDownMenu" virtual="true">
		<Frames>
			<ScrollFrame name="$parentList" hidden="true">
				<Size x="24" y="0"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-11" y="-11"/>
					<Anchor point="BOTTOMRIGHT" x="-11" y="11"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetBackdropBorderColor(.6, .6, .6, .6)
						_G[self:GetName().."ScrollBarScrollUpButton"]:Disable()
						local scrollbar = _G[self:GetName().."ScrollBar"]
						scrollbar:SetMinMaxValues(0, 11)
						scrollbar:SetValue(0)
					</OnLoad>
					<OnVerticalScroll>
						_G[self:GetName().."ScrollBar"]:SetValue(offset)
						DBM_GUI_DropDown.offset = floor(offset)
						DBM_GUI_DropDown:Refresh()
					</OnVerticalScroll>
				</Scripts>
				<Frames>
					<Slider name="$parentScrollBar" inherits="DBM_GUI_PanelScrollBarTemplate">
						<Anchors>
							<Anchor point="TOPRIGHT" x="0" y="-17"/>
							<Anchor point="BOTTOMRIGHT" x="0" y="17"/>
						</Anchors>
					</Slider>
					<Frame name="$parentScrollChildFrame" hidden="true"/>
				</Frames>
			</ScrollFrame>
		</Frames>
	</Frame>

	<Frame name="DBM_GUI_DropDownMenuTemplate" virtual="true">
		<Size>
			<AbsDimension x="160" 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="155" 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="GameFontHighlightSmall" justifyH="RIGHT">
					<Size>
						<AbsDimension x="0" y="10"/>
					</Size>
					<Anchors>
						<Anchor point="LEFT" relativeTo="$parentLeft">
							<Offset>
								<AbsDimension x="30" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentButton">
				<Size>
					<AbsDimension x="24" y="24"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parentRight">
						<Offset>
							<AbsDimension x="-16" y="-18"/>
						</Offset>
					</Anchor>
				</Anchors>
				<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>
	</Frame>

	<Button name="DBM_GUI_DropDownMenuButtonTemplate" virtual="true">
		<Size x="100" y="16"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
				<NormalTexture name="$parentNormalTexture"/>
			</Layer>
		</Layers>
		<Scripts>
			<OnClick>
				self:OnClick()
			</OnClick>
			<OnEnter>
				_G[self:GetName().."Highlight"]:Show();
			</OnEnter>
			<OnLeave>
				_G[self:GetName().."Highlight"]:Hide();
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentNormalText">
			<Anchors>
				<Anchor point="LEFT">
					<Offset x="5" y="0"/>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalFont style="GameFontHighlightSmallLeft"/>
		<HighlightFont style="GameFontHighlightSmallLeft"/>
		<DisabledFont style="GameFontDisableSmallLeft"/>
	</Button>
</Ui>
