annotate Devian.xml @ 13:080dfa4990fb

necessary abstractions for running multiple console buffers in place message prefix can act as a channel selector when tagged in savedvars more frame vars defined in the XML XML parentKey names organized
author Nenue
date Sat, 19 Dec 2015 07:59:12 -0500
parents 65fcb81f4e0a
children 5254d1ba6013
rev   line source
Nenue@4 1 <Ui>
Nenue@13 2 <Frame
Nenue@13 3 name="DevianConsole"
Nenue@13 4 parent="UIParent"
Nenue@13 5 enableMouse="true"
Nenue@13 6 enableMouseWheel="true"
Nenue@13 7 clampedToScreen="true"
Nenue@13 8 movable="true"
Nenue@13 9 resizable="true"
Nenue@13 10 toplevel="true"
Nenue@13 11 hidden="true"
Nenue@13 12 virtual="true">
Nenue@4 13 <KeyValues>
Nenue@13 14 <KeyValue key="index" type="number" value="1" />
Nenue@13 15 <KeyValue key="name" value="Devian" />
Nenue@4 16 <KeyValue key="format" value="Devian [%s]" />
Nenue@4 17 </KeyValues>
Nenue@5 18 <ResizeBounds>
Nenue@5 19 <minResize x="200" y="20" />
Nenue@5 20 <maxResize x="1920" y="1200" />
Nenue@5 21 </ResizeBounds>
Nenue@4 22 <Scripts>
Nenue@4 23 <OnMouseDown>
Nenue@4 24 if button == 'LeftButton' then
Nenue@13 25 if self.grip:IsMouseOver() then
Nenue@4 26 return self:StartSizing()
Nenue@4 27 end
Nenue@4 28 return self:StartMoving()
Nenue@4 29 end
Nenue@4 30 </OnMouseDown>
Nenue@4 31 <OnMouseUp>
Nenue@4 32 if button == 'RightButton' then
Nenue@13 33 return self:MinMax()
Nenue@4 34 end
Nenue@4 35 self:StopMovingOrSizing()
Nenue@13 36 self:Save()
Nenue@4 37 </OnMouseUp>
Nenue@4 38 <OnMouseWheel>
Nenue@4 39 local up = delta > 0
Nenue@4 40 if IsControlKeyDown() then
Nenue@13 41 if up then self.out:ScrollToTop()
Nenue@13 42 else self.out:ScrollToBottom() end
Nenue@4 43 elseif IsShiftKeyDown() then
Nenue@13 44 if up then self.out:PageUp()
Nenue@13 45 else self.out:PageDown() end
Nenue@4 46 else
Nenue@13 47 if up then self.out:ScrollUp()
Nenue@13 48 else self.out:ScrollDown() end
Nenue@4 49 end
Nenue@4 50 </OnMouseWheel>
Nenue@4 51 <OnUpdate>
Nenue@4 52 if not self.throttle then
Nenue@4 53 self.throttle = GetTime()
Nenue@4 54 elseif (GetTime()-self.throttle &lt; 0.2) then
Nenue@4 55 return
Nenue@4 56 else
Nenue@4 57 self.throttle = GetTime()
Nenue@4 58 end
Nenue@4 59
Nenue@13 60 self.header:SetText(string.format(self.format, GetTime()))
Nenue@4 61 </OnUpdate>
Nenue@4 62 </Scripts>
Nenue@4 63
Nenue@4 64 <Frames>
Nenue@13 65 <ScrollingMessageFrame
Nenue@13 66 name="$parentScrollFrame"
Nenue@13 67 parentkey="out"
Nenue@13 68 maxLines="500"
Nenue@13 69 fade="false"
Nenue@13 70 displayduration="2147483647"
Nenue@13 71 insertMode="BOTTOM">
Nenue@4 72 <Anchors>
Nenue@4 73 <Anchor point="TOPLEFT" y="-20" />
Nenue@4 74 <Anchor point="BOTTOMRIGHT" />
Nenue@4 75 </Anchors>
Nenue@5 76 <FontString font="Interface\Addons\Devian\font\SourceCodePro-Regular.ttf" wordwrap="true"
Nenue@4 77 justifyH="LEFT"
Nenue@4 78 indented="true"
Nenue@4 79 setAllPoints="true">
Nenue@4 80 <FontHeight>
Nenue@5 81 <AbsValue val="13"/>
Nenue@4 82 </FontHeight>
Nenue@4 83 </FontString>
Nenue@4 84
Nenue@4 85 <Layers>
Nenue@4 86 <Layer level="BACKGROUND">
Nenue@13 87 <Texture name="$parentbg" parentKey="backdrop" setAllPoints="true" alphaMode="BLEND">
Nenue@4 88 <Color r="1" g="1" b="1" a="1"/>
Nenue@7 89 <Gradient orientation="VERTICAL">
Nenue@7 90 <MinColor r="0" g="0" b="0" a="0.7"/>
Nenue@7 91 <MaxColor r="0" g="0" b="0" a="0.3"/>
Nenue@4 92 </Gradient>
Nenue@4 93 </Texture>
Nenue@4 94 </Layer>
Nenue@4 95 </Layers>
Nenue@4 96 </ScrollingMessageFrame>
Nenue@4 97 </Frames>
Nenue@4 98 <Layers>
Nenue@13 99 <Layer level="BORDER">
Nenue@13 100 <Texture parentKey="titlebar" alphaMode="BLEND">
Nenue@4 101 <Anchors>
Nenue@4 102 <Anchor point="TOPLEFT" />
Nenue@4 103 <Anchor point="TOPRIGHT" />
Nenue@4 104 </Anchors>
Nenue@4 105 <Size y="20" />
Nenue@4 106 <Color r="0.3" g="0.3" b="0.3" a="1" />
Nenue@11 107 <Gradient orientation="VERTICAL">
Nenue@11 108 <MinColor r="0" g="0" b="0" a="0.7"/>
Nenue@11 109 <MaxColor r="0.3" g="0.3" b="0.3" a="0.7"/>
Nenue@11 110 </Gradient>
Nenue@4 111 </Texture>
Nenue@13 112 <FontString parentKey="header" font="Interface\Addons\Devian\font\SourceCodePro-Bold.ttf" wordwrap="true"
Nenue@4 113 justifyH="LEFT"
Nenue@4 114 indented="true">
Nenue@4 115 <Anchors>
Nenue@4 116 <Anchor point="TOPLEFT" x="4" y="-2" />
Nenue@4 117 <Anchor point="TOPRIGHT" x="-4" />
Nenue@4 118 </Anchors>
Nenue@4 119 <Size y="20" />
Nenue@4 120 <FontHeight>
Nenue@4 121 <AbsValue val="12"/>
Nenue@4 122 </FontHeight>
Nenue@4 123 </FontString>
Nenue@4 124 </Layer>
Nenue@13 125 <Layer level="OVERLAY">
Nenue@13 126 <Texture parentKey="grip" strata="HIGH" alphaMode="ADD">
Nenue@4 127 <Anchors>
Nenue@13 128 <Anchor point="BOTTOMRIGHT" x="-1" y="1" />
Nenue@4 129 </Anchors>
Nenue@13 130 <Size x="18" y="18" />
Nenue@13 131 <Color r="1" g="1" b="1" a="1"/>
Nenue@13 132 <Gradient orientation="VERTICAL">
Nenue@13 133 <MaxColor r="0.2" g="0.2" b="0.2" a="1"/>
Nenue@13 134 <MinColor r="0.5" g="0.5" b="0.5" a="1"/>
Nenue@13 135 </Gradient>
Nenue@4 136 </Texture>
Nenue@4 137 </Layer>
Nenue@4 138 </Layers>
Nenue@4 139 </Frame>
Nenue@4 140 </Ui>