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


    <!-- These frames are shown when the current track changes -->
    <Frame name="SoundtrackControlFrame" toplevel="true" parent="UIParent" movable="true" enableMouse="true" hidden="true">
        <Size>
            <AbsDimension x="339" y="53"/>
        </Size>
        <Anchors>
            <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
                <Offset>
                    <AbsDimension x="-75" y="-200"/>
                </Offset>
            </Anchor>
        </Anchors>
        <!--TitleRegion>
            <Size>
                <AbsDimension x="100" y="20" />
            </Size>
            <Anchors>
                <Anchor point="TOP">
                    <Offset>
                        <AbsDimension x="0" y="5" />
                    </Offset>
                </Anchor>
            </Anchors>
        </TitleRegion-->
        <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="ARTWORK">
                <FontString name="$parentStackTitle" inherits="GameFontNormal" text="EVENT STACK:">
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="15" y="-55"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </FontString>
                <FontString name="$parentStack1" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStackTitle" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack2" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack1" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack3" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack2" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack4" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack3" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack5" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack4" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack6" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack5" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack7" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack6" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack8" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack7" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack9" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack8" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
                <FontString name="$parentStack10" inherits="GameFontNormal">
                    <Anchors>
                        <Anchor point="TOPLEFT" relativeTo="$parentStack9" relativePoint="BOTTOMLEFT" />
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>


            <Button name="SoundtrackControlFrame_PreviousButton" inherits="Soundtrack_PreviousButton" >
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT">
                        <Offset>
                            <AbsDimension  x="12" y="-12"/>
                        </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="SoundtrackControlFrame_PlayButton" inherits="Soundtrack_PlayButton">
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackControlFrame_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="SoundtrackControlFrame_StopButton" inherits="Soundtrack_StopButton">
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="SoundtrackControlFrame_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="SoundtrackControlFrame_NextButton" inherits="Soundtrack_NextButton">
                <Anchors>
                    <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeTo="SoundtrackControlFrame_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-->
            <StatusBar name="SoundtrackControlFrame_StatusBarEvent" inherits="SoundtrackFrame_StatusBarTemplate" minValue="0" maxValue="8" defaultValue="1" id="1">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackControlFrame_NextButton" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="3" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
            </StatusBar>
            <StatusBar name="SoundtrackControlFrame_StatusBarTrack" inherits="SoundtrackFrame_StatusBarTemplate" minValue="0" maxValue="244" defaultValue="23" id="1">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackControlFrame_StatusBarEvent" relativePoint="BOTTOMLEFT">
                    </Anchor>
                </Anchors>
            </StatusBar>

            <Frame name="SoundtrackControlFrame_PlaylistMenu" inherits="UIDropDownMenuTemplate" id="1" hidden="false">
                <Anchors>
                    <Anchor point="TOPLEFT" relativeTo="SoundtrackControlFrame_StatusBarEvent" 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, SoundtrackControlFrame_PlaylistMenu_Initialize, "MENU");
                    </OnShow>
                </Scripts>
            </Frame>
        </Frames>

        <Scripts>
            <OnLoad>
                SoundtrackFrame_RefreshPlaybackControls();
            </OnLoad>
            <OnEvent>
                if (event=="VARIABLES_LOADED") then
                    SoundtrackFrame_RefreshPlaybackControls();
                end
            </OnEvent>
        </Scripts>
    </Frame>
</Ui>
