<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/">
    <!--
    This file is part of Decursive.
    
    Decursive (v 2.4.5-3-g6a02387) add-on for World of Warcraft UI
    Copyright (C) 2006-2007-2008-2009 John Wellesz (archarodim AT teaser.fr) ( http://www.2072productions.com/to/decursive.php )

    Starting from 2009-10-31 and until said otherwise by its author, Decursive
    is no longer free software, all rights are reserved to its author (John Wellesz).

    The only official and allowed distribution means are www.2072productions.com, www.wowace.com and curse.com.
    To distribute Decursive through other means a special authorization is required.
    

    Decursive is inspired from the original "Decursive v1.9.4" by Quu.
    The original "Decursive 1.9.4" is in public domain ( www.quutar.com )

    Decursive is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY.
    -->
    <Script>

-- big ugly scary fatal error message display function {{{
if not DcrFatalError then
-- the beautiful error popup : {{{ -
StaticPopupDialogs["DECURSIVE_ERROR_FRAME"] = {
    text = "|cFFFF0000Decursive Error:|r\n%s",
    button1 = "OK",
    OnAccept = function()
        return false;
    end,
    timeout = 0,
    whileDead = 1,
    hideOnEscape = 1,
    showAlert = 1,
    }; -- }}}
DcrFatalError = function (TheError) StaticPopup_Show ("DECURSIVE_ERROR_FRAME", TheError); end
end
-- }}}
        if not DcrLoadedFiles or not DcrLoadedFiles["Decursive.lua"] then
            if not DcrCorrupted then DcrFatalError("Decursive installation is corrupted! (Decursive.lua not loaded)"); end;
            DcrCorrupted = true;
        end

    </Script>


    <Frame name="DecursiveMainBar" frameStrata="LOW" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent"> <!-- {{{ -->
        <Size>
            <AbsDimension x="80" y="25" />
        </Size>

        <Anchors>
            <Anchor point="TOP">
                <Offset>
                    <AbsDimension x="0" y="-50"/>
                </Offset>
            </Anchor>
        </Anchors>

        <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
            <EdgeSize>
                <AbsValue val="16"/>
            </EdgeSize>
            <TileSize>
                <AbsValue val="16"/>
            </TileSize>
            <BackgroundInsets>
                <AbsInset left="5" right="5" top="5" bottom="5"/>
            </BackgroundInsets>
        </Backdrop>

        <Layers>
            <Layer level="OVERLAY">
                <FontString name="$parentText" inherits="GameFontNormal" text="BINDING_HEADER_DECURSIVE">
                    <Anchors>
                        <Anchor point="TOP" relativePoint="TOP">
                            <Offset>
                                <AbsDimension x="0" y="-5"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>

        <Scripts>
            <OnEnter>
                if DecursiveSelfDiagnostic() ~= 2 then

                Dcr:DisplayTooltip(
                string.format(
                "|cFF0055AA%s|r %s by %s|r\n" ..
                --"|cFF11FF11%s|r: %s\n" ..
                "|cFF11FF11%s|r / |cFF11FF11%s|r-|cFF11FF11%s|r: %s"
                , Dcr.name, Dcr.version, Dcr.author,
                --Dcr.L["HLP_RIGHTCLICK"], Dcr.L["STR_OPTIONS"],
                Dcr.L["HLP_MIDDLECLICK"], Dcr.L["SHIFT"], Dcr.L["HLP_LEFTCLICK"],
                Dcr.L["HIDESHOW_BUTTONS"]
                )
                , this);
                end
            </OnEnter>
            <OnLeave>
                DcrDisplay_Tooltip:Hide();
            </OnLeave>

            <OnMouseUp>
                if ( this.isMoving ) then
                this:StopMovingOrSizing();
                this.isMoving = false;
                end
                Dcr:SaveLLPos();
            </OnMouseUp>
            <OnMouseDown>
                if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) or IsAltKeyDown()) and ( arg1 == "LeftButton" ) ) then
                this:StartMoving();
                this.isMoving = true;
                end
                if (arg1 == "MiddleButton" or arg1 == "LeftButton" and IsShiftKeyDown()) then
                Dcr:ShowHideButtons();
                end
            </OnMouseDown>
            <OnHide>
                if ( this.isMoving ) then
                this:StopMovingOrSizing();
                this.isMoving = false;
                end
            </OnHide>
            <OnLOad>
                this:RegisterEvent("ADDON_LOADED");
            </OnLOad>
            <OnEvent>
                if event == "ADDON_LOADED" and arg1 == "Decursive" then
                    DecursiveSelfDiagnostic();
                    this:UnregisterEvent("ADDON_LOADED");
                end
            </OnEvent>
        </Scripts>

        <Frames>
            <Button name="$parentPriority" inherits="GameMenuButtonTemplate" text="P"> <!-- {{{ -->
                <Size>
                    <AbsDimension x="20" y="20" />
                </Size>
                <Anchors>
                    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parent">
                        <Offset>
                            <AbsDimension x="0" y="0" />
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        if DcrCorrupted then return end
                        this:SetText(Dcr.L["PRIORITY_SHOW"]);
                    </OnLoad>
                    <OnClick>
                        if DecursiveSelfDiagnostic(true) ~= 2 then
                        Dcr:ShowHidePriorityListUI();
                        end
                    </OnClick>
                    <OnEnter>
                        if DecursiveSelfDiagnostic() ~= 2 then
                        Dcr:DisplayTooltip(Dcr.L["PRIORITY_LIST"], this);
                        end
                    </OnEnter>
                    <OnLeave>
                        DcrDisplay_Tooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>  <!-- }}} -->

            <Button name="$parentSkip" inherits="GameMenuButtonTemplate" text="S">  <!-- {{{ -->
                <Size>
                    <AbsDimension x="20" y="20" />
                </Size>
                <Anchors>
                    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentPriority">
                        <Offset>
                            <AbsDimension x="0" y="0" />
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        if DcrCorrupted then return end
                        this:SetText(Dcr.L["SKIP_SHOW"]);
                    </OnLoad>
                    <OnClick>
                        if DecursiveSelfDiagnostic(true) ~= 2 then
                        Dcr:ShowHideSkipListUI();
                        end
                    </OnClick>
                    <OnEnter>
                        if DecursiveSelfDiagnostic() ~= 2 then
                        Dcr:DisplayTooltip(Dcr.L["SKIP_LIST_STR"], this);
                        end
                    </OnEnter>
                    <OnLeave>
                        DcrDisplay_Tooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>  <!-- }}} -->

            <Button name="$parentHide" inherits="GameMenuButtonTemplate" text="X">  <!-- {{{ -->
                <Size>
                    <AbsDimension x="20" y="20" />
                </Size>
                <Anchors>
                    <Anchor point="LEFT" relativePoint="RIGHT" relativeTo="$parentSkip">
                        <Offset>
                            <AbsDimension x="2" y="0" />
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnClick>
                        if DecursiveSelfDiagnostic(true) ~= 2 then
                        Dcr:HideBar(false);
                        end
                    </OnClick>
                    <OnEnter>
                        if DecursiveSelfDiagnostic() ~= 2 then
                        Dcr:DisplayTooltip(Dcr.L["HIDE_MAIN"], this);
                        end
                    </OnEnter>
                    <OnLeave>
                        DcrDisplay_Tooltip:Hide();
                    </OnLeave>
                </Scripts>
            </Button>  <!-- }}} -->
        </Frames>

    </Frame> <!-- }}} -->

    <!-- ================================================================== -->
   
    <Frame name="DecursiveAnchor" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" hidden="true" parent="UIParent"> <!-- {{{ -->
        <Size>
            <AbsDimension x="180" y="25"/>
        </Size>

        <Anchors>
            <Anchor point="TOP" relativeTo="UIErrorsFrame" relativePoint="BOTTOM">
                <Offset>
                    <AbsDimension x="0" y="0"/>
                </Offset>
            </Anchor>
        </Anchors>

        <TitleRegion setAllPoints="true"/>

        <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
            <EdgeSize>
                <AbsValue val="16"/>
            </EdgeSize>
            <TileSize>
                <AbsValue val="16"/>
            </TileSize>
            <BackgroundInsets>
                <AbsInset left="5" right="5" top="5" bottom="5"/>
            </BackgroundInsets>
        </Backdrop>

        <Layers>
            <Layer level="BACKGROUND">
                <FontString name="$parentText" inherits="GameFontNormal" text="ANCHOR">
                    <Anchors>
                        <Anchor point="TOP">
                            <Offset>
                                <AbsDimension x="0" y="-5"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <Button name="$parentDirection" inherits="GameMenuButtonTemplate" text=".">
                <Size>
                    <AbsDimension x="20" y="17" />
                </Size>
                <Anchors>
                    <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="$parent">
                        <Offset>
                            <AbsDimension x="-10" y="-4" />
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>

                    <OnClick>
                        Dcr.profile.CustomeFrameInsertBottom = (not Dcr.profile.CustomeFrameInsertBottom);
                        Dcr:ChangeTextFrameDirection(Dcr.profile.CustomeFrameInsertBottom);

                        Dcr:Println("|cFFAAAAAATEST");

                    </OnClick>
                    <OnShow>
                        Dcr:ThisSetParentText(Dcr.L["ANCHOR"]);
                    </OnShow>
                </Scripts>
            </Button>
        </Frames>
    </Frame> <!-- }}} -->

    <MessageFrame name="DecursiveTextFrame" insertMode="TOP" parent="UIParent" frameStrata="HIGH" toplevel="true" > <!-- {{{ -->
        <Size>
            <AbsDimension x="600" y="140"/>
        </Size>
        <Anchors>
            <Anchor point="TOP" relativeTo="DecursiveAnchor" relativePoint="BOTTOM">
                <Offset>
                    <AbsDimension x="0" y="0"/>
                </Offset>
            </Anchor>
        </Anchors>

        <FontString inherits="GameFontNormal" justifyH="CENTER"/>
    </MessageFrame> <!-- }}} -->

    <GameTooltip name="DcrDisplay_Tooltip" hidden="true" inherits="GameTooltipTemplate" parent="UIParent" />

    <Frame name="Decursive" />

    <Script>
        DcrLoadedFiles["Decursive.xml"] = "2.4.5-3-g6a02387";
    </Script>


</Ui>
