vanilla-wow-addons – Rev 1

Subversion Repositories:
Rev:
<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/
                        C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">

  <Frame name="LazyRogueFormEditFrame" toplevel="true" enableMouse="true" resizable="true" movable="true" parent="UIParent" hidden="true">
    <Size>
      <AbsDimension x="500" y="430"/>
    </Size>
    <Anchors>
      <Anchor point="CENTER"/>
    </Anchors>

    <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground"
              edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
      <EdgeSize>
        <AbsValue val="32"/>
      </EdgeSize>
      <TileSize>
        <AbsValue val="32"/>
      </TileSize>
      <BackgroundInsets>
        <AbsInset left="5" right="5" top="5" bottom="5"/>
      </BackgroundInsets>
    </Backdrop>

    <Layers>
      <Layer level="ARTWORK">

        <FontString name="$parentTitle" inherits="GameFontHighlightLarge" justifyH="CENTER" text="LazyRogue Form Editor">
          <Size>
            <AbsDimension x="200" y="15"/>
          </Size>
          <Anchors>
            <Anchor point="CENTER" relativeTo="$parent" relativePoint="TOP">
                 <Offset>
                <AbsDimension x="0" y="-20"/>
              </Offset>
         </Anchor>
          </Anchors>
        </FontString>

        <FontString name="$parentFormNameDescr" inherits="GameFontHighlight" justifyH="LEFT" text="Editing form:">
          <Size>
            <AbsDimension x="85" y="18"/>
          </Size>
          <Anchors>
            <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="15" y="-41"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>

      </Layer>
    </Layers>

    <Frames>

<Frame name="LR_Frame_Resize" virtual="true">
- <Scripts>
  <OnMouseUp>
  if ( this:GetParent().isResizing ) then
  this:GetParent():StopMovingOrSizing();
  LazyRogueFormScrollFrame:SetWidth(this:GetParent():GetWidth()-50);
  LazyRogueFormEditFrameForm:SetWidth(LazyRogueFormScrollFrame:GetWidth()-50);
 LazyRogueFormScrollFrame:SetHeight(this:GetParent():GetHeight()-110);
  LazyRogueFormEditFrameForm:SetHeight(LazyRogueFormScrollFrame:GetHeight()-110);
 LazyRogueFormScrollFrame:Show();
  this:GetParent().isResizing = false;
  end
  </OnMouseUp> 
  <OnMouseDown>
  if arg1 == "LeftButton" then
  LazyRogueFormScrollFrame:Hide();
  this:GetParent():SetMinResize(350,150);
  this:GetParent():StartSizing("BOTTOMRIGHT");
  this:GetParent().isResizing = true
  end
  </OnMouseDown> 
  </Scripts>
- <Size>
  <AbsDimension x="16" y="16" /> 
  </Size>
- <Anchors>
- <Anchor point="BOTTOMRIGHT">
- <Offset>
  <AbsDimension x="-6" y="6" /> 
  </Offset>
  </Anchor>
  </Anchors>
- <Layers>
- <Layer level="BACKGROUND">
- <Texture file="Interface\AddOns\LazyRogue\img\corner" alphaMode="ADD">
- <Anchors>
- <Anchor point="TOPLEFT">
- <Offset>
  <AbsDimension x="0" y="0" /> 
  </Offset>
  </Anchor>
- <Anchor point="BOTTOMRIGHT">
- <Offset>
  <AbsDimension x="0" y="0" /> 
  </Offset>
  </Anchor>
  </Anchors>
  </Texture>
  </Layer>
  </Layers>
  </Frame>


      <ScrollFrame name="LazyRogueFormScrollFrame" inherits="UIPanelScrollFrameTemplate" resizable="true" >
        <Size>
          <AbsDimension x="450" y="320"/>
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT">
            <Offset>
              <AbsDimension x="15" y="-70"/>
            </Offset>
          </Anchor>
        </Anchors>

        <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground"
                  edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true" alpha="1.0">
          <EdgeSize>
            <AbsValue val="8"/>
          </EdgeSize>
          <TileSize>
            <AbsValue val="8"/>
          </TileSize>
          <BackgroundInsets>
            <AbsInset left="0" right="0" top="0" bottom="0"/>
          </BackgroundInsets>
        </Backdrop>

        
        <ScrollChild>
          <Frame name="$parentScrollChild" resizable="true" >
            <Size>
              <AbsDimension x="435" y="310"/>
            </Size>
            <Anchors>
              <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
                <Offset>
                  <AbsDimension x="5" y="-5"/>
                </Offset>
              </Anchor>
            </Anchors>
            <Frames>


              <EditBox name="LazyRogueFormEditFrameForm" letters="7000" resizable="true" enableMouse="true" autoFocus="true" multiLine="true">
                <Size>
                  <AbsDimension x="435" y="310"/>
                </Size>
                <Anchors>
                  <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
                    <Offset>
                      <AbsDimension x="5" y="-5"/>
                    </Offset>
                  </Anchor>
                </Anchors>
                
                <Scripts>
                  <OnEscapePressed>
                    HideUIPanel(LazyRogueFormEditFrame)
                    HideUIPanel(LazyRogueFormHelp)
                  </OnEscapePressed>
                  <OnEnterPressed>
                    HideUIPanel(LazyRogueFormEditFrame)
                    HideUIPanel(LazyRogueFormHelp)
                  </OnEnterPressed>
                  <OnTabPressed>
                    LazyRogueFormEditFrameFormName:SetFocus()
                  </OnTabPressed>
                  <OnClick>
                    this:SetFocus()
                  </OnClick>
                  <OnShow>
                    LAZYROGUEHELP_SCROLLBAR_HACK2 = false
                  </OnShow>
                  <OnMouseUp>
                    LAZYROGUEHELP_SCROLLBAR_HACK2 = true
                  </OnMouseUp>
                  <OnTextChanged>
                    ScrollingEdit_OnTextChanged(LazyRogueFormScrollFrame)
                  </OnTextChanged>
                  <OnCursorChanged>
                    ScrollingEdit_OnCursorChanged(arg1, arg2-10, arg3, arg4)
                  </OnCursorChanged>
                  <OnUpdate>
                    if (LAZYROGUEHELP_SCROLLBAR_HACK2) then
                       ScrollingEdit_OnUpdate(LazyRogueFormScrollFrame)
                    end
                  </OnUpdate>
                  
                </Scripts>
                <FontString inherits="GameFontHighlight"/>
                <Color r=".2" g=".2" b=".2" /> 
              </EditBox>
            </Frames>
          </Frame>
        </ScrollChild>
        <Scripts>
          <OnClick>
            LazyRogueFormEditFrameForm:SetFocus()
          </OnClick>
        </Scripts>
      </ScrollFrame>            
      

      <EditBox name="$parentFormName" letters="24" resizable="true" enableMouse="true">
        <Size>
          <AbsDimension x="150" y="25"/>
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
            <Offset>
              <AbsDimension x="110" y="-40"/>
            </Offset>
          </Anchor>
        </Anchors>

        <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground"
                  edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true" alpha="1.0">
          <EdgeSize>
            <AbsValue val="4"/>
          </EdgeSize>
          <TileSize>
            <AbsValue val="4"/>
          </TileSize>
          <BackgroundInsets>
            <AbsInset left="0" right="0" top="0" bottom="0"/>
          </BackgroundInsets>
        </Backdrop>

        <Scripts>
          <OnEscapePressed>
            HideUIPanel(LazyRogueFormEditFrame)
            HideUIPanel(LazyRogueFormHelp)
          </OnEscapePressed>
          <OnEnterPressed>
            HideUIPanel(LazyRogueFormEditFrame)
            HideUIPanel(LazyRogueFormHelp)
          </OnEnterPressed>
          <OnTabPressed>
            LazyRogueFormEditFrameForm:SetFocus()
          </OnTabPressed>
          <OnClick>
            this:SetFocus()
          </OnClick>
        </Scripts>
        <FontString inherits="GameFontHighlight"/>
        <Color r=".2" g=".2" b=".2" /> 
      </EditBox>


      <Button name="$parentCloseButton" inherits="UIPanelCloseButton">
        <Anchors>
          <Anchor point="TOPRIGHT">
            <Offset>
              <AbsDimension x="-5" y="-5"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnClick>
            HideUIPanel(LazyRogueFormEditFrame)
            HideUIPanel(LazyRogueFormHelp)
          </OnClick>
        </Scripts>
      </Button>

      <Button name="$parentHelpButton" inherits="GameMenuButtonTemplate" text="Help">
        <Size>
          <AbsDimension x="100" y="25"/>
        </Size>
        <Anchors>
          <Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT">
            <Offset>
              <AbsDimension x="10" y="10"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnClick>
            if (LazyRogueFormHelp:IsVisible()) then
               LazyRogueFormHelp:Hide()
            else
               LazyRogueFormHelp:Show()
            end
          </OnClick>
        </Scripts>
      </Button>

      <Button name="$parentCancelButton" inherits="GameMenuButtonTemplate" text="Cancel">
        <Size>
          <AbsDimension x="100" y="25"/>
        </Size>
        <Anchors>
          <Anchor point="BOTTOMRIGHT">
            <Offset>
              <AbsDimension x="-10" y="10"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnClick>
            lazyr.lreb.cancelEdit = true
            HideUIPanel(LazyRogueFormEditFrame)
            HideUIPanel(LazyRogueFormHelp)
          </OnClick>
        </Scripts>
      </Button>

      <Button name="$parentOkayButton" inherits="GameMenuButtonTemplate" text="Okay">
        <Size>
          <AbsDimension x="100" y="25"/>
        </Size>
        <Anchors>
          <Anchor point="RIGHT" relativeTo="$parentCancelButton" relativePoint="LEFT">
            <Offset>
              <AbsDimension x="0" y="0"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnClick>
            HideUIPanel(LazyRogueFormEditFrame)
            HideUIPanel(LazyRogueFormHelp)
          </OnClick>
        </Scripts>
      </Button>

    </Frames>

    <Scripts>
      <OnShow>
        lazyr.lreb.OnShow()
      </OnShow>
      <OnHide>
        lazyr.lreb.OnHide()
      </OnHide>
      <OnLoad>
        this:RegisterForDrag("LeftButton")
      </OnLoad>
      <OnDragStart>
        this:StartMoving()
      </OnDragStart>
      <OnDragStop>
        this:StopMovingOrSizing()
      </OnDragStop>
      <OnMouseUp>
        this:StopMovingOrSizing()
      </OnMouseUp>
    </Scripts>

  </Frame>

  <Frame name="LazyRogueFormHelp" enableMouse="true" movable="true" parent="UIParent" hidden="true">
    <Size>
      <AbsDimension x="400" y="480"/>
    </Size>
    <Anchors>
      <Anchor point="LEFT"/>
      <Offset>
        <AbsDimension x="25" y="0"/>
      </Offset>
    </Anchors>

    <Backdrop name="$parentBackdrop" bgFile="Interface\TutorialFrame\TutorialFrameBackground"
              edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
      <EdgeSize>
        <AbsValue val="32"/>
      </EdgeSize>
      <TileSize>
        <AbsValue val="32"/>
      </TileSize>
      <BackgroundInsets>
        <AbsInset left="5" right="5" top="5" bottom="5"/>
      </BackgroundInsets>
    </Backdrop>

    <Scripts>
      <OnLoad>
        this:RegisterForDrag("LeftButton")
      </OnLoad>
      <OnDragStart>
        this:StartMoving()
      </OnDragStart>
      <OnDragStop>
        this:StopMovingOrSizing()
      </OnDragStop>
      <OnMouseUp>
        this:StopMovingOrSizing()
      </OnMouseUp>
    </Scripts>

    <Layers>
      <Layer level="BACKGROUND">
        <FontString name="$parentTitle" inherits="GameFontHighlightLarge" justifyH="CENTER" text="LazyRogue Help">
          <Size>
            <AbsDimension x="150" y="18"/>
          </Size>
          <Anchors>
            <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
              <Offset>
                <AbsDimension x="20" y="-20"/>
              </Offset>
            </Anchor>
          </Anchors>
        </FontString>
      </Layer>
    </Layers>

    <Frames>
      <Button name="$parentCloseButton" inherits="UIPanelCloseButton">
        <Anchors>
          <Anchor point="TOPRIGHT">
            <Offset>
              <AbsDimension x="-4" y="-4"/>
            </Offset>
          </Anchor>
        </Anchors>
        <Scripts>
          <OnClick>
            HideUIPanel(LazyRogueFormHelp)
          </OnClick>
        </Scripts>
      </Button>

      <ScrollFrame name="$parentScrollFrame" inherits="UIPanelScrollFrameTemplate">
        <Size>
          <AbsDimension x="360" y="420"/>
        </Size>
        <Anchors>
          <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
            <Offset>
              <AbsDimension x="10" y="-50"/>
            </Offset>
          </Anchor>
        </Anchors>
        
        <ScrollChild>
          <Frame name="$parentScrollChild">
            <Size>
              <AbsDimension x="360" y="420"/>
            </Size>
            <Anchors>
              <Anchor point="TOPLEFT">
                <Offset>
                  <AbsDimension x="0" y="0"/>
                </Offset>
              </Anchor>
            </Anchors>
            
            <Frames>
              <EditBox name="$parentText" letters="4000" multiLine="true" enableMouse="true" autoFocus="false">
                <Size>
                  <AbsDimension x="340" y="420"/>
                </Size>
                <Anchors>
                  <Anchor point="TOPLEFT">
                    <Offset>
                      <AbsDimension x="10" y="-10"/>
                    </Offset>
                  </Anchor>
                </Anchors>
                <Scripts>
                  <OnShow>
                    lazyr.PopulateHelpText()
                    LAZYROGUEHELP_SCROLLBAR_HACK = false
                  </OnShow>
                  <OnEscapePressed>
                    HideUIPanel(LazyRogueFormHelp)
                  </OnEscapePressed>
                  <OnMouseUp>
                    LAZYROGUEHELP_SCROLLBAR_HACK = true
                  </OnMouseUp>
                  <OnTextChanged>
                    ScrollingEdit_OnTextChanged(LazyRogueFormHelpScrollFrame)
                  </OnTextChanged>
                  <OnCursorChanged>
                    ScrollingEdit_OnCursorChanged(arg1, arg2-10, arg3, arg4)
                  </OnCursorChanged>
                  <OnUpdate>
                    if (LAZYROGUEHELP_SCROLLBAR_HACK) then
                       ScrollingEdit_OnUpdate(LazyRogueFormHelpScrollFrame)
                    end
                  </OnUpdate>
                </Scripts>
                <FontString inherits="GameFontHighlight"/>
              </EditBox>
            </Frames>
            <Scripts>
              <OnMouseUp>
                LazyRogueFormHelpScrollFrameScrollChildText:SetFocus()
              </OnMouseUp>
            </Scripts>
          </Frame>
        </ScrollChild>
      </ScrollFrame>            

    </Frames>

  </Frame>

</Ui>