<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">
    <Script file="SoundtrackFrame.lua"/>

    <!-- Templates -->
    <!-- Event list item -->
    <!--
    <Button name="SoundtrackFrameEventButtonTemplate" virtual="true">
        <Size>
            <AbsDimension x="165" y="16"/>
        </Size>
        <Layers>
            <Layer level="ARTWORK">
                <Texture name="$parentIcon" file="Interface\AddOns\Soundtrack\PlayingIcon">
                    <Size>
                        <AbsDimension x="32" y="16"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="-4" y="0"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame name="$parentButtonText" setAllPoints="true">
                <Layers>
                    <Layer level="BORDER">
                        <FontString justifyH="LEFT" name="$parentName" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="150" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="10" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentAssigned" inherits="GameFontHighlightSmall" text="(1)">
                            <Anchors>
                                <Anchor point="TOPRIGHT">
                                    <Offset>
                                        <AbsDimension x="0" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
        </Frames>
        <Scripts>
            <OnLoad>
                this:RegisterForClicks("LeftButtonUp","RightButtonUp");
            </OnLoad>
            <OnClick>
                SoundtrackFrameEventButton_OnClick(arg1);
            </OnClick>
        </Scripts>
        <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
    </Button>-->

    <Button name="SoundtrackFrameEventButtonTemplate" inherits="ClassTrainerSkillButtonTemplate" hidden="false" virtual="true">
		<Size>
            <AbsDimension x="165" y="16"/>
        </Size>
        <Layers>
            <Layer level="ARTWORK">
                <Texture name="$parentIcon" file="Interface\AddOns\Soundtrack\PlayingIcon">
                    <Size>
                        <AbsDimension x="32" y="16"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="-4" y="0"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
		
		<Frames>
            <Frame name="$parentButtonText" setAllPoints="true">
                <Layers>
                    <Layer level="BORDER">
                        <FontString name="$parentAssigned" inherits="GameFontHighlightSmall" text="(1)">
                            <Anchors>
                                <Anchor point="TOPRIGHT">
                                    <Offset>
                                        <AbsDimension x="0" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
        </Frames>
		
		<Scripts>
		    <OnLoad>
                this:RegisterForClicks("LeftButtonUp","RightButtonUp");
            </OnLoad>
			<OnClick>
				SoundtrackFrameEventButton_OnClick(arg1);
			</OnClick>
		</Scripts>
	</Button>

    <!-- Track list item -->
    <Button name="SoundtrackFrameTrackButtonTemplate" virtual="true">
        <Size>
            <AbsDimension x="525" y="16"/>
        </Size>
        <Layers>
            <Layer level="ARTWORK">
                <Texture name="$parentIcon" file="Interface\AddOns\Soundtrack\PlayingIcon">
                    <Size>
                        <AbsDimension x="32" y="16"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT"/>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame name="$parentButtonText" setAllPoints="true">
                <Layers>
                    <Layer level="BORDER">
                        <FontString name="$parentName" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="200" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="31" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentArtist" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="100" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="231" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentAlbum" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="175" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="331" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentDuration" inherits="GameFontHighlightSmall" text="0:00">
                            <Size>
                                <AbsDimension x="40" y="10" />
                            </Size>
                            <Anchors>
                                <Anchor point="TOPRIGHT">
                                    <Offset>
                                        <AbsDimension x="0" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <CheckButton name="$parentCheckBox" inherits="OptionsCheckButtonTemplate">
                <Size>
                    <AbsDimension x="16" y="16" />
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT">
                        <Offset>
                            <AbsDimension x="16" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        SoundtrackFrameTrackCheckBox_OnClick(arg1);
                    </OnClick>
                </Scripts>
            </CheckButton>
        </Frames>
        <Scripts>
            <OnLoad>
                this:RegisterForClicks("LeftButtonUp","RightButtonUp");
            </OnLoad>
            <OnClick>
                SoundtrackFrameTrackButton_OnClick(arg1);
            </OnClick>
        </Scripts>
        <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
    </Button>
    
    <Button name="SoundtrackFrameAssignedTrackButtonTemplate" virtual="true">
        <Size>
            <AbsDimension x="525" y="16"/>
        </Size>
        <Layers>
            <Layer level="ARTWORK">
                <Texture name="$parentIcon" file="Interface\AddOns\Soundtrack\PlayingIcon">
                    <Size>
                        <AbsDimension x="32" y="16"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT"/>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame name="$parentButtonText" setAllPoints="true">
                <Layers>
                    <Layer level="BORDER">
                        <FontString name="$parentName" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="200" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="31" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentArtist" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="100" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="231" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentAlbum" justifyH="LEFT" inherits="GameFontHighlightSmall">
                            <Size>
                                <AbsDimension x="175" y="10"/>
                            </Size>
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="331" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="$parentDuration" inherits="GameFontHighlightSmall" text="0:00">
                            <Anchors>
                                <Anchor point="TOPRIGHT">
                                    <Offset>
                                        <AbsDimension x="0" y="-3"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <CheckButton name="$parentCheckBox" inherits="OptionsCheckButtonTemplate">
                <Size>
                    <AbsDimension x="16" y="16" />
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT">
                        <Offset>
                            <AbsDimension x="16" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        SoundtrackFrameAssignedTrackCheckBox_OnClick(arg1);
                    </OnClick>
                </Scripts>
            </CheckButton>
        </Frames>
        <Scripts>
            <OnLoad>
                this:RegisterForClicks("LeftButtonUp","RightButtonUp");
            </OnLoad>
            <OnClick>
                SoundtrackFrameAssignedTrackButton_OnClick(arg1);
            </OnClick>
        </Scripts>
        <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
    </Button>

    <Button name="SoundtrackFrameColumnHeaderTemplate" virtual="true">
        <Layers>
            <!--Layer level="BACKGROUND">
                <Texture name="$parentLeft" file="Interface\FriendsFrame\WhoFrame-ColumnTabs">
                    <Size>
                        <AbsDimension x="5" y="24"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT"/>
                    </Anchors>
                    <TexCoords left="0" right="0.078125" top="0" bottom="0.75"/>
                </Texture>
                <Texture name="$parentMiddle" file="Interface\FriendsFrame\WhoFrame-ColumnTabs">
                    <Size>
                        <AbsDimension x="53" y="24"/>
                    </Size>
                    <Anchors>
                        <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
                    </Anchors>
                    <TexCoords left="0.078125" right="0.90625" top="0" bottom="0.75"/>
                </Texture>
                <Texture name="$parentRight" file="Interface\FriendsFrame\WhoFrame-ColumnTabs">
                    <Size>
                        <AbsDimension x="4" y="24"/>
                    </Size>
                    <Anchors>
                        <Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
                    </Anchors>
                    <TexCoords left="0.90625" right="0.96875" top="0" bottom="0.75"/>
                </Texture>
            </Layer-->
        </Layers>
        <Scripts>
            <OnClick>
                Soundtrack.Util.DebugPrint("Column header clicked!")
                if ( this.sortType ) then
                    Soundtrack.SortTracks(this.sortType);
                end
                --PlaySound("igMainMenuOptionCheckBoxOn");
            </OnClick>
        </Scripts>
        <ButtonText>
            <Anchors>
                <Anchor point="LEFT">
                    <Offset>
                        <AbsDimension x="8" y="0"/>
                    </Offset>
                </Anchor>
            </Anchors>
        </ButtonText>
        <NormalFont inherits="GameFontNormal"/>
        <HighlightTexture name="$parentHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD">
            <Size>
                <RelDimension x="1" y="1.2"/>
            </Size>
        </HighlightTexture>
    </Button>

    <Button name="SoundtrackFrameColumnHeaderTemplate2" virtual="true">
        <Scripts>
            <OnClick>

            </OnClick>
        </Scripts>
        <ButtonText>
            <Anchors>
                <Anchor point="LEFT">
                    <Offset>
                        <AbsDimension x="8" y="0"/>
                    </Offset>
                </Anchor>
            </Anchors>
        </ButtonText>
        <NormalFont inherits="GameFontNormal"/>
        <HighlightTexture name="$parentHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD">
            <Size>
                <RelDimension x="1" y="1.2"/>
            </Size>
        </HighlightTexture>
    </Button>
    
    <!-- Tab button -->
    <Button name="SoundtrackFrameTabTemplate" inherits="CharacterFrameTabButtonTemplate" virtual="true">
        <Scripts>
            <OnClick>
                PanelTemplates_Tab_OnClick(self, SoundtrackFrame);
                SoundtrackFrameTab_OnClick();
            </OnClick>
        </Scripts>
    </Button>

    <EditBox name="SoundtrackFrame_EditBoxTemplate" historyLines="0" enableMouse="true" autoFocus="false" letters="256" virtual="true">
        <Size>
            <AbsDimension x="260" y="20"/>
        </Size>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture name="$parentLeft" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                    <Size>
                        <AbsDimension x="12" y="29"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="-11" y="2"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                    <TexCoords left="0" right="0.09375" top="0" bottom="1.0"/>
                </Texture>
                <Texture name="$parentRight" file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                    <Size>
                        <AbsDimension x="12" y="29"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPRIGHT">
                            <Offset>
                                <AbsDimension x="4" y="2"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                    <TexCoords left="0.90625" right="1.0" top="0" bottom="1.0"/>
                </Texture>
                <Texture file="Interface\ClassTrainerFrame\UI-ClassTrainer-FilterBorder">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentLeft" relativePoint="TOPRIGHT"/>
                        <Anchor point="BOTTOMRIGHT" relativeTo="$parentRight" relativePoint="BOTTOMLEFT"/>
                    </Anchors>
                    <TexCoords left="0.09375" right="0.90625" top="0" bottom="1.0"/>
                </Texture>
            </Layer>
        </Layers>
        <Scripts>
            <OnEnter>
                --ItemRack_Opt_OnEnter()
            </OnEnter>
            <OnLeave>
                GameTooltip:Hide()
            </OnLeave>
            <OnEscapePressed>
                this:ClearFocus()
            </OnEscapePressed>
            <OnEnterPressed>
                this:ClearFocus()
            </OnEnterPressed>
        </Scripts>
        <FontString inherits="GameFontHighlightSmall"/>
    </EditBox>

    <StatusBar name="SoundtrackFrame_StatusBarTemplate" virtual="true" drawLayer="BACKGROUND" minValue="0" maxValue="1" defaultValue="5">
        <Size>
            <AbsDimension x="233" y="15"/>
        </Size>
        <Layers>
            <Layer level="ARTWORK">
                <FontString name="$parentText1" inherits="GameFontNormalSmall" text="Event Name">
                    <Anchors>
                        <Anchor point="LEFT">
                            <Offset>
                                <AbsDimension x="6" y="1"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </FontString>
                <FontString name="$parentText2" inherits="GameFontHighlightSmall" text="1/8">
                    <Size>
                        <AbsDimension x="60" y="0"/>
                    </Size>
                    <Anchors>
                        <Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
                            
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
            <Layer level="BORDER">
                <Texture name="$parentFillBar">
                    <Size>
                        <AbsDimension x="0" y="15"/>
                    </Size>
                    <Color r="1.0" g="1.0" b="1.0" a="0.5"/>
                </Texture>
            </Layer>
            <Layer level="BACKGROUND">
                <Texture name="$parentBackground">
                    <Color r="0" g="0" b="0.1" a="1"/>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentBorder">
                <Size>
                    <AbsDimension x="243" y="32"/>
                </Size>
                <Anchors>
                    <Anchor point="LEFT">
                        <Offset>
                            <AbsDimension x="-5" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <HitRectInsets>
                    <AbsInset left="0" right="0" top="7" bottom="7"/>
                </HitRectInsets>
                <Scripts>
                    <OnClick>
                        SoundtrackFrame_StatusBar_OnClick(arg1)
                    </OnClick>
                </Scripts>
                <NormalTexture name="$parentNormal" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorder"/>
                <HighlightTexture name="$parentHighlight" file="Interface\PaperDollInfoFrame\UI-Character-Skills-BarBorderHighlight"/>
            </Button>
        </Frames>
        <BarTexture name="$parentBar" file="Interface\PaperDollInfoFrame\UI-Character-Skills-Bar"/>
        <BarColor r="0.25" g="0.25" b="0.75"/>
    </StatusBar>

    <Texture name="Soundtrack_PreviousTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0" right="0.14453125" top="0" bottom="0.359375"/>
    </Texture>
    <Texture name="Soundtrack_PreviousDisabledTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0" right="0.14453125" top="0.359375" bottom="0.71875"/>
    </Texture>
    <Texture name="Soundtrack_PlayTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.14453125" right="0.3125" top="0" bottom="0.35375"/>
    </Texture>
    <Texture name="Soundtrack_PauseTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.14453125" right="0.3125" top="0.359375" bottom="0.71875"/>
    </Texture>
    <Texture name="Soundtrack_NextTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.3125" right="0.45703125" top="0" bottom="0.35375"/>
    </Texture>
    <Texture name="Soundtrack_NextDisabledTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.3125" right="0.45703125" top="0.359375" bottom="0.71875"/>
    </Texture>
    <Texture name="Soundtrack_ShuffleTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.45703125" right="0.63671875" top="0" bottom="0.1796875"/>
    </Texture>
    <Texture name="Soundtrack_ShuffleDisabledTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.45703125" right="0.63671875" top="0.1796875" bottom="0.359375"/>
    </Texture>
    <Texture name="Soundtrack_LoopTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.45703125" right="0.63671875" top="0.359375" bottom="0.5390625"/>
    </Texture>
    <Texture name="Soundtrack_LoopDisabledTexture" file="Interface\AddOns\Soundtrack\Images\PlaybackControls" virtual="true">
        <TexCoords left="0.45703125" right="0.63671875" top="0.5390625" bottom="0.71875"/>
    </Texture>

    <Button name="Soundtrack_PreviousButton" virtual="true">
        <Size>
            <!--AbsDimension x="37" y="46"/-->
            <AbsDimension x="24" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_PreviousTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_PreviousTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    <Button name="Soundtrack_PreviousDisabledButton" virtual="true">
        <Size>
            <AbsDimension x="24" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_PreviousDisabledTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_PreviousDisabledTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    <Button name="Soundtrack_PlayButton" virtual="true">
        <Size>
            <!--AbsDimension x="43" y="46"/-->
            <AbsDimension x="28" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_PlayTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_PauseTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    <Button name="Soundtrack_StopButton" virtual="true">
        <Size>
            <AbsDimension x="28" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_PauseTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_PauseTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    <Button name="Soundtrack_NextButton" virtual="true">
        <Size>
            <AbsDimension x="24" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_NextTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_NextTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    <Button name="Soundtrack_NextDisabledButton" virtual="true">
        <Size>
            <AbsDimension x="24" y="30"/>
        </Size>
        <NormalTexture inherits="Soundtrack_NextDisabledTexture"/>
        <!--PushedTexture inherits="UIPanelButtonDownTexture"/-->
        <DisabledTexture inherits="Soundtrack_NextDisabledTexture"/>
        <!--HighlightTexture inherits="UIPanelButtonHighlightTexture"/-->
    </Button>
    
    <!--Main frame-->
    <Frame name="SoundtrackFrame" toplevel="true" parent="UIParent" movable="true" enableMouse="true" hidden="true">
        <Size>
            <AbsDimension x="800" y="600"/>
        </Size>
        <Anchors>
            <Anchor point="TOPLEFT">
                <Offset>
                    <AbsDimension x="0" y="-104"/>
                </Offset>
            </Anchor>
        </Anchors>
        <TitleRegion 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>

        <HitRectInsets>
            <AbsInset left="0" right="30" top="0" bottom="45"/>
        </HitRectInsets>
        <Layers>
            <Layer level="OVERLAY">
                <FontString name="$parentTitleText" inherits="GameFontNormal" text="Soundtrack">
                    <Anchors>
                        <Anchor point="TOP">
                            <Offset>
                                <AbsDimension x="0" y="-18"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>



            <Button name="SoundtrackFrame_CloseButton" inherits="UIPanelButtonTemplate" text="Close">
                <Size>
                    <AbsDimension x="100" y="22"/>
                </Size>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" relativeTo="SoundtrackFrame" relativePoint="BOTTOMRIGHT">
                        <Offset>
                            <AbsDimension x="-5" y="12"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnEnter>
                        Soundtrack.ShowTip("Close", "Closes Soundtrack's main window. If a track was being previewed it will be stopped, and the active events are resumed. If a playlist was started, it will continue to play.")
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide()
                    </OnLeave>
                    <OnClick>
                        SoundtrackFrame:Hide()
                    </OnClick>
                </Scripts>
            </Button>
            <Button name="SoundtrackFrame_TopCloseButton" inherits="UIPanelCloseButton">
                <Anchors>
                    <Anchor point="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-5" y="-5"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnEnter>
                        Soundtrack.ShowTip("Close", "Closes Soundtrack's main window. If a track was being previewed it will be stopped, and the active events are resumed. If a playlist was started, it will continue to play.")
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide()
                    </OnLeave>
                </Scripts>
            </Button>

            <!-- Tabs -->
            <Button name="SoundtrackFrameTab1" inherits="SoundtrackFrameTabTemplate" id="1" text="Battle">
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
                        <Offset>
                            <AbsDimension x="15" y="8"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab2" inherits="SoundtrackFrameTabTemplate" id="2" text="Bosses">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab1" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab3" inherits="SoundtrackFrameTabTemplate" id="3" text="Zones">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab2" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab4" inherits="SoundtrackFrameTabTemplate" id="4" text="Dances">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab3" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab5" inherits="SoundtrackFrameTabTemplate" id="5" text="Misc">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab4" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab6" inherits="SoundtrackFrameTabTemplate" id="6" text="Custom">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab5" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab7" inherits="SoundtrackFrameTabTemplate" id="7" text="Playlists">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab6" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>
            <Button name="SoundtrackFrameTab8" inherits="SoundtrackFrameTabTemplate" id="8" text="Options">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameTab7" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-8" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </Button>


            <StatusBar name="SoundtrackFrame_StatusBarEvent" inherits="SoundtrackFrame_StatusBarTemplate" minValue="0" maxValue="8" defaultValue="1" id="1">
                <Anchors>
                    <Anchor point="BOTTOMLEFT">
                        <Offset>
                            <AbsDimension x="13" y="10"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </StatusBar>
            <StatusBar name="SoundtrackFrame_StatusBarTrack" inherits="SoundtrackFrame_StatusBarTemplate" minValue="0" maxValue="244" defaultValue="23" id="2">
                <Anchors>
                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_StatusBarEvent" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="5" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </StatusBar>

            <Button name="SoundtrackFrame_PreviousButton" inherits="Soundtrack_PreviousButton" >
                <Size>
                    <AbsDimension x="12" y="15"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackFrame_StatusBarTrack">
                        <Offset>
                            <AbsDimension  x="5" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        Soundtrack.Events.PlaybackPrevious();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Previous Track", "Skips to the previous track in this event.")
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>
            <!--Button name="SoundtrackControlFrame_PreviousDisabledButton" inherits="Soundtrack_PreviousDisabledButton" >
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="SoundtrackControlFrame_PreviousButton"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        Soundtrack.Events.PlaybackPrevious();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Previous Track", "Skips to the previous track in this event.")
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button-->
            <Button name="SoundtrackFrame_PlayButton" inherits="Soundtrack_PlayButton">
                <Size>
                    <AbsDimension x="14" y="15"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackFrame_PreviousButton"/>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        SoundtrackFrame_RefreshPlaybackControls()
                    </OnLoad>
                    <OnClick>
                        Soundtrack.Events.PlaybackPlayStop();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Play/Stop", "Pauses all Soundtrack events or resumes the currently active one.");
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>
            <Button name="SoundtrackFrame_StopButton" inherits="Soundtrack_StopButton">
                <Size>
                    <AbsDimension x="14" y="15"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="SoundtrackFrame_PlayButton"/>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        SoundtrackFrame_RefreshPlaybackControls()
                    </OnLoad>
                    <OnClick>
                        Soundtrack.Events.PlaybackPlayStop();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Play/Stop", "Pauses all Soundtrack events or resumes the currently active one.");
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>
            <Button name="SoundtrackFrame_NextButton" inherits="Soundtrack_NextButton">
                <Size>
                    <AbsDimension x="12" y="15"/>
                </Size>
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackFrame_PlayButton"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        Soundtrack.Events.PlaybackNext();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Next Track", "Skips to the next track assigned to the currently active event.");
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>
            <!--Button name="SoundtrackControlFrame_NextDisabledButton" inherits="Soundtrack_NextDisabledButton">
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackControlFrame_NextButton"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        Soundtrack.Events.PlaybackNext();
                    </OnClick>
                    <OnEnter>
                        Soundtrack.ShowTip("Next Track", "Skips to the next track assigned to the currently active event.");
                    </OnEnter>
                    <OnLeave>
                        GameTooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button-->
            
            <Frame name="SoundtrackFrameEventFrame" setAllPoints="true">
                <Frames>
                    <!-- Event list -->
                    <Frame name="SoundtrackFrameEventList">
                        <Size>
                            <AbsDimension x="200" y="500"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame" relativePoint="TOPLEFT">
                                <Offset>
                                    <AbsDimension x="16" y="-40" />
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Backdrop bgFile="Interface/ChatFrame/ChatFrameBackground" edgeFile="Interface/Buttons/UI-SliderBar-Border" tile="true">
                            <BackgroundInsets>
                                <AbsInset left="3" right="3" top="6" bottom="6" />
                            </BackgroundInsets>
                            <TileSize>
                                <AbsValue val="16" />
                            </TileSize>
                            <EdgeSize>
                                <AbsValue val="9" />
                            </EdgeSize>
                        </Backdrop>
                        <Layers>
                            <Layer level="ARTWORK">
                                <FontString inherits="GameFontNormal" text="Events">
                                    <Anchors>
                                        <Anchor point="TOPLEFT">
                                            <Offset>
                                                <AbsDimension x="20" y="-10"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>
                            </Layer>
                        </Layers>
                        <Frames>
                            <ScrollFrame name="SoundtrackFrameEventScrollFrame" inherits="FauxScrollFrameTemplate">
                                <Anchors>
                                    <Anchor point="TOPLEFT">
                                        <Offset>
                                            <AbsDimension x="0" y="-7"/>
                                        </Offset>
                                    </Anchor>
                                    <Anchor point="BOTTOMRIGHT">
                                        <Offset>
                                            <AbsDimension x="-28" y="7" />
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Layers>
                                    <Layer level="ARTWORK">
                                        <Texture hidden="true" name="$parentScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                            <Size>
                                                <AbsDimension x="31" y="256"/>
                                            </Size>
                                            <TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
                                        </Texture>
                                        <Texture hidden="true" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                            <Size>
                                                <AbsDimension x="31" y="106"/>
                                            </Size>
                                            <TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
                                        </Texture>
                                    </Layer>
                                </Layers>
                                <Scripts>
                                    <OnVerticalScroll>
                                        FauxScrollFrame_OnVerticalScroll(self, offset, EVENTS_ITEM_HEIGHT, SoundtrackFrame_RefreshEvents);
                                    </OnVerticalScroll>
                                </Scripts>
                            </ScrollFrame>
                            <Button name="SoundtrackFrameEventButton1" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOPLEFT">
                                        <Offset>
                                            <AbsDimension x="10" y="-25"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton2" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton1" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton3" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton2" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton4" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton3" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton5" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton4" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton6" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton5" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton7" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton6" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton8" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton7" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton9" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton8" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton10" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton9" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton11" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton10" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton12" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton11" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton13" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton12" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton14" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton13" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton15" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton14" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton16" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton15" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton17" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton16" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton18" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton17" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton19" inherits="SoundtrackFrameEventButtonTemplate">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton18" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton20" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton19" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton21" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton20" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton22" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton21" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton23" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton22" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton24" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton23" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton25" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton24" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton26" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton25" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton27" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton26" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton28" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton27" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton29" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton28" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                            <Button name="SoundtrackFrameEventButton30" inherits="SoundtrackFrameEventButtonTemplate" hidden="true">
                                <Anchors>
                                    <Anchor point="TOP" relativeTo="SoundtrackFrameEventButton29" relativePoint="BOTTOM">
                                        <Offset>
                                            <AbsDimension x="0" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                            </Button>
                        </Frames>
                        <Scripts>
                            <OnLoad>this:SetBackdropColor(.1,.1,.1,0.7)</OnLoad>
                        </Scripts>
                    </Frame>
                    <Frame name="SoundtrackFrameEventMenu" inherits="UIDropDownMenuTemplate" id="1" hidden="false">
                        <Size>
                            <AbsDimension x="0" y="0"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameEventFrame" relativePoint="CENTER">
                                <Offset>
                                    <AbsDimension x="300" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                this:SetFrameLevel(0);
                                UIDropDownMenu_SetWidth(this, 180);
                            </OnLoad>
                            <OnShow>
                                UIDropDownMenu_Initialize(this, SoundtrackFrameEventMenu_Initialize, "MENU");
                            </OnShow>
                        </Scripts>
                    </Frame>
                    <Button name="SoundtrackFrameAddPlaylistButton" inherits="UIPanelButtonTemplate" text="Add Playlist">
                        <Size>
                            <AbsDimension x="100" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="SoundtrackFrameEventList">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameAddPlaylistButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Add Playlist", "Adds a new playlist. Playlists override all other events, so they never get interrupted by other events.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameDeletePlaylistButton" inherits="UIPanelButtonTemplate" text="Delete Playlist">
                        <Size>
                            <AbsDimension x="100" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="RIGHT" relativeTo="SoundtrackFrameAddPlaylistButton" relativePoint="LEFT">
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameDeletePlaylistButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Delete Playlist", "Removes the selected playlist.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>                    
                    <Button name="SoundtrackFrameAddZoneButton" inherits="UIPanelButtonTemplate" text="Add Zone">
                        <Size>
                            <AbsDimension x="100" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="SoundtrackFrameEventList">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameAddZoneButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                -- TODO: Color the option name?
                                Soundtrack.ShowTip("Add Zone", "Adds your current locations to the zone list so that you can assign tracks to them. This can be done automatically with the 'Automatically Add New Zones' option.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameAddTargetButton" inherits="UIPanelButtonTemplate" text="Add Target">
                        <Size>
                            <AbsDimension x="100" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="SoundtrackFrameEventList">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameAddTargetButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Add Target", "Adds the currently selected target mob to the list of boss events.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameDeleteTargetButton" inherits="UIPanelButtonTemplate" text="Delete">
                        <Size>
                            <AbsDimension x="60" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="RIGHT" relativeTo="SoundtrackFrameAddTargetButton" relativePoint="LEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameDeleteTargetButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Delete Target", "Deletes the selected target.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide()
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameAddCustomEventButton" inherits="UIPanelButtonTemplate" text="New">
                        <Size>
                            <AbsDimension x="60" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="SoundtrackFrameEventList">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameAddCustomEventButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Add Custom Event", "Creates a new custom event. Custom events are events that you can define yourself through a variety of methods including scripting.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameEditCustomEventButton" inherits="UIPanelButtonTemplate" text="Edit">
                        <Size>
                            <AbsDimension x="60" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="RIGHT" relativeTo="SoundtrackFrameAddCustomEventButton" relativePoint="LEFT">
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameEditCustomEventButton_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Edit Custom Event", "Switches to the custom event editing interface so you can adjust the selected custom event.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrameDeleteCustomEventButton" inherits="UIPanelButtonTemplate" text="Delete">
                        <Size>
                            <AbsDimension x="60" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="RIGHT" relativeTo="SoundtrackFrameEditCustomEventButton" relativePoint="LEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameDeleteCustomEventButton_OnClick();
                                getglobal("SoundtrackFrameRightPanelEditEvent"):Hide();
                                getglobal("SoundtrackFrameRightPanelTracks"):Show();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Delete Custom Event", "Deletes the selected custom event.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide()
                            </OnLeave>
                        </Scripts>
                    </Button>
                    

                    <Frame name="SoundtrackFrameRightPanelTracks">
                        <Frames>
                            <!-- Track list -->
                            <Frame name="SoundtrackFrameTrackList">
                                <Size>
                                    <AbsDimension x="560" y="360"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame" relativePoint="TOPLEFT">
                                        <Offset>
                                            <AbsDimension x="225" y="-40" />
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Backdrop bgFile="Interface/ChatFrame/ChatFrameBackground" edgeFile="Interface/Buttons/UI-SliderBar-Border" tile="true">
                                    <BackgroundInsets>
                                        <AbsInset left="3" right="3" top="6" bottom="6" />
                                    </BackgroundInsets>
                                    <TileSize>
                                        <AbsValue val="16" />
                                    </TileSize>
                                    <EdgeSize>
                                        <AbsValue val="9" />
                                    </EdgeSize>
                                </Backdrop>
                                <Layers>
                                    <Layer level="ARTWORK">
                                        <FontString inherits="GameFontNormal" text="Track Library">
                                            <Anchors>
                                                <Anchor point="TOPLEFT">
                                                    <Offset>
                                                        <AbsDimension x="20" y="-10"/>
                                                    </Offset>
                                                </Anchor>
                                            </Anchors>
                                        </FontString>
                                    </Layer>
                                </Layers>
                                <Frames>
                                    <EditBox name="SoundtrackFrame_TrackFilter" inherits="SoundtrackFrame_EditBoxTemplate">
                                        <Anchors>
                                            <Anchor point="TOPRIGHT" relativeTo="SoundtrackFrameTrackList" relativePoint="TOPRIGHT">
                                                <Offset>
                                                    <AbsDimension x="-5" y="-6"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Scripts>
                                            <OnTabPressed>
                                                --ItemRack_EventDelay:SetFocus()
                                            </OnTabPressed>
                                            <OnTextChanged>
                                                SoundtrackFrame_OnFilterChanged()
                                            </OnTextChanged>
                                            <OnEnter>
                                                Soundtrack.ShowTip("Track Filter", "Allows filtering of the tracks. The filter is compared against the track file names, paths, title, artist and album name. Clear the box to show the full list of tracks again.")
                                            </OnEnter>
                                            <OnLeave>
                                                GameTooltip:Hide()
                                            </OnLeave>
                                        </Scripts>
                                    </EditBox>
                                    <Button name="SoundtrackFrame_ColumnHeaderName" inherits="SoundtrackFrameColumnHeaderTemplate">
                                        <Size>
                                            <AbsDimension x="200" y="10"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="BOTTOMLEFT" relativeTo="SoundtrackFrameTrackList" relativePoint="TOPLEFT">
                                                <Offset>
                                                    <AbsDimension x="35" y="-35"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Frames>
                                            <Frame name="SoundtrackFrame_ColumnHeaderNameDropDown" inherits="UIDropDownMenuTemplate" id="1">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT">
                                                        <Offset>
                                                            <AbsDimension x="-15" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                                <Layers>
                                                    <Layer level="OVERLAY">
                                                        <Texture name="SoundtrackFrame_ColumnHeaderNameHighlightTexture" file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD" hidden="true">
                                                            <Anchors>
                                                                <Anchor point="TOPLEFT">
                                                                    <Offset>
                                                                        <AbsDimension x="15" y="3"/>
                                                                    </Offset>
                                                                </Anchor>
                                                                <Anchor point="BOTTOMRIGHT">
                                                                    <Offset>
                                                                        <AbsDimension x="-30" y="-2"/>
                                                                    </Offset>
                                                                </Anchor>
                                                            </Anchors>
                                                        </Texture>
                                                    </Layer>
                                                </Layers>
                                                <Scripts>
                                                    <OnLoad>
                                                      UIDropDownMenu_Initialize(this, SoundtrackFrame_ColumnHeaderNameDropDown_Initialize);
                                                      UIDropDownMenu_SetWidth(this, 80);
                                                      UIDropDownMenu_SetButtonWidth(this, 24);
                                                      UIDropDownMenu_JustifyText(this, "LEFT")
                                                    </OnLoad>
                                                    <OnShow>
                                                        UIDropDownMenu_Initialize(this, SoundtrackFrame_ColumnHeaderNameDropDown_Initialize);
                                                        UIDropDownMenu_SetSelectedID(SoundtrackFrame_ColumnHeaderNameDropDown, 1);
                                                    </OnShow>
                                                    <OnEvent>
                                                        --WhoFrameDropDown_OnEvent()
                                                    </OnEvent>
                                                    <OnEnter>
                                                        SoundtrackFrame_ColumnHeaderNameHighlightTexture:Show();
                                                    </OnEnter>
                                                    <OnLeave>
                                                        SoundtrackFrame_ColumnHeaderNameHighlightTexture:Hide();
                                                    </OnLeave>
                                                    <OnMouseUp>
                                                        Soundtrack.Util.DebugPrint("Column header clicked!")
                                                        SoundtrackFrame.nameHeaderType = SOUNDTRACKFRAME_COLUMNHEADERNAME_LIST[UIDropDownMenu_GetSelectedID(SoundtrackFrame_ColumnHeaderNameDropDown)].type
                                                        Soundtrack.SortTracks(SoundtrackFrame.nameHeaderType);
                                                    </OnMouseUp>
                                                </Scripts>
                                            </Frame>
                                        </Frames>
                                        <Scripts>
                                            <OnLoad>
                                                --WhoFrameColumn_SetWidth(105);
                                            </OnLoad>
                                        </Scripts>
                                    </Button>
                                    <Button name="SoundtrackFrameColumnHeaderArtist" inherits="SoundtrackFrameColumnHeaderTemplate" text="Artist">
                                        <Size>
                                            <AbsDimension x="100" y="25"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="LEFT" relativeTo="SoundtrackFrame_ColumnHeaderName" relativePoint="RIGHT">
                                                <Offset>
                                                    <AbsDimension x="0" y="-10"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Scripts>
                                            <OnLoad>
                                                this.sortType = "artist";
                                            </OnLoad>
                                        </Scripts>
                                    </Button>
                                    <Button name="SoundtrackFrameColumnHeaderAlbum" inherits="SoundtrackFrameColumnHeaderTemplate" text="Album">
                                        <Size>
                                            <AbsDimension x="175" y="25"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="LEFT" relativeTo="SoundtrackFrameColumnHeaderArtist" relativePoint="RIGHT"/>
                                        </Anchors>
                                        <Scripts>
                                            <OnLoad>
                                                this.sortType = "album";
                                            </OnLoad>
                                        </Scripts>
                                    </Button>

                                    <ScrollFrame name="SoundtrackFrameTrackScrollFrame" inherits="FauxScrollFrameTemplate">
                                        <Anchors>
                                            <Anchor point="TOPLEFT">
                                                <Offset>
                                                    <AbsDimension x="0" y="-27"/>
                                                </Offset>
                                            </Anchor>
                                            <Anchor point="BOTTOMRIGHT">
                                                <Offset>
                                                    <AbsDimension x="-28" y="7" />
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Layers>
                                            <Layer level="ARTWORK">
                                                <Texture hidden="true" name="$parentScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                                    <Size>
                                                        <AbsDimension x="31" y="256"/>
                                                    </Size>
                                                    <TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
                                                </Texture>
                                                <Texture hidden="true" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                                    <Size>
                                                        <AbsDimension x="31" y="106"/>
                                                    </Size>
                                                    <TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
                                                </Texture>
                                            </Layer>
                                        </Layers>
                                        <Scripts>
                                            <OnVerticalScroll>
                                                FauxScrollFrame_OnVerticalScroll(self, offset, EVENTS_ITEM_HEIGHT, SoundtrackFrame_RefreshTracks);
                                            </OnVerticalScroll>
                                        </Scripts>
                                    </ScrollFrame>
                                    <Button name="SoundtrackFrameTrackButton1" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="SoundtrackFrame_ColumnHeaderName">
                                                <Offset>
                                                    <AbsDimension x="-25" y="-15"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton2" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton1" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton3" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton2" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton4" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton3" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton5" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton4" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton6" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton5" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton7" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton6" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton8" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton7" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton9" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton8" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton10" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton9" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton11" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton10" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton12" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton11" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton13" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton12" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton14" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton13" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton15" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton14" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton16" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton15" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton17" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton16" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton18" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton17" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton19" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton18" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                    <Button name="SoundtrackFrameTrackButton20" inherits="SoundtrackFrameTrackButtonTemplate">
                                        <Anchors>
                                            <Anchor point="TOP" relativeTo="SoundtrackFrameTrackButton19" relativePoint="BOTTOM">
                                                <Offset>
                                                    <AbsDimension x="0" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                    </Button>
                                </Frames>
                                <Scripts>
                                    <OnLoad>this:SetBackdropColor(.1,.1,.1,0.7)</OnLoad>
                                </Scripts>
                            </Frame>
                            
                            <!-- Context menus -->
                            <Frame name="SoundtrackFrameTrackMenu" inherits="UIDropDownMenuTemplate" id="1" hidden="false">
                                <Size>
                                    <AbsDimension x="0" y="0"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrameEventFrame" relativePoint="CENTER">
                                        <Offset>
                                            <AbsDimension x="300" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnLoad>
                                        this:SetFrameLevel(0);
                                        UIDropDownMenu_SetWidth(this, 180);
                                    </OnLoad>
                                    <OnShow>
                                        UIDropDownMenu_Initialize(this, SoundtrackFrameTrackMenu_Initialize, "MENU");
                                    </OnShow>
                                </Scripts>
                            </Frame>


                            <Frame name="SoundtrackFrame_AssignedFrame">
                                <Size>
                                    <AbsDimension x="560" y="155"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame" relativePoint="TOPLEFT">
                                        <Offset>
                                            <AbsDimension x="225" y="-409" />
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Backdrop bgFile="Interface/ChatFrame/ChatFrameBackground" edgeFile="Interface/Buttons/UI-SliderBar-Border" tile="true">
                                    <BackgroundInsets>
                                        <AbsInset left="3" right="3" top="6" bottom="6" />
                                    </BackgroundInsets>
                                    <TileSize>
                                        <AbsValue val="16" />
                                    </TileSize>
                                    <EdgeSize>
                                        <AbsValue val="9" />
                                    </EdgeSize>
                                </Backdrop>
                                <Frames>
                                    <Button name="SoundtrackFrameColumnHeaderAssignedTracks" inherits="SoundtrackFrameColumnHeaderTemplate2" text="Assigned Tracks">
                                        <Size>
                                            <AbsDimension x="120" y="25"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_AssignedFrame" relativePoint="TOPLEFT">
                                                <Offset>
                                                    <AbsDimension x="15" y="0"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Scripts>
                                            <OnClick>
                                                SoundtrackFrame.showAssignedFrame = true
                                                SoundtrackFrame_OnSelectedEventTabChanged()
                                            </OnClick>
                                        </Scripts>
                                    </Button>
                                    <Button name="SoundtrackFrameColumnHeaderEventSettings" inherits="SoundtrackFrameColumnHeaderTemplate2" text="Event Settings">
                                        <Size>
                                            <AbsDimension x="120" y="25"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="LEFT" relativeTo="SoundtrackFrameColumnHeaderAssignedTracks" relativePoint="RIGHT"/>
                                        </Anchors>
                                        <Scripts>
                                            <OnClick>
                                                SoundtrackFrame.showAssignedFrame = false
                                                SoundtrackFrame_OnSelectedEventTabChanged()
                                            </OnClick>
                                            <OnEnter>
                                                Soundtrack.ShowTip("Event Settings", "Allows editing of the selected event's settings such as it's name, and playback behavior.")
                                            </OnEnter>
                                            <OnLeave>
                                                GameTooltip:Hide()
                                            </OnLeave>
                                        </Scripts>
                                    </Button>
                                    
                                    <Frame name="SoundtrackFrameAssignedTracks">
                                        <Frames>
                                            <ScrollFrame name="SoundtrackFrameAssignedTracksScrollFrame" inherits="FauxScrollFrameTemplate">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="SoundtrackFrame_AssignedFrame">
                                                        <Offset>
                                                            <AbsDimension x="0" y="-7"/>
                                                        </Offset>
                                                    </Anchor>
                                                    <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="SoundtrackFrame_AssignedFrame">
                                                        <Offset>
                                                            <AbsDimension x="-28" y="7" />
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                                <Layers>
                                                    <Layer level="ARTWORK">
                                                        <Texture hidden="true" name="$parentScrollBarTop" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                                            <Size>
                                                                <AbsDimension x="31" y="256"/>
                                                            </Size>
                                                            <TexCoords left="0" right="0.484375" top="0" bottom="1.0"/>
                                                        </Texture>
                                                        <Texture hidden="true" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                                                            <Size>
                                                                <AbsDimension x="31" y="106"/>
                                                            </Size>
                                                            <TexCoords left="0.515625" right="1.0" top="0" bottom="0.4140625"/>
                                                        </Texture>
                                                    </Layer>
                                                </Layers>
                                                <Scripts>
                                                    <OnVerticalScroll>
                                                        FauxScrollFrame_OnVerticalScroll(self, offset, EVENTS_ITEM_HEIGHT, SoundtrackFrame_RefreshAssignedTracks);
                                                    </OnVerticalScroll>
                                                </Scripts>
                                            </ScrollFrame>
                                            <Button name="SoundtrackAssignedTrackButton1" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeTo="SoundtrackFrameColumnHeaderAssignedTracks">
                                                        <Offset>
                                                            <AbsDimension x="-4" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton2" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton1" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton3" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton2" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton4" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton3" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton5" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton4" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton6" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton5" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton7" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton6" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackAssignedTrackButton8" inherits="SoundtrackFrameAssignedTrackButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOP" relativeTo="SoundtrackAssignedTrackButton7" relativePoint="BOTTOM">
                                                        <Offset>
                                                            <AbsDimension x="0" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                            </Button>
                                            <Button name="SoundtrackFrameAllButton" inherits="UIPanelButtonTemplate" text="All">
                                                <Size>
                                                    <AbsDimension x="45" y="15"/>
                                                </Size>
                                                <Anchors>
                                                    <Anchor point="BOTTOMRIGHT" relativeTo="SoundtrackFrame_AssignedFrame" relativePoint="BOTTOMRIGHT">
                                                        <Offset>
                                                            <AbsDimension x="-25" y="5"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnClick>
                                                        SoundtrackFrameAllButton_OnClick();
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("All Tracks", "Adds all available tracks to this event's assigned tracks. Useful if you want to create a playlist or other event which will play any of your song.");
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </Button>
                                            <Button name="SoundtrackFrameClearButton" inherits="UIPanelButtonTemplate" text="Clear">
                                                <Size>
                                                    <AbsDimension x="45" y="15"/>
                                                </Size>
                                                <Anchors>
                                                    <Anchor point="RIGHT" relativeTo="SoundtrackFrameAllButton" relativePoint="LEFT">
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnClick>
                                                        SoundtrackFrameClearButton_OnClick();
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Clear Tracks", "Removes all assigned tracks from this event's tracks.");
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </Button>
                                            <Button name="SoundtrackFrameMoveDown" inherits="UIPanelButtonTemplate" text="Down">
                                                <Size>
                                                    <AbsDimension x="45" y="15"/>
                                                </Size>
                                                <Anchors>
                                                    <Anchor point="RIGHT" relativeTo="SoundtrackFrameClearButton" relativePoint="LEFT">
                                                        <Offset>
                                                            <AbsDimension x="-15" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnClick>
                                                        SoundtrackFrame_MoveAssignedTrack(1);
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Move Track Down", "Moves the selected assigned track down in the list. This allows you to set a specific order to your event's tracks.");
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </Button>
                                            <Button name="SoundtrackFrameMoveUp" inherits="UIPanelButtonTemplate" text="Up">
                                                <Size>
                                                    <AbsDimension x="45" y="15"/>
                                                </Size>
                                                <Anchors>
                                                    <Anchor point="RIGHT" relativeTo="SoundtrackFrameMoveDown" relativePoint="LEFT">
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnClick>
                                                        SoundtrackFrame_MoveAssignedTrack(-1);
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Move Track Up", "Moves the selected assigned track up in the list. This allows you to set a specific order to your event's tracks.");
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </Button>

                                        </Frames>
                                    </Frame>
                                    <Frame name="SoundtrackFrame_EventSettings">
                                        <Layers>
                                            <Layer level="BACKGROUND">
                                                <FontString name="SoundtrackFrame_FontStringName" inherits="GameFontHighlightSmall" text="Name">
                                                    <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_AssignedFrame" relativePoint="TOPLEFT">
                                                            <Offset>
                                                                <AbsDimension x="15" y="-35"/>
                                                            </Offset>
                                                        </Anchor>
                                                    </Anchors>
                                                </FontString>
                                            </Layer>
                                        </Layers>
                                        <Frames>
                                            <EditBox name="SoundtrackFrame_EventName" inherits="SoundtrackFrame_EditBoxTemplate">
                                                <Anchors>
                                                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_FontStringName" relativePoint="RIGHT">
                                                        <Offset>
                                                            <AbsDimension x="15" y="0"/>
                                                        </Offset>
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnTabPressed>
                                                        SoundtrackFrame_EventTrigger:SetFocus()
                                                    </OnTabPressed>
                                                    <OnEnterPressed>
                                                        SoundtrackFrame_RenameEvent()
                                                    </OnEnterPressed>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Event Name", "This is the name of the selected event. You can rename your event. Press Enter to confirm.")
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide()
                                                    </OnLeave>
                                                </Scripts>
                                            </EditBox>

                                            <CheckButton name="SoundtrackFrame_RandomCheckButton" inherits="OptionsCheckButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringName" relativePoint="BOTTOMLEFT">
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnLoad>
                                                        getglobal(this:GetName().."Text"):SetText("Random");
                                                    </OnLoad>
                                                    <OnClick>
                                                        SoundtrackFrame_ToggleRandomMusic();
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Random", "Toggles between continuous and random playback for the selected event.")
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </CheckButton>

                                            <CheckButton name="SoundtrackFrame_SoundEffectCheckBox" inherits="OptionsCheckButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_RandomCheckButton" relativePoint="BOTTOMLEFT">
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnLoad>
                                                        getglobal(this:GetName().."Text"):SetText("Sound Effect");
                                                    </OnLoad>
                                                    <OnClick>
                                                        SoundtrackFrame_ToggleSoundEffect();
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Sound Effect", "Plays the music track once as a sound effect, without stopping other music. This is useful for short sound-effects like victory music or a quest complete sound.")
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </CheckButton>

                                            <CheckButton name="SoundtrackFrame_ContinuousCheckBox" inherits="OptionsCheckButtonTemplate">
                                                <Anchors>
                                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_SoundEffectCheckBox" relativePoint="BOTTOMLEFT">
                                                    </Anchor>
                                                </Anchors>
                                                <Scripts>
                                                    <OnLoad>
                                                        getglobal(this:GetName().."Text"):SetText("Continuous");
                                                    </OnLoad>
                                                    <OnClick>
                                                        SoundtrackFrame_ToggleContinuousMusic();
                                                    </OnClick>
                                                    <OnEnter>
                                                        Soundtrack.ShowTip("Continuous", "Plays the tracks continuously in a loop. If you turn this off, the track is played once, and then is removed from the stack.")
                                                    </OnEnter>
                                                    <OnLeave>
                                                        GameTooltip:Hide();
                                                    </OnLeave>
                                                </Scripts>
                                            </CheckButton>
                                        </Frames>
                                    </Frame>
                                </Frames>
                                <Scripts>
                                    <OnLoad>this:SetBackdropColor(.1,.1,.1,0.7)</OnLoad>
                                </Scripts>
                            </Frame>


                            
                            
                        </Frames>
                    </Frame>
                    <Frame name="SoundtrackFrameRightPanelEditEvent" hidden="true">
                        <Layers>
                            <Layer level="BACKGROUND">
                                <FontString name="SoundtrackFrame_FontStringType" inherits="GameFontHighlightSmall" text="Event Type">
                                    <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame" relativePoint="TOPLEFT">
                                            <Offset>
                                                <AbsDimension x="300" y="-50"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>

                                <FontString name="SoundtrackFrame_FontStringTrigger" inherits="GameFontHighlightSmall" text="Trigger">
                                    <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringType" relativePoint="BOTTOMLEFT">
                                            <Offset>
                                                <AbsDimension x="0" y="-16"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>

                                <FontString name="SoundtrackFrame_FontStringPriority" inherits="GameFontHighlightSmall" text="Priority">
                                    <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringTrigger" relativePoint="BOTTOMLEFT">
                                            <Offset>
                                                <AbsDimension x="0" y="-16"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>

                                <FontString name="SoundtrackFrame_FontStringScript" inherits="GameFontHighlightSmall" text="Script">
                                    <Anchors>
                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringPriority" relativePoint="BOTTOMLEFT">
                                            <Offset>
                                                <AbsDimension x="0" y="-16"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>
                            </Layer>
                        </Layers>
                        <Frames>
                            <Frame name="SoundtrackFrame_EventTypeDropDown" inherits="UIDropDownMenuTemplate">
                                <Anchors>
                                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_FontStringType" relativePoint="RIGHT">
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnLoad>
                                        SoundtrackFrame_EventTypeDropDown_OnLoad();
                                    </OnLoad>
                                    <OnEnter>
                                        Soundtrack.ShowTip("Event Type", "The type of event affects how the custom event is edited.")
                                    </OnEnter>
                                    <OnLeave>
                                        GameTooltip:Hide();
                                    </OnLeave>
                                </Scripts>
                            </Frame>
                            <EditBox name="SoundtrackFrame_EventTrigger" inherits="SoundtrackFrame_EditBoxTemplate">
                                <Anchors>
                                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_FontStringTrigger" relativePoint="RIGHT">
                                        <Offset>
                                            <AbsDimension x="16" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnTabPressed>
                                        --ItemRack_EventDelay:SetFocus()
                                    </OnTabPressed>
                                </Scripts>
                            </EditBox>

                            <EditBox name="SoundtrackFrame_Priority" inherits="SoundtrackFrame_EditBoxTemplate">
                                <Size>
                                    <AbsDimension x ="50" y="20"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_FontStringPriority" relativePoint="RIGHT">
                                        <Offset>
                                            <AbsDimension x="16" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnTabPressed>
                                        --ItemRack_EventDelay:SetFocus()
                                    </OnTabPressed>
                                </Scripts>
                            </EditBox>
                            <CheckButton name="SoundtrackFrame_CustomContinuous" inherits="OptionsCheckButtonTemplate">
                                <Anchors>
                                    <Anchor point="LEFT" relativeTo="SoundtrackFrame_Priority" relativePoint="RIGHT">
                                        <Offset>
                                            <AbsDimension x="16" y="0"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnLoad>
                                        getglobal(this:GetName().."Text"):SetText("Continuous");
                                    </OnLoad>
                                    <OnClick>
                                    </OnClick>
                                    <OnEnter>
                                        Soundtrack.ShowTip("Continuous", "Determines if this event will loop or play once. When an event plays continuously, it can be stopped by its own script, or through another event replacing it.")
                                    </OnEnter>
                                    <OnLeave>
                                        GameTooltip:Hide()
                                    </OnLeave>
                                </Scripts>
                            </CheckButton>

                            <Frame name="SoundtrackFrame_ScriptEditFrame">
                                <Size>
                                    <AbsDimension x="500" y="400"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringScript" relativePoint="BOTTOMLEFT">
                                        <Offset>
                                            <AbsDimension x="0" y="-5"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Backdrop bgFile="Interface\ChatFrame\ChatFrameBackground" edgeFile="Interface\Buttons\UI-SliderBar-Border" tile="true">
                                    <BackgroundInsets>
                                        <AbsInset left="3" right="3" top="6" bottom="6" />
                                    </BackgroundInsets>
                                    <TileSize>
                                        <AbsValue val="16" />
                                    </TileSize>
                                    <EdgeSize>
                                        <AbsValue val="9" />
                                    </EdgeSize>
                                </Backdrop>

                                <Frames>

                                    <ScrollFrame name="SoundtrackFrame_EventEditScrollFrame" inherits="UIPanelScrollFrameTemplate">
                                        <Size>
                                            <AbsDimension x="466" y="384"/>
                                        </Size>
                                        <Anchors>
                                            <Anchor point="TOPLEFT">
                                                <Offset>
                                                    <AbsDimension x="6" y="-8"/>
                                                </Offset>
                                            </Anchor>
                                        </Anchors>
                                        <Layers>
                                            <Layer level="BORDER">
                                                <Texture file="Interface\ChatFrame\ChatFrameBackground">
                                                    <Anchors>
                                                        <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EventEditScrollFrame" relativePoint="TOPRIGHT">
                                                            <Offset>
                                                                <AbsDimension x="0" y="0"/>
                                                            </Offset>
                                                        </Anchor>
                                                        <Anchor point="BOTTOMRIGHT" relativeTo="SoundtrackFrame_EventEditScrollFrame" relativePoint="BOTTOMRIGHT">
                                                            <Offset>
                                                                <AbsDimension x="26" y="0"/>
                                                            </Offset>
                                                        </Anchor>
                                                    </Anchors>
                                                    <Gradient>
                                                        <MinColor r="0.1" g="0.1" b="0.1"/>
                                                        <MaxColor r="0" g="0" b="0"/>
                                                    </Gradient>
                                                </Texture>
                                            </Layer>
                                        </Layers>

                                        <ScrollChild>
                                            <EditBox name="SoundtrackFrame_EventScript" multiLine="true" letters="4096" autoFocus="false">
                                                <Size>
                                                    <AbsDimension x="500" y="400"/>
                                                </Size>
                                                <Scripts>
                                                    <OnTextChanged>
                                                        local scrollBar = getglobal(this:GetParent():GetName().."ScrollBar")
                                                        this:GetParent():UpdateScrollChildRect();
                                                        local min;
                                                        local max;
                                                        min, max = scrollBar:GetMinMaxValues();
                                                        if ( max > 0 and (this.max ~= max) ) then
                                                        this.max = max;
                                                        scrollBar:SetValue(max);
                                                        end
                                                    </OnTextChanged>
                                                    <OnEscapePressed>
                                                        this:ClearFocus();
                                                    </OnEscapePressed>
                                                    <OnTabPressed>
                                                        SoundtrackFrame_EventName:SetFocus()
                                                    </OnTabPressed>
                                                    
                                                </Scripts>
                                                <FontString inherits="GameFontHighlightSmall"/>
                                            </EditBox>
                                        </ScrollChild>
                                    </ScrollFrame>
                                </Frames>
                                <Scripts>
                                    <OnLoad>
                                        this:SetBackdropColor(.1,.1,.1,1)
                                    </OnLoad>
                                </Scripts>
                            </Frame>
                            <Button name="SoundtrackFrameSaveEvent" inherits="UIPanelButtonTemplate" text="Save">
                                <Size>
                                    <AbsDimension x="100" y="22"/>
                                </Size>
                                <Anchors>
                                    <Anchor point="BOTTOMRIGHT" relativeTo="SoundtrackFrame" relativePoint="BOTTOMRIGHT">
                                        <Offset>
                                            <AbsDimension x="-30" y="20"/>
                                        </Offset>
                                    </Anchor>
                                </Anchors>
                                <Scripts>
                                    <OnClick>
                                        SoundtrackFrameSaveCustomEventButton_OnClick();
                                    </OnClick>
                                </Scripts>
                            </Button>
                            
                        </Frames>
                    </Frame>
                    


                </Frames>
            </Frame>
            <Frame name="SoundtrackFrameOptionsFrame" hidden="true">
                <Size>
                    <RelDimension x="0.5" y="0.8"/>
                </Size>
                <Anchors>
                    <Anchor point="TOP" relativeTo="SoundtrackFrame" relativePoint="TOP">
                    </Anchor>
                </Anchors>
                <!--Backdrop bgFile="Interface/ChatFrame/ChatFrameBackground" edgeFile="Interface/Buttons/UI-SliderBar-Border" tile="true">
                    <BackgroundInsets>
                        <AbsInset left="3" right="3" top="6" bottom="6" />
                    </BackgroundInsets>
                    <TileSize>
                        <AbsValue val="16" />
                    </TileSize>
                    <EdgeSize>
                        <AbsValue val="9" />
                    </EdgeSize>
                </Backdrop-->
                <Layers>
                    <Layer level="BACKGROUND">
                        <FontString name="SoundtrackFrame_FontStringUIOptions" inherits="GameFontNormal" text="User Interface Options">
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="100" y="-100"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                        <FontString name="SoundtrackFrame_FontStringEventOptions" inherits="GameFontNormal" text="Event Options">
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="100" y="-300"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>

                        <FontString name="SoundtrackFrame_FontStringDebugOptions" inherits="GameFontNormal" text="Debugging Options">
                            <Anchors>
                                <Anchor point="TOPLEFT">
                                    <Offset>
                                        <AbsDimension x="400" y="-100"/>
                                    </Offset>
                                </Anchor>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <Frames>
                    <!-- Options -->
                    <CheckButton name="SoundtrackFrame_EnableMinimapButton" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringUIOptions" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-10"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Minimap Button");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleMinimapButton();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Minimap Button", "Displays the Soundtrack icon on the minimap. The icon can be repositioned by dragging it around the minimap. If you turn off this button, you can open Soundtrack's main window with a keybinding or with the /soundtrack command.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide()
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_ShowPlaybackControls" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableMinimapButton" relativePoint="BOTTOMLEFT">
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Playback Controls");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleShowPlaybackControls();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Playback Controls",
                                    "Displays a mini toolbar with a previous, pause, and next button to control the playback. The controls can be repositioned by dragging the name area.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_ShowTrackInformation" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_ShowPlaybackControls" relativePoint="BOTTOMLEFT">
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Show Track Information");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleShowTrackInformation();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Show Track Information", 
                                    "When track changes, the track's title, album and artist are shortly displayed on the screen. The track information frame can be repositioned by dragging it when it appears.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_ShowDefaultMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_ShowTrackInformation" relativePoint="BOTTOMLEFT">
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Show Default Music");
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.ShowDefaultMusic = not Soundtrack.Settings.ShowDefaultMusic
                                SoundtrackFrame_RefreshTracks();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Show Default Music",
                                "Adds all the available music tracks included with the game to your music library.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    
                    <CheckButton name="SoundtrackFrame_EnableDebugMode" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringDebugOptions" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-10"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Output Debug Information");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleDebugMode();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Output Debug Information", "Outputs verbose debug information to the chat frame. Output is sent to default chat frame or the frame named 'Soundtrack' if available.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_ShowEventStack" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableDebugMode" relativePoint="BOTTOMLEFT" />
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Event Stack");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleShowEventStack();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Event Stack", "Displays the currently active events in the stack, below the minimap (useful for debugging).")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    
                    <CheckButton name="SoundtrackFrame_AutoAddZones" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_FontStringEventOptions" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-10"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Automatically Add Zones")
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.AutoAddZones = not Soundtrack.Settings.AutoAddZones
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Automatically Add Zones", "Adds new zones to the list of zone events as you travel. Zones are added hierarchically at all levels (e.g. continents, major areas, cities, towns, inns, etc.");
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>

                    <CheckButton name="SoundtrackFrame_AutoEscalateBattleMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_AutoAddZones" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-10"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Escalate Battle Music")
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.EscalateBattleMusic = not Soundtrack.Settings.EscalateBattleMusic
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Escalate Battle Music", "If during a battle a stronger enemy is detected, allows the music to switch to the higher battle music.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <Frame name="SoundtrackFrame_BattleCooldownDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_AutoEscalateBattleMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-21"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Layers>
                            <Layer level="BACKGROUND">
                                <FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="Combat Cooldown">
                                    <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
                                            <Offset>
                                                <AbsDimension x="21" y="0"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>
                            </Layer>
                        </Layers>
                        <Scripts>
                            <OnLoad>
                                SoundtrackFrame_BattleCooldownDropDown_OnLoad();
                            </OnLoad>
                            <OnShow>
                                SoundtrackFrame_BattleCooldownDropDown_OnLoad();
                            </OnShow>
                            <OnEnter>
                                Soundtrack.ShowTip("Battle Cooldown", "The time it takes for battle music to stop when disengaged from battle.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Frame>

                    <CheckButton name="SoundtrackFrame_LoopMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_BattleCooldownDropDown" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-10"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Loop Music");
                            </OnLoad>
                            <OnClick>
                                SoundtrackFrame_ToggleLoopMusic()
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Loop Music", "Enable to continuously play background music. This is the same setting exposed in the default Sound options.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <Frame name="SoundtrackFrame_SilenceDropDown" inherits="UIDropDownMenuTemplate" enableMouse="true">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_LoopMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="-21"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Layers>
                            <Layer level="BACKGROUND">
                                <FontString name="$parentLabel" inherits="GameFontHighlightSmall" text="Maximum Silence">
                                    <Anchors>
                                        <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
                                            <Offset>
                                                <AbsDimension x="21" y="0"/>
                                            </Offset>
                                        </Anchor>
                                    </Anchors>
                                </FontString>
                            </Layer>
                        </Layers>
                        <Scripts>
                            <OnLoad>
                                SoundtrackFrame_SilenceDropDown_OnLoad();
                            </OnLoad>
                            <OnShow>
                                SoundtrackFrame_SilenceDropDown_OnLoad();
                            </OnShow>
                            <OnEnter>
                                Soundtrack.ShowTip("Maximum Silence", "The maximum amount of silence to insert between tracks for zone music. Increase this value if you wish the music would take a break once in a while.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Frame>
                    <!--
                    <Button name="SoundtrackFrame_ExportSettings" inherits="UIPanelButtonTemplate" text="Export Settings">
                        <Size>
                            <AbsDimension x="150" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="BOTTOMRIGHT" relativeTo="SoundtrackFrame" relativePoint="BOTTOMRIGHT">
                                <Offset>
                                    <AbsDimension x="-30" y="100"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameExportSettings_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Export Settings", "Takes your Soundtrack's configuration and copies it to the clipboard in an easy to read format. You can use it to show your friends how you use Soundtrack, or let them import your settings to their machine (as long as they have the same music files on their PC).")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    <Button name="SoundtrackFrame_ImportSettings" inherits="UIPanelButtonTemplate" text="Import Settings">
                        <Size>
                            <AbsDimension x="150" y="22"/>
                        </Size>
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_ExportSettings" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnClick>
                                SoundtrackFrameImportSettings_OnClick();
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Export Settings", "Let's you import a configuration. Be careful, this completely removes all your current Soundtrack configuration.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </Button>
                    -->

                    <CheckButton name="SoundtrackFrame_EnableMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame" relativePoint="BOTTOMRIGHT">
                                <Offset>
                                    <AbsDimension x="-200" y="300"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Enable Music");
                            </OnLoad>
                            <OnClick>
                                --Soundtrack.Settings.AutoAddZones = not Soundtrack.Settings.AutoAddZones;
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Enable Music", "Master toggle to turn off all music. Use this to temporarily disable all of Soundtrack's music.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_EnableZoneMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Enable zone music");
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.EnableZoneMusic = not Soundtrack.Settings.EnableZoneMusic
                                if Soundtrack.Settings.EnableZoneMusic == true then
                                    Soundtrack.Util.DebugPrint("Zone Music ON")
                                else
                                    Soundtrack.Util.DebugPrint("Zone Music OFF")
                                end
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Enable Zone Music", "Enables the zone music. Use this to temporarily stop all zone music from playing.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_EnableBattleMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableZoneMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Enable battle music");
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.EnableBattleMusic = not Soundtrack.Settings.EnableBattleMusic
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Enable Battle Music", "Enables the battle music. Use this to temporarily stop all battle music.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_EnableMiscMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableBattleMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Enable misc music");
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.EnableMiscMusic = not Soundtrack.Settings.EnableMiscMusic
                            </OnClick>
                            <OnEnter>
                                Soundtrack.ShowTip("Enable Misc Music", "Enables the Misc music. Use this to temporarily turn off all misc music.")
                            </OnEnter>
                            <OnLeave>
                                GameTooltip:Hide();
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    <CheckButton name="SoundtrackFrame_EnableCustomMusic" inherits="OptionsCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeTo="SoundtrackFrame_EnableMiscMusic" relativePoint="BOTTOMLEFT">
                                <Offset>
                                    <AbsDimension x="0" y="0"/>
                                </Offset>
                            </Anchor>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                getglobal(this:GetName().."Text"):SetText("Enable custom music");
                            </OnLoad>
                            <OnClick>
                                Soundtrack.Settings.EnableCustomMusic = not Soundtrack.Settings.EnableCustomMusic
                            </OnClick>
                            <OnEnter>
                            </OnEnter>
                            <OnLeave>
                            </OnLeave>
                        </Scripts>
                    </CheckButton>
                    
                    
                </Frames>
                <Scripts>
                    <OnLoad>
                        this:SetBackdropColor(.1,.1,.1,0.7);
                    </OnLoad>
                    <OnShow>
                        SoundtrackFrame_RefreshOptionsFrame();
                    </OnShow>
                </Scripts>
            </Frame>
        </Frames>
        <Scripts>
            <OnLoad>
                SoundtrackFrame_OnLoad();
            </OnLoad>
            <OnShow>
                SoundtrackFrame_OnShow();
            </OnShow>
            <OnHide>
                SoundtrackFrame_OnHide();
            </OnHide>
            <OnEvent>
                SoundtrackFrame_OnEvent(arg1, arg2);
            </OnEvent>
            <OnMouseWheel>
                return;
            </OnMouseWheel>
        </Scripts>
    </Frame>
</Ui>