diff Devian.xml @ 98:33bc8baba858

start of a lot of v3 groundwork based on better knowledge of the addon interface: - use of mixin as a lexical center for generated frames - removal of unfinished segments
author Nenue
date Wed, 26 Oct 2016 10:17:43 -0400
parents f6fae1a4c66c
children 7d94df3804a7
line wrap: on
line diff
--- a/Devian.xml	Tue Oct 25 12:35:12 2016 -0400
+++ b/Devian.xml	Wed Oct 26 10:17:43 2016 -0400
@@ -1,16 +1,17 @@
 <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">
   <!--@no-lib-strip@-->
-  <Script file="Libs\LibStub\LibStub.lua" />
-  <Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
-  <Include file="Libs\AceConsole-3.0\Console-3.0.xml" />
   <!--@end-no-lib-strip@-->
 
+  <Script file="Devian.lua" />
 
-  <Texture virtual="true" name="DevianBorder" setAllPoints="false">
-    <Color r="1" g="0" b="0" a="1" />
-    <Size x="2" y="2" />
-  </Texture>
+  <Frame name="Devian" mixin="DevianCore" parent="UIParent">
+      <Scripts>
+        <OnLoad method="OnLoad" />
+        <OnEvent method="OnEvent" />
+      </Scripts>
+  </Frame>
+
 
 
   <Texture virtual="true" name="DevianHeader" alphaMode="BLEND">
@@ -48,216 +49,12 @@
     </Scripts>
   </Button>
 
-  <Font name="DevianDockHeader" font="Fonts\ARIALN.TTF" outline="NORMAL" virtual="true" height="14" />
 
-  <Font name="DevianText" font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" outline="NORMAL" virtual="true">
-    <FontHeight>
-      <AbsValue val="13" />
-    </FontHeight>
+  <Font name="DevianText" font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" height="13" justifyH="LEFT" outline="NORMAL" virtual="true">
     <Color r="1" g="1" b="1" a="1" />
   </Font>
 
-  <Frame name="DevianDDMenu" virtual="true" inherits="UIDropDownMenuTemplate" id="1">
-    <Scripts>
-      <OnLoad>
-        </OnLoad>
-    </Scripts>
-  </Frame>
 
-  <ScrollingMessageFrame
-      name="DevianBuffer"
-      maxLines="500"
-      fade="false"
-      displayduration="2147483647"
-      insertMode="BOTTOM"
-      virtual="true">
-    <Anchors>
-      <Anchor point="TOPLEFT" y="-20" />
-      <Anchor point="BOTTOMRIGHT" />
-    </Anchors>
-    <FontString inherits="DevianFont" wordwrap="true"
-                 justifyH="LEFT"
-                 indented="true"
-                 setAllPoints="true"
-                  parentArray="_msg">
-      <FontHeight>
-        <AbsValue val="13"/>
-      </FontHeight>
-    </FontString>
-
-    <Layers>
-      <Layer level="ARTWORK">
-        <Texture name="$parentBackdrop" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND">
-          <Color r="1" g="1" b="1" a="1"/>
-          <Gradient orientation="VERTICAL">
-            <MinColor r="0" g="0" b="0" a="0.7"/>
-            <MaxColor r="0" g="0" b="0" a="0.3"/>
-          </Gradient>
-        </Texture>
-      </Layer>
-      <Layer level="OVERLAY">
-        <Texture name="DevianGripperRight" file="Interface\Addons\Devian\corner.blp" parentKey="grip" strata="HIGH" alphaMode="ADD">
-          <Anchors>
-            <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
-          </Anchors>
-          <Size x="18" y="18" />
-          <Color r="0.4" g="0.4" b="0.4" a="1"/>
-          <Gradient orientation="VERTICAL">
-            <MaxColor r="0.9" g="0.9" b="0.9" a="1"/>
-            <MinColor r="0.4" g="0.4" b="0.4" a="1"/>
-          </Gradient>
-        </Texture>
-      </Layer>
-    </Layers>
-  </ScrollingMessageFrame>
-
-  <Frame
-      name="DevianConsole"
-      parent="UIParent"
-      enableMouse="true"
-      enableMouseWheel="true"
-      clampedToScreen="true"
-      movable="true"
-      resizable="true"
-      toplevel="true"
-      hidden="true"
-      virtual="true">
-    <ResizeBounds>
-      <minResize x="200" y="20" />
-      <maxResize x="1920" y="1200" />
-    </ResizeBounds>
-    <Scripts>
-      <OnShow>
-        self.title:SetText(self.index..' '.. self.signature)
-      </OnShow>
-      <OnMouseWheel>
-        local up =  delta > 0
-        if IsControlKeyDown() then
-          if up then self.out:ScrollToTop()
-          else self.out:ScrollToBottom() end
-        elseif IsShiftKeyDown() then
-          if up then self.out:PageUp()
-          else self.out:PageDown() end
-        else
-          if up then self.out:ScrollUp()
-          else self.out:ScrollDown() end
-        end
-      </OnMouseWheel>
-    </Scripts>
-    <Layers>
-      <Layer level="OVERLAY">
-        <Texture parentKey="header" inherits="DevianHeader">
-          <Anchors>
-            <Anchor point="TOPLEFT" />
-            <Anchor point="TOPRIGHT" />
-            <Size y="20" />
-          </Anchors>
-        </Texture>
-        <FontString parentKey="title" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
-                    justifyH="LEFT"
-                    indented="true">
-          <Anchors>
-            <Anchor point="TOPLEFT" x="4" y="0" />
-          </Anchors>
-          <Size y="20" />
-          <FontHeight>
-            <AbsValue val="12"/>
-          </FontHeight>
-        </FontString>
-      </Layer>
-      <Layer level="BORDER">
-        <Texture name="DevBorderUR" parentArray="border" parentkey="topright" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="BOTTOMLEFT" relativePoint="TOPRIGHT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderU" parentArray="border" parentKey="top" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPLEFT"  y="2" />
-            <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderUL" parentArray="border" parentKey="topleft" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="BOTTOMRIGHT" parentArray="border" relativePoint="TOPLEFT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderL" parentArray="border" parentKey="left" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPLEFT"  x="-2" />
-            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderBL" parentArray="border" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPRIGHT" relativePoint="BOTTOMLEFT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderB" parentArray="border" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" />
-            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" y="-2" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderBR" parentArray="border" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" />
-          </Anchors>
-        </Texture>
-        <Texture name="DevBorderR" parentArray="border" parentKey="right" inherits="DevianBorder">
-          <Anchors>
-            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" />
-            <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="2" />
-          </Anchors>
-        </Texture>
-      </Layer>
-    </Layers>
-    <Frames>
-      <Button name="$parentMenuButton"  parentKey="dropmenu" inherits="DevianDDButton" enableMouse="true">
-        <Anchors>
-          <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="0" />
-        </Anchors>
-      </Button>
-      <Frame name="$parentDDMenu" parentKey="menuFrame" inherits="DevianDDMenu" />
-      <ScrollingMessageFrame parentKey="out" inherits="DevianBuffer" />
-    </Frames>
-    <Animations>
-      <AnimationGroup name="moveFade" parentKey="moveFade" setToFinalAlpha="true" ignoreFramerateThrottle="true">
-        <Alpha parentKey="alphaOut" duration="0.5" order="1" />
-        <Translation parentKey="translateOut" duration="0.5" order="1" />
-      </AnimationGroup>
-    </Animations>
-  </Frame>
-
-  <Frame
-      name="DevianDock"
-      parent="UIParent"
-      enableMouse="true"
-      alpha="0.1"
-      hidden="true"
-      frameStrata="LOW">
-    <Scripts>
-      <OnMouseWheel>
-        Devian.Dock_OnMouseWheel(self, delta)
-      </OnMouseWheel>
-    </Scripts>
-    <Size x="32" y="20" />
-    <Layers>
-      <Layer level="ARTWORK">
-        <Texture name="$parentBar" parent="DevianDock" setAllPoints="true" parentKey="caption" alphaMode="BLEND">
-          <Color r="1" g="1" b="1" a="1" />
-          <Gradient orientation="VERTICAL">
-            <MaxColor r="0.15" g=".15" b="0.15" a="0.4" />
-            <MinColor r="0" g="0" b="0" a="0" />
-          </Gradient>
-        </Texture>
-
-      </Layer>
-      <Layer level="OVERLAY">
-
-      </Layer>
-    </Layers>
-  </Frame>
   <Button name="DevianExecButton" parent="UIParent" hidden="true">
     <Size x="32" y="32" />
     <Anchors>