<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<Script file="BonusActionBarFrame.lua"/>
	<CheckButton name="BonusActionButtonTemplate" inherits="ActionBarButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="36" y="36"/>
		</Size>
		<Scripts>
			<OnLoad>
				self.isBonus = 1;
				ActionButton_OnLoad(self);
				self:RegisterEvent("UPDATE_BONUS_ACTIONBAR");
				self:SetFrameLevel(self:GetFrameLevel() + 2);
				local cooldown = getglobal(self:GetName().."Cooldown");
				cooldown:SetFrameLevel(cooldown:GetFrameLevel() + 2);
			</OnLoad>
		</Scripts>
	</CheckButton>
	<CheckButton name="ShapeshiftButtonTemplate" inherits="SecureFrameTemplate, ActionButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Scripts>
			<OnClick>
				self:SetChecked(not self:GetChecked());
				ShapeshiftBar_ChangeForm(self:GetID());
			</OnClick>
			<OnEnter>
				if GetCVar("UberTooltips") == "1" then
					GameTooltip_SetDefaultAnchor(GameTooltip, self);
				else
					GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
				end
				GameTooltip:SetShapeshift(self:GetID());
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</CheckButton>
	<CheckButton name="PossessButtonTemplate" inherits="SecureFrameTemplate, ActionButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="30" y="30"/>
		</Size>
		<Scripts>
			<OnClick>
				PossessButton_OnClick(self);
			</OnClick>
			<OnEnter>
				PossessButton_OnEnter(self);
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide();
			</OnLeave>
		</Scripts>
	</CheckButton>

  <Frame name="BonusActionBarFrame" frameStrata="HIGH" parent="MainMenuBar" enableMouse="true" toplevel="true" hidden="true">
		<Size>
			<AbsDimension x="505" y="43"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
				<Offset>
					<AbsDimension x="40" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<Texture name="BonusActionBarTexture0" file="Interface\MainMenuBar\UI-MainMenuBar-Dwarf">
					<Size x="252" y="43"/>
					<Anchors>
						<Anchor point="TOPLEFT"/>
					</Anchors>
					<TexCoords left="0.015625" right="1.0" top="0.83203125" bottom="1.0"/>
				</Texture>
				<Texture name="BonusActionBarTexture1" file="Interface\MainMenuBar\UI-MainMenuBar-Dwarf">
					<Size x="253" y="43"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="BonusActionBarTexture0" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0" right="0.98828125" top="0.58203125" bottom="0.75"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<CheckButton name="BonusActionButton1" inherits="BonusActionButtonTemplate" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="5" y="4"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton2" inherits="BonusActionButtonTemplate" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton3" inherits="BonusActionButtonTemplate" id="3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton4" inherits="BonusActionButtonTemplate" id="4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton5" inherits="BonusActionButtonTemplate" id="5">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton4" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton6" inherits="BonusActionButtonTemplate" id="6">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton5" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton7" inherits="BonusActionButtonTemplate" id="7">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton6" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton8" inherits="BonusActionButtonTemplate" id="8">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton7" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton9" inherits="BonusActionButtonTemplate" id="9">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton8" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton10" inherits="BonusActionButtonTemplate" id="10">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton9" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton11" inherits="BonusActionButtonTemplate" id="11">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton10" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="BonusActionButton12" inherits="BonusActionButtonTemplate" id="12">
				<Anchors>
					<Anchor point="LEFT" relativeTo="BonusActionButton11" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				BonusActionBar_OnLoad(self);
			</OnLoad>
			<OnEvent>
				BonusActionBar_OnEvent(self, event, ...);
			</OnEvent>
			<OnUpdate>
				BonusActionBar_OnUpdate(self, elapsed);
			</OnUpdate>
		</Scripts>
	</Frame>
	<Frame name="ShapeshiftBarFrame" parent="MainMenuBar" enableMouse="true" hidden="true">
		<Size>
			<AbsDimension x="29" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOMLEFT" relativeTo="MainMenuBar" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="30" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="ShapeshiftBarLeft" file="Interface\ShapeshiftBar\ShapeshiftBar">
					<Size x="47" y="38"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.734375" top="0" bottom="0.296875"/>
				</Texture>
				<Texture name="ShapeshiftBarMiddle" file="Interface\ShapeshiftBar\ShapeshiftBarMiddle">
					<Size x="37" y="38"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="ShapeshiftBarLeft" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0" right="2" top="0" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">		
				<Texture name="ShapeshiftBarRight" file="Interface\ShapeshiftBar\ShapeshiftBar">
					<Size x="43" y="38"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="ShapeshiftBarMiddle" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.328125" right="1" top="0.3125" bottom="0.6015625"/>
				</Texture>				
			</Layer>
		</Layers>
		<Frames>
			<CheckButton name="ShapeshiftButton1" inherits="ShapeshiftButtonTemplate" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="10" y="3"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton2" inherits="ShapeshiftButtonTemplate" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="8" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton3" inherits="ShapeshiftButtonTemplate" id="3">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton2" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton4" inherits="ShapeshiftButtonTemplate" id="4">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton3" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton5" inherits="ShapeshiftButtonTemplate" id="5">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton4" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton6" inherits="ShapeshiftButtonTemplate" id="6">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton5" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton7" inherits="ShapeshiftButtonTemplate" id="7">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton6" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton8" inherits="ShapeshiftButtonTemplate" id="8">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton7" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton9" inherits="ShapeshiftButtonTemplate" id="9">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton8" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="ShapeshiftButton10" inherits="ShapeshiftButtonTemplate" id="10">
				<Anchors>
					<Anchor point="LEFT" relativeTo="ShapeshiftButton9" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="7" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				ShapeshiftBar_OnLoad(self);
			</OnLoad>
			<OnEvent>
				ShapeshiftBar_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				UIParent_ManageFramePositions();
			</OnShow>
			<OnHide>
				UIParent_ManageFramePositions();
			</OnHide>
		</Scripts>
	</Frame>
	<Frame name="PossessBarFrame" parent="MainMenuBar" enableMouse="true" hidden="true">
		<Size>
			<AbsDimension x="29" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="BOTTOMLEFT" relativeTo="MainMenuBar" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="30" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="PossessBackground1" file="Interface\ShapeshiftBar\ShapeshiftBar">
					<Size x="47" y="38"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT"/>
					</Anchors>
					<TexCoords left="0" right="0.734375" top="0" bottom="0.296875"/>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="PossessBackground2" file="Interface\ShapeshiftBar\ShapeshiftBar">
					<Size x="43" y="38"/>
					<Anchors>
						<Anchor point="LEFT" relativeTo="PossessBackground1" relativePoint="RIGHT"/>
					</Anchors>
					<TexCoords left="0.328125" right="1" top="0.3125" bottom="0.6015625"/>
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<CheckButton name="PossessButton1" inherits="PossessButtonTemplate" id="1">
				<Anchors>
					<Anchor point="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="10" y="3"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
			<CheckButton name="PossessButton2" inherits="PossessButtonTemplate" id="2">
				<Anchors>
					<Anchor point="LEFT" relativeTo="PossessButton1" relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="8" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				PossessBar_OnLoad(self);
			</OnLoad>
			<OnEvent>
				PossessBar_OnEvent(self, event, ...);
			</OnEvent>
			<OnShow>
				UIParent_ManageFramePositions();
			</OnShow>
			<OnHide>
				UIParent_ManageFramePositions();
			</OnHide>
		</Scripts>
	</Frame>
</Ui>
