Quantcast

Change the resizing so the code pane will grow instead of the interpreter output

James Whitehead II [04-29-08 - 09:33]
Change the resizing so the code pane will grow instead of the interpreter output
Filename
WowLua.lua
WowLua.xml
diff --git a/WowLua.lua b/WowLua.lua
index 507380d..298f6a7 100644
--- a/WowLua.lua
+++ b/WowLua.lua
@@ -428,37 +428,21 @@ function WowLua.OnSizeChanged(self)
 		bg4:Hide()
 	end

-	if WowLuaFrameResizeBar then
-		-- Don't move too high, or too low
+	if WowLuaFrameResizeBar and false then
 		local parent = WowLuaFrameResizeBar:GetParent()
-		local top = parent:GetTop()
-		local bot = parent:GetBottom()
-		local maxpoint = (top - bot - 80) * -1
-
-		-- This is the current point, actually
-
+		local cursorY = select(2, GetCursorPosition())
 		local newPoint = select(5, WowLuaFrameResizeBar:GetPoint())
-
-		-- Don't move past the edges of the frame
-		if newPoint < maxpoint then
-			newPoint = maxpoint
-		elseif newPoint > -125 then
-			newPoint = -125
+		local maxPoint = parent:GetHeight() - 175;
+
+		if newPoint < 100 then
+			newPoint = 100
+		elseif newPoint > maxPoint then
+			newPoint = maxPoint
 		end
-
-		WowLuaFrameResizeBar:ClearAllPoints()
-		WowLuaFrameResizeBar:SetPoint("TOPLEFT", 14, newPoint)
-		WowLuaFrameResizeBar:SetPoint("TOPRIGHT", 0, newPoint)

-		--[[
-		-- Get our bottom, and the bottom of the frame
-		local sbot,pbot = WowLuaFrameResizeBar:GetBottom(), parent:GetBottom()
-		-- Diff
-		local diff = pbot - sbot
-		local numLines = math.abs((diff / 14) + 1.3)
-		if numLines <= 1 then numLines = 1 end
-		WowLuaFrameOutput:SetMaxLines(numLines)
-		--]]
+		WowLuaFrameResizeBar:ClearAllPoints()
+		WowLuaFrameResizeBar:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", 14, newPoint)
+		WowLuaFrameResizeBar:SetPoint("TOPRIGHT", parent, "BOTTOMRIGHT", 0, newPoint)
 	end
 end

@@ -473,35 +457,20 @@ function WowLua.ResizeBar_OnMouseUp(self, button)
 end

 function WowLua.ResizeBar_OnUpdate(self, elapsed)
+	local parent = self:GetParent()
 	local cursorY = select(2, GetCursorPosition())
 	local newPoint = self.anchorStart - (self.cursorStart - cursorY)/self:GetEffectiveScale()
+	local maxPoint = parent:GetHeight() - 175;

-	-- Don't move too high, or too low
-	local parent = self:GetParent()
-	local top = parent:GetTop()
-	local bot = parent:GetBottom()
-	local maxpoint = (top - bot - 80) * -1
-
-	-- Don't move past the edges of the frame
-	if newPoint < maxpoint then
-		newPoint = maxpoint
-	elseif newPoint > -125 then
-		newPoint = -125
+	if newPoint < 100 then
+		newPoint = 100
+	elseif newPoint > maxPoint then
+		newPoint = maxPoint
 	end
-
+
 	self:ClearAllPoints()
-	self:SetPoint("TOPLEFT", 14, newPoint)
-	self:SetPoint("TOPRIGHT", 0, newPoint)
-
-	--[[
-	-- Get our bottom, and the bottom of the frame
-	local sbot,pbot = self:GetBottom(), parent:GetBottom()
-	-- Diff
-	local diff = pbot - sbot
-	local numLines = math.abs((diff / 14) + 1.3)
-	if numLines <= 1 then numLines = 1 end
-	WowLuaFrameOutput:SetMaxLines(numLines)
-	--]]
+	self:SetPoint("TOPLEFT", parent, "BOTTOMLEFT", 14, newPoint)
+	self:SetPoint("TOPRIGHT", parent, "BOTTOMRIGHT", 0, newPoint)
 end

 function WowLua.OnVerticalScroll(scrollFrame)
diff --git a/WowLua.xml b/WowLua.xml
index 95b23f2..06deae6 100644
--- a/WowLua.xml
+++ b/WowLua.xml
@@ -1,617 +1,617 @@
 <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/
-../UI.xsd">
-  <Button name="WowLuaButtonTemplate" virtual="true">
-	<Size x="25" y="25"/>
-	<Scripts>
-	  <OnClick>
-		WowLua.Button_OnClick(self, button)
-	  </OnClick>
-	  <OnEnter>
-		WowLua.Button_OnEnter(self)
-	  </OnEnter>
-	  <OnLeave>
-		WowLua.Button_OnLeave(self)
-	  </OnLeave>
-	</Scripts>
-  </Button>
-
-  <Frame name="WowLuaOpenDropdown" inherits="UIDropDownMenuTemplate" frameStrata="FULLSCREEN_DIALOG">
-    <Scripts>
-      <OnLoad>
-        WowLua.OpenDropDownOnLoad(self)
-      </OnLoad>
-    </Scripts>
-  </Frame>
-
-  <Frame name="WowLuaFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" resizable="true" frameStrata="MEDIUM">
-	<Size x="640" y="512"/>
-	<Anchors>
-	  <Anchor point="CENTER"/>
-	</Anchors>
-	<ResizeBounds>
-	  <minResize x="365" y="300"/>
-	</ResizeBounds>
-	<Layers>
-	  <Layer level="BACKGROUND">
-		<Texture name="$parentBG1" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
-		  <Size x="256" y="64"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT">
-			  <Offset x="13" y="-18"/>
-			</Anchor>
-		  </Anchors>
-		</Texture>
-		<Texture name="$parentBG2" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
-		  <Size x="256" y="64"/>
-		  <Anchors>
-			<Anchor point="LEFT" relativeTo="$parentBG1" relativePoint="RIGHT"/>
-		  </Anchors>
-		</Texture>
-		<Texture name="$parentBG3" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
-		  <Size x="256" y="64"/>
-		  <Anchors>
-			<Anchor point="LEFT" relativeTo="$parentBG2" relativePoint="RIGHT"/>
-		  </Anchors>
-		</Texture>
-		<Texture name="$parentBG4" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
-		  <Size x="256" y="64"/>
-		  <Anchors>
-			<Anchor point="LEFT" relativeTo="$parentBG3" relativePoint="RIGHT"/>
-		  </Anchors>
-		</Texture>
-	  </Layer>
-	  <Layer level="ARTWORK">
-		<Texture name="$parentTopLeft" file="Interface\AddOns\WowLua\images\LightHeaded\TopLeft">
-		  <Size x="128" y="256"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT"/>
-		  </Anchors>
-		</Texture>
-		<Texture name="$parentTopRight" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopRight">
-		  <Size x="140" y="242"/>
-		  <Anchors>
-			<Anchor point="TOPRIGHT">
-			  <Offset x="0" y="-14"/>
-			</Anchor>
-		  </Anchors>
-		  <TexCoords left="0" right="0.546875" top="0" bottom="0.9453125"/>
-		</Texture>
-		<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-Top">
-		  <Size y="242"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT">
-			  <Offset x="0" y="-14"/>
-			</Anchor>
-			<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="TOPLEFT">
-			  <Offset x="0" y="0"/>
-			</Anchor>
-		  </Anchors>
-		  <TexCoords left="0.3" right="0.35" top="0" bottom="0.9453125"/>
-		</Texture>
-		<Texture name="$parentBotLeft" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-BotLeft">
-		  <Size x="128" y="168"/>
-		  <Anchors>
-			<Anchor point="BOTTOMLEFT">
-			  <Offset x="8" y="0"/>
-			</Anchor>
-		  </Anchors>
-		  <TexCoords left="0" right="1" top="0" bottom="0.65625"/>
-		</Texture>
-		<Texture name="$parentBotRight" file="Interface\WorldStateframe\WorldStateFinalScoreFrame-BotRight">
-		  <Size x="140" y="168"/>
-		  <Anchors>
-			<Anchor point="BOTTOMRIGHT"/>
-		  </Anchors>
-		  <TexCoords left="0" right="0.546875" top="0" bottom="0.65625"/>
-		</Texture>
-		<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-BotLeft">
-		  <Size y="168"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT" relativeTo="$parentBotLeft" relativePoint="TOPRIGHT"/>
-			<Anchor point="TOPRIGHT" relativeTo="$parentBotRight" relativePoint="TOPLEFT"/>
-		  </Anchors>
-		  <TexCoords left="0.25" right="0.5" top="0" bottom="0.65625"/>
-		</Texture>
-		<Texture name="$parentMidLeft" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopLeft">
-		  <Size x="128" y="10"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT">
-			  <Offset x="8" y="0"/>
-			</Anchor>
-			<Anchor point="BOTTOMLEFT" relativeTo="$parentBotLeft" relativePoint="TOPLEFT">
-			  <Offset x="8" y="0"/>
-			</Anchor>
-		  </Anchors>
-		  <TexCoords left="0" right="1" top="0.9375" bottom="1"/>
-		</Texture>
-		<Texture name="$parentMidRight" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopRight">
-		  <Size x="140" y="10"/>
-		  <Anchors>
-			<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMRIGHT"/>
-			<Anchor point="BOTTOMRIGHT" relativeTo="$parentBotRight" relativePoint="TOPRIGHT"/>
-		  </Anchors>
-		  <TexCoords left="0" right="0.546875" top="0.9375" bottom="1"/>
-		</Texture>
-		<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopLeft">
-		  <Anchors>
-			<Anchor point="TOPLEFT" relativeTo="$parentMidLeft" relativePoint="TOPRIGHT"/>
-			<Anchor point="BOTTOMRIGHT" relativeTo="$parentMidRight" relativePoint="BOTTOMLEFT"/>
-		  </Anchors>
-		  <TexCoords left="0.25" right="0.5" top="0.25" bottom="0.5"/>
-		</Texture>
-		<FontString name="$parentTitle" inherits="GameFontNormal" text="WowLua Editor">
-		  <Anchors>
-			<Anchor point="TOP">
-			  <Offset x="15" y="-19"/>
-			</Anchor>
-		  </Anchors>
-		</FontString>
-	  </Layer>
-	  <Layer level="BORDER">
-		<Texture file="Interface\MacroFrame\MacroFrame-Icon">
-		  <Size x="60" y="60"/>
-		  <Anchors>
-			<Anchor point="TOPLEFT">
-			  <Offset x="7" y="-6"/>
-			</Anchor>
-		  </Anchors>
-		</Texture>
-	  </Layer>
-	</Layers>
-	<Frames>
-	  <Button name="$parentClose" inherits="UIPanelCloseButton">
-		<Anchors>
-		  <Anchor point="TOPRIGHT">
-			<Offset x="5" y="-10"/>
-		  </Anchor>
-		</Anchors>
-	  </Button>
-	  <Button name="$parentDragHeader">
-		<Size y="60"/>
-		<Anchors>
-		  <Anchor point="TOPLEFT">
-			<Offset x="0" y="-13"/>
-		  </Anchor>
-		  <Anchor point="TOPRIGHT">
-			<Offset x="0" y="0"/>
-		  </Anchor>
-		</Anchors>
-      <Frames>
-      	    <Frame name="WowLuaFrameToolbar">
-		  <Size y="30"/>
-		  <Anchors>
-		    <Anchor point="TOPLEFT">
-			  <Offset x="80" y="-26"/>
-		    </Anchor>
-		    <Anchor point="TOPRIGHT">
-			  <Offset x="-5" y="-26"/>
-		    </Anchor>
-		  </Anchors>
-		  <!-- Used for placement
-			   <Layers>
-			   <Layer level="ARTWORK">
-			   <Texture setAllPoints="true">
-			   <Color r="1" g="0.2" b="0.2" a="0.5"/>
-			   </Texture>
-			   </Layer>
-			   </Layers>
-		  -->
-		  <Frames>
-		    <Button name="WowLuaButton_New" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT"/>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\new"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Open" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_New" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\open"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Save_As" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Open" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\save"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Undo" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Save_As" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\undo"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Delete" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Undo" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\delete"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Lock" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Delete" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\padlock"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Previous" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Lock" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\left"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Next" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Previous" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\right"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		    <Button name="WowLuaButton_Run" inherits="WowLuaButtonTemplate">
-			  <Anchors>
-			    <Anchor point="LEFT" relativeTo="WowLuaButton_Next" relativePoint="RIGHT">
-				  <Offset x="5" y="0"/>
-			    </Anchor>
-			  </Anchors>
-			  <NormalTexture file="Interface\AddOns\WowLua\images\icons\run-1"/>
-			  <HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
-		    </Button>
-		  </Frames>
-	    </Frame>
-
-    </Frames>
-		<Scripts>
-		  <OnMouseDown>
-			local parent = self:GetParent()
-			if parent:IsMovable() then
-			parent:StartMoving()
-			end
-		  </OnMouseDown>
-		  <OnMouseUp>
-			local parent = self:GetParent()
-			parent:StopMovingOrSizing()
-		  </OnMouseUp>
-		</Scripts>
-	  </Button>
-	  <Button name="$parentResizeBar">
-		<Size y="16"/>
-		<Anchors>
-		  <Anchor point="TOPLEFT">
-			<Offset x="14" y="-220"/>
-		  </Anchor>
-		  <Anchor point="TOPRIGHT">
-			<Offset x="0" y="-220"/>
-		  </Anchor>
-		</Anchors>
-		<Layers>
-		  <Layer level="BORDER">
-			<Texture name="$parentLeftNub" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
-			  <Size x="75" y="16"/>
-			  <Anchors>
-				<Anchor point="LEFT">
-				  <Offset x="-1"/>
-				</Anchor>
-			  </Anchors>
-			  <TexCoords left="0" right="0.29296875" top="0" bottom="0.25"/>
-			</Texture>
-			<Texture name="$parentRightNub" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
-			  <Size x="75" y="16"/>
-			  <Anchors>
-				<Anchor point="RIGHT">
-				  <Offset x="1"/>
-				</Anchor>
-			  </Anchors>
-			  <TexCoords left="0" right="0.29296875" top="0.25" bottom="0.5"/>
-			</Texture>
-			<Texture name="$parentBar" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
-			  <Size y="16"/>
-			  <Anchors>
-				<Anchor point="LEFT" relativeTo="$parentLeftNub" relativePoint="RIGHT"/>
-				<Anchor point="RIGHT" relativeTo="$parentRightNub" relativePoint="LEFT"/>
-			  </Anchors>
-			  <TexCoords left="0.29296875" right="1.0" top="0" bottom="0.25"/>
-			</Texture>
-		  </Layer>
-		</Layers>
-		<Scripts>
-		  <OnMouseDown>
-			WowLua.ResizeBar_OnMouseDown(self, button)
-		  </OnMouseDown>
-		  <OnMouseUp>
-			WowLua.ResizeBar_OnMouseUp(self, button)
-		  </OnMouseUp>
-		</Scripts>
-	  </Button>
-	  <Button name="$parentResizeCorner">
-		<Size x="16" y="16"/>
-		<Anchors>
-		  <Anchor point="BOTTOMRIGHT">
-			<Offset x="-3" y="3"/>
-		  </Anchor>
-		</Anchors>
+	../UI.xsd">
+	<Button name="WowLuaButtonTemplate" virtual="true">
+		<Size x="25" y="25"/>
 		<Scripts>
-		  <OnMouseDown>
-			self:GetParent():StartSizing()
-		  </OnMouseDown>
-		  <OnLoad>
-			self:GetNormalTexture():SetVertexColor(0.6, 0.6, 0.6)
-		  </OnLoad>
-		  <OnMouseUp>
-			self:GetParent():StopMovingOrSizing()
-			if WowLuaFrameEditBox then
-			WowLuaFrameEditBox:SetWidth(WowLuaFrameEditScrollFrame:GetWidth())
-			end
-		  </OnMouseUp>
-		  <OnHide>
-			self:GetParent():StopMovingOrSizing()
-			if WowLuaFrameEditBox then
-			WowLuaFrameEditBox:SetWidth(WowLuaFrameEditScrollFrame:GetWidth())
-			end
-		  </OnHide>
+			<OnClick>
+				WowLua.Button_OnClick(self, button)
+			</OnClick>
+			<OnEnter>
+				WowLua.Button_OnEnter(self)
+			</OnEnter>
+			<OnLeave>
+				WowLua.Button_OnLeave(self)
+			</OnLeave>
 		</Scripts>
-		<NormalTexture file="Interface\AddOns\WowLua\images\resize"/>
-	  </Button>
-	  <ScrollFrame name="$parentLineNumScrollFrame">
-		<Anchors>
-		  <Anchor point="TOPLEFT">
-			<Offset x="18" y="-74"/>
-		  </Anchor>
-		  <Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPLEFT">
-			<Offset x="30" y="-4"/>
-		  </Anchor>
-		</Anchors>
-		<Layers>
-		  <Layer level="ARTWORK">
-			<Texture setAllPoints="true"><Color r="0.1" g="0.1" b="0.1" a="0.85"/></Texture>
-		  </Layer>
-		</Layers>
-		<!-- Basically copy/pasted from MacroFrame -->
-		<ScrollChild>
-		  <EditBox name="WowLuaFrameLineNumEditBox" multiLine="true" maxLines="9999" letters="4096" nonspacewrap="true" spacing="1" autoFocus="false">
-			<Size>
-			  <AbsDimension x="100" y="100"/>
-			</Size>
-			<Anchors>
-			  <Anchor point="TOPLEFT">
-				<Offset x="20" y="0"/>
-			  </Anchor>
-			  <Anchor point="BOTTOMRIGHT"/>
-			</Anchors>
-			<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
-			  <FontHeight val="14"/>
-			</FontString>
-		  </EditBox>
-		</ScrollChild>
-	  </ScrollFrame>
-	  <ScrollFrame name="$parentEditScrollFrame" inherits="UIPanelScrollFrameTemplate">
-		<Anchors>
-		  <Anchor point="TOPLEFT" relativeTo="$parentLineNumScrollFrame" relativePoint="TOPRIGHT">
-			<Offset x="0" y="0"/>
-		  </Anchor>
-		  <Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPRIGHT">
-			<Offset x="-25" y="-4"/>
-		  </Anchor>
-		</Anchors>
-		<!-- Basically copy/pasted from MacroFrame -->
-		<Scripts>
-		  <OnVerticalScroll>
-			WowLuaFrameLineNumScrollFrame:SetVerticalScroll(offset)
-                        WowLua.OnVerticalScroll(self);
-		  </OnVerticalScroll>
-                  <OnShow>
-                        WowLua.OnVerticalScroll(self);
-                  </OnShow>
-                  <OnLoad>
-                        self.scrollBarHideable = 1;
-                  </OnLoad>
-		</Scripts>
-		<ScrollChild>
-		  <EditBox name="WowLuaFrameEditBox" multiLine="true" nonspacewrap="true" spacing="1" autoFocus="false">
-			<Size>
-			  <AbsDimension x="100" y="100"/>
-			</Size>
-			<Layers>
-				<Layer level="BACKGROUND">
-					<FontString name="$parentLineTest" font="Interface\AddOns\WowLua\fonts\VeraMono.ttf" hidden="true">
-						<Anchor point="TOPLEFT" relativePoint="TOPLEFT"/>
-						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"/>
-						<FontHeight val="14"/>
-					</FontString>
-				</Layer>
-			</Layers>
-			<Anchors>
-			  <Anchor point="TOPLEFT">
-				<Offset x="20" y="0"/>
-			  </Anchor>
-			  <Anchor point="BOTTOMRIGHT"/>
-			</Anchors>
-			<Scripts>
-			  <OnLoad>
-				WowLua.indent.enable(self, nil, 3)
-			  </OnLoad>
-			  <OnEscapePressed>
-				self:ClearFocus();
-			  </OnEscapePressed>
-			  <OnTextChanged>
-				WowLua.highlightNum = nil
-			  </OnTextChanged>
-			  <OnCursorChanged>
-				ScrollingEdit_OnCursorChanged(x,y,w,h)
-				WowLua.UpdateLineNums()
-				WowLuaFrameEditScrollFrameScrollBar:SetValue(WowLuaFrameEditScrollFrame:GetVerticalScroll())
-			  </OnCursorChanged>
-			  <OnUpdate>
-				ScrollingEdit_OnUpdate(WowLuaFrameEditScrollFrame)
-			  </OnUpdate>
-			</Scripts>
-			<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
-			  <FontHeight val="14"/>
-			</FontString>
-		  </EditBox>
-		</ScrollChild>
-	  </ScrollFrame>
-	  <Button name="$parentEditFocusGrabber">
-		<Anchors>
-		  <Anchor point="TOPLEFT">
-			<Offset x="18" y="-72"/>
-		  </Anchor>
-		  <Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPRIGHT">
-			<Offset x="-30" y="0"/>
-		  </Anchor>
-		</Anchors>
+	</Button>
+
+	<Frame name="WowLuaOpenDropdown" inherits="UIDropDownMenuTemplate" frameStrata="FULLSCREEN_DIALOG">
 		<Scripts>
-		  <OnClick>
-			WowLuaFrameEditBox:SetFocus()
-		  </OnClick>
+			<OnLoad>
+				WowLua.OpenDropDownOnLoad(self)
+			</OnLoad>
 		</Scripts>
-	  </Button>
-	  <Frame name="$parentCommand">
-		<Size y="16"/>
+	</Frame>
+
+	<Frame name="WowLuaFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" resizable="true" frameStrata="MEDIUM">
+		<Size x="640" y="512"/>
 		<Anchors>
-		  <Anchor point="BOTTOMLEFT">
-			<Offset x="18" y="3"/>
-		  </Anchor>
-		  <Anchor point="BOTTOMRIGHT">
-			<Offset x="-15" y="0"/>
-		  </Anchor>
+			<Anchor point="CENTER"/>
 		</Anchors>
+		<ResizeBounds>
+			<minResize x="365" y="300"/>
+		</ResizeBounds>
 		<Layers>
-		  <Layer level="BACKGROUND">
-			<Texture>
-			  <Anchors>
-				<Anchor point="TOPLEFT"/>
-				<Anchor point="BOTTOMRIGHT" relativeTo="WowLuaFrameResizeCorner">
-				  <Offset x="-3" y="2"/>
-				</Anchor>
-			  </Anchors>
-			  <Color r="0.1" g="0.1" b="0.1" a="0.85"/>
-			</Texture>
-		  </Layer>
-		  <Layer level="ARTWORK">
-			<FontString name="$parentPrompt" text="&gt; " font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
-			  <Anchors>
-				<Anchor point="LEFT"/>
-			  </Anchors>
-			  <FontHeight val="14"/>
-			</FontString>
-		  </Layer>
+			<Layer level="BACKGROUND">
+				<Texture name="$parentBG1" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
+					<Size x="256" y="64"/>
+					<Anchors>
+						<Anchor point="TOPLEFT">
+							<Offset x="13" y="-18"/>
+						</Anchor>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentBG2" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
+					<Size x="256" y="64"/>
+					<Anchors>
+						<Anchor point="LEFT" relativeTo="$parentBG1" relativePoint="RIGHT"/>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentBG3" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
+					<Size x="256" y="64"/>
+					<Anchors>
+						<Anchor point="LEFT" relativeTo="$parentBG2" relativePoint="RIGHT"/>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentBG4" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopBackground">
+					<Size x="256" y="64"/>
+					<Anchors>
+						<Anchor point="LEFT" relativeTo="$parentBG3" relativePoint="RIGHT"/>
+					</Anchors>
+				</Texture>
+			</Layer>
+			<Layer level="ARTWORK">
+				<Texture name="$parentTopLeft" file="Interface\AddOns\WowLua\images\LightHeaded\TopLeft">
+					<Size x="128" y="256"/>
+					<Anchors>
+						<Anchor point="TOPLEFT"/>
+					</Anchors>
+				</Texture>
+				<Texture name="$parentTopRight" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopRight">
+					<Size x="140" y="242"/>
+					<Anchors>
+						<Anchor point="TOPRIGHT">
+							<Offset x="0" y="-14"/>
+						</Anchor>
+					</Anchors>
+					<TexCoords left="0" right="0.546875" top="0" bottom="0.9453125"/>
+				</Texture>
+				<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-Top">
+					<Size y="242"/>
+					<Anchors>
+						<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT">
+							<Offset x="0" y="-14"/>
+						</Anchor>
+						<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="TOPLEFT">
+							<Offset x="0" y="0"/>
+						</Anchor>
+					</Anchors>
+					<TexCoords left="0.3" right="0.35" top="0" bottom="0.9453125"/>
+				</Texture>
+				<Texture name="$parentBotLeft" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-BotLeft">
+					<Size x="128" y="168"/>
+					<Anchors>
+						<Anchor point="BOTTOMLEFT">
+							<Offset x="8" y="0"/>
+						</Anchor>
+					</Anchors>
+					<TexCoords left="0" right="1" top="0" bottom="0.65625"/>
+				</Texture>
+				<Texture name="$parentBotRight" file="Interface\WorldStateframe\WorldStateFinalScoreFrame-BotRight">
+					<Size x="140" y="168"/>
+					<Anchors>
+						<Anchor point="BOTTOMRIGHT"/>
+					</Anchors>
+					<TexCoords left="0" right="0.546875" top="0" bottom="0.65625"/>
+				</Texture>
+				<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-BotLeft">
+					<Size y="168"/>
+					<Anchors>
+						<Anchor point="TOPLEFT" relativeTo="$parentBotLeft" relativePoint="TOPRIGHT"/>
+						<Anchor point="TOPRIGHT" relativeTo="$parentBotRight" relativePoint="TOPLEFT"/>
+					</Anchors>
+					<TexCoords left="0.25" right="0.5" top="0" bottom="0.65625"/>
+				</Texture>
+				<Texture name="$parentMidLeft" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopLeft">
+					<Size x="128" y="10"/>
+					<Anchors>
+						<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT">
+							<Offset x="8" y="0"/>
+						</Anchor>
+						<Anchor point="BOTTOMLEFT" relativeTo="$parentBotLeft" relativePoint="TOPLEFT">
+							<Offset x="8" y="0"/>
+						</Anchor>
+					</Anchors>
+					<TexCoords left="0" right="1" top="0.9375" bottom="1"/>
+				</Texture>
+				<Texture name="$parentMidRight" file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopRight">
+					<Size x="140" y="10"/>
+					<Anchors>
+						<Anchor point="TOPRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMRIGHT"/>
+						<Anchor point="BOTTOMRIGHT" relativeTo="$parentBotRight" relativePoint="TOPRIGHT"/>
+					</Anchors>
+					<TexCoords left="0" right="0.546875" top="0.9375" bottom="1"/>
+				</Texture>
+				<Texture file="Interface\WorldStateFrame\WorldStateFinalScoreFrame-TopLeft">
+					<Anchors>
+						<Anchor point="TOPLEFT" relativeTo="$parentMidLeft" relativePoint="TOPRIGHT"/>
+						<Anchor point="BOTTOMRIGHT" relativeTo="$parentMidRight" relativePoint="BOTTOMLEFT"/>
+					</Anchors>
+					<TexCoords left="0.25" right="0.5" top="0.25" bottom="0.5"/>
+				</Texture>
+				<FontString name="$parentTitle" inherits="GameFontNormal" text="WowLua Editor">
+					<Anchors>
+						<Anchor point="TOP">
+							<Offset x="15" y="-19"/>
+						</Anchor>
+					</Anchors>
+				</FontString>
+			</Layer>
+			<Layer level="BORDER">
+				<Texture file="Interface\MacroFrame\MacroFrame-Icon">
+					<Size x="60" y="60"/>
+					<Anchors>
+						<Anchor point="TOPLEFT">
+							<Offset x="7" y="-6"/>
+						</Anchor>
+					</Anchors>
+				</Texture>
+			</Layer>
 		</Layers>
 		<Frames>
-		  <EditBox name="$parentEditBox" letters="4096" nonspacewrap="true" spacing="1" historyLines="100" autoFocus="false">
-			<Anchors>
-			  <Anchor point="TOPLEFT" relativeTo="$parentPrompt" relativePoint="TOPRIGHT">
-				<Offset x="5" y="0"/>
-			  </Anchor>
-			  <Anchor point="BOTTOMRIGHT"/>
-			</Anchors>
-			<Scripts>
-			  <OnEscapePressed>
-				self:ClearFocus()
-			  </OnEscapePressed>
-			  <OnTabPressed>
-				WowLuaFrameEditBox:SetFocus()
-			  </OnTabPressed>
-			  <OnLoad>
-				WowLua.indent.enable(self)
-			  </OnLoad>
-			  <OnEnterPressed>
-				WowLua:ProcessLine(self:GetText())
-			  </OnEnterPressed>
-			</Scripts>
-			<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
-			  <FontHeight val="14"/>
-			</FontString>
-		  </EditBox>
-		</Frames>
-	  </Frame>
-	  <ScrollingMessageFrame name="$parentOutput" maxLines="9999" fade="false" enableMouse="true">
-		<Anchors>
-		  <Anchor point="TOPLEFT" relativeTo="WowLuaFrameResizeBar" relativePoint="BOTTOMLEFT">
-			<Offset x="5" y="2"/>
-		  </Anchor>
-		  <Anchor point="BOTTOM" relativeTo="WowLuaFrameCommand" relativePoint="TOP">
-			<Offset x="0" y="0"/>
-		  </Anchor>
-		  <Anchor point="RIGHT">
-			<Offset x="-4" y="0"/>
-		  </Anchor>
-		</Anchors>
-		<Frames>
-		  <Button name="$parentUpButton" inherits="UIPanelScrollUpButtonTemplate">
-			<Anchors>
-			  <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"/>
-			</Anchors>
-                        <Scripts>
-                            <OnClick>
-                                WowLua.ScrollingMessageFrameScroll(self:GetParent(), "up", "page");
-                            </OnClick>
-                        </Scripts>
-		  </Button>
-		  <Button name="$parentDownButton" inherits="UIPanelScrollDownButtonTemplate">
-			<Anchors>
-			  <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT"/>
-			</Anchors>
-                        <Scripts>
-                            <OnClick>
-                                WowLua.ScrollingMessageFrameScroll(self:GetParent(), "down", "page");
-                            </OnClick>
-                        </Scripts>
-		  </Button>
+			<Button name="$parentClose" inherits="UIPanelCloseButton">
+				<Anchors>
+					<Anchor point="TOPRIGHT">
+						<Offset x="5" y="-10"/>
+					</Anchor>
+				</Anchors>
+			</Button>
+			<Button name="$parentDragHeader">
+				<Size y="60"/>
+				<Anchors>
+					<Anchor point="TOPLEFT">
+						<Offset x="0" y="-13"/>
+					</Anchor>
+					<Anchor point="TOPRIGHT">
+						<Offset x="0" y="0"/>
+					</Anchor>
+				</Anchors>
+				<Frames>
+					<Frame name="WowLuaFrameToolbar">
+						<Size y="30"/>
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset x="80" y="-26"/>
+							</Anchor>
+							<Anchor point="TOPRIGHT">
+								<Offset x="-5" y="-26"/>
+							</Anchor>
+						</Anchors>
+						<!-- Used for placement
+						<Layers>
+							<Layer level="ARTWORK">
+								<Texture setAllPoints="true">
+									<Color r="1" g="0.2" b="0.2" a="0.5"/>
+								</Texture>
+							</Layer>
+						</Layers>
+						-->
+						<Frames>
+							<Button name="WowLuaButton_New" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT"/>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\new"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Open" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_New" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\open"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Save_As" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Open" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\save"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Undo" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Save_As" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\undo"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Delete" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Undo" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\delete"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Lock" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Delete" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\padlock"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Previous" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Lock" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\left"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Next" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Previous" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\right"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+							<Button name="WowLuaButton_Run" inherits="WowLuaButtonTemplate">
+								<Anchors>
+									<Anchor point="LEFT" relativeTo="WowLuaButton_Next" relativePoint="RIGHT">
+										<Offset x="5" y="0"/>
+									</Anchor>
+								</Anchors>
+								<NormalTexture file="Interface\AddOns\WowLua\images\icons\run-1"/>
+								<HighlightTexture file="Interface\AddOns\WowLua\images\icons\highlight"/>
+							</Button>
+						</Frames>
+					</Frame>
+
+				</Frames>
+				<Scripts>
+					<OnMouseDown>
+						local parent = self:GetParent()
+						if parent:IsMovable() then
+						parent:StartMoving()
+						end
+					</OnMouseDown>
+					<OnMouseUp>
+						local parent = self:GetParent()
+						parent:StopMovingOrSizing()
+					</OnMouseUp>
+				</Scripts>
+			</Button>
+			<Button name="$parentResizeBar">
+				<Size y="16"/>
+				<Anchors>
+					<Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT">
+						<Offset x="14" y="100"/>
+					</Anchor>
+					<Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT">
+						<Offset x="0" y="100"/>
+					</Anchor>
+				</Anchors>
+				<Layers>
+					<Layer level="BORDER">
+						<Texture name="$parentLeftNub" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
+							<Size x="75" y="16"/>
+							<Anchors>
+								<Anchor point="LEFT">
+									<Offset x="-1"/>
+								</Anchor>
+							</Anchors>
+							<TexCoords left="0" right="0.29296875" top="0" bottom="0.25"/>
+						</Texture>
+						<Texture name="$parentRightNub" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
+							<Size x="75" y="16"/>
+							<Anchors>
+								<Anchor point="RIGHT">
+									<Offset x="1"/>
+								</Anchor>
+							</Anchors>
+							<TexCoords left="0" right="0.29296875" top="0.25" bottom="0.5"/>
+						</Texture>
+						<Texture name="$parentBar" file="Interface\ClassTrainerFrame\UI-ClassTrainer-HorizontalBar">
+							<Size y="16"/>
+							<Anchors>
+								<Anchor point="LEFT" relativeTo="$parentLeftNub" relativePoint="RIGHT"/>
+								<Anchor point="RIGHT" relativeTo="$parentRightNub" relativePoint="LEFT"/>
+							</Anchors>
+							<TexCoords left="0.29296875" right="1.0" top="0" bottom="0.25"/>
+						</Texture>
+					</Layer>
+				</Layers>
+				<Scripts>
+					<OnMouseDown>
+						WowLua.ResizeBar_OnMouseDown(self, button)
+					</OnMouseDown>
+					<OnMouseUp>
+						WowLua.ResizeBar_OnMouseUp(self, button)
+					</OnMouseUp>
+				</Scripts>
+			</Button>
+			<Button name="$parentResizeCorner">
+				<Size x="16" y="16"/>
+				<Anchors>
+					<Anchor point="BOTTOMRIGHT">
+						<Offset x="-3" y="3"/>
+					</Anchor>
+				</Anchors>
+				<Scripts>
+					<OnMouseDown>
+						self:GetParent():StartSizing()
+					</OnMouseDown>
+					<OnLoad>
+						self:GetNormalTexture():SetVertexColor(0.6, 0.6, 0.6)
+					</OnLoad>
+					<OnMouseUp>
+						self:GetParent():StopMovingOrSizing()
+						if WowLuaFrameEditBox then
+						WowLuaFrameEditBox:SetWidth(WowLuaFrameEditScrollFrame:GetWidth())
+						end
+					</OnMouseUp>
+					<OnHide>
+						self:GetParent():StopMovingOrSizing()
+						if WowLuaFrameEditBox then
+						WowLuaFrameEditBox:SetWidth(WowLuaFrameEditScrollFrame:GetWidth())
+						end
+					</OnHide>
+				</Scripts>
+				<NormalTexture file="Interface\AddOns\WowLua\images\resize"/>
+			</Button>
+			<ScrollFrame name="$parentLineNumScrollFrame">
+				<Anchors>
+					<Anchor point="TOPLEFT">
+						<Offset x="18" y="-74"/>
+					</Anchor>
+					<Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPLEFT">
+						<Offset x="30" y="-4"/>
+					</Anchor>
+				</Anchors>
+				<Layers>
+					<Layer level="ARTWORK">
+						<Texture setAllPoints="true"><Color r="0.1" g="0.1" b="0.1" a="0.85"/></Texture>
+					</Layer>
+				</Layers>
+				<!-- Basically copy/pasted from MacroFrame -->
+				<ScrollChild>
+					<EditBox name="WowLuaFrameLineNumEditBox" multiLine="true" maxLines="9999" letters="4096" nonspacewrap="true" spacing="1" autoFocus="false">
+						<Size>
+							<AbsDimension x="100" y="100"/>
+						</Size>
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset x="20" y="0"/>
+							</Anchor>
+							<Anchor point="BOTTOMRIGHT"/>
+						</Anchors>
+						<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
+							<FontHeight val="14"/>
+						</FontString>
+					</EditBox>
+				</ScrollChild>
+			</ScrollFrame>
+			<ScrollFrame name="$parentEditScrollFrame" inherits="UIPanelScrollFrameTemplate">
+				<Anchors>
+					<Anchor point="TOPLEFT" relativeTo="$parentLineNumScrollFrame" relativePoint="TOPRIGHT">
+						<Offset x="0" y="0"/>
+					</Anchor>
+					<Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPRIGHT">
+						<Offset x="-25" y="-4"/>
+					</Anchor>
+				</Anchors>
+				<!-- Basically copy/pasted from MacroFrame -->
+				<Scripts>
+					<OnVerticalScroll>
+						WowLuaFrameLineNumScrollFrame:SetVerticalScroll(offset)
+						WowLua.OnVerticalScroll(self);
+					</OnVerticalScroll>
+					<OnShow>
+						WowLua.OnVerticalScroll(self);
+					</OnShow>
+					<OnLoad>
+						self.scrollBarHideable = 1;
+					</OnLoad>
+				</Scripts>
+				<ScrollChild>
+					<EditBox name="WowLuaFrameEditBox" multiLine="true" nonspacewrap="true" spacing="1" autoFocus="false">
+						<Size>
+							<AbsDimension x="100" y="100"/>
+						</Size>
+						<Layers>
+							<Layer level="BACKGROUND">
+								<FontString name="$parentLineTest" font="Interface\AddOns\WowLua\fonts\VeraMono.ttf" hidden="true">
+									<Anchor point="TOPLEFT" relativePoint="TOPLEFT"/>
+									<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"/>
+									<FontHeight val="14"/>
+								</FontString>
+							</Layer>
+						</Layers>
+						<Anchors>
+							<Anchor point="TOPLEFT">
+								<Offset x="20" y="0"/>
+							</Anchor>
+							<Anchor point="BOTTOMRIGHT"/>
+						</Anchors>
+						<Scripts>
+							<OnLoad>
+								WowLua.indent.enable(self, nil, 3)
+							</OnLoad>
+							<OnEscapePressed>
+								self:ClearFocus();
+							</OnEscapePressed>
+							<OnTextChanged>
+								WowLua.highlightNum = nil
+							</OnTextChanged>
+							<OnCursorChanged>
+								ScrollingEdit_OnCursorChanged(x,y,w,h)
+								WowLua.UpdateLineNums()
+								WowLuaFrameEditScrollFrameScrollBar:SetValue(WowLuaFrameEditScrollFrame:GetVerticalScroll())
+							</OnCursorChanged>
+							<OnUpdate>
+								ScrollingEdit_OnUpdate(WowLuaFrameEditScrollFrame)
+							</OnUpdate>
+						</Scripts>
+						<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
+							<FontHeight val="14"/>
+						</FontString>
+					</EditBox>
+				</ScrollChild>
+			</ScrollFrame>
+			<Button name="$parentEditFocusGrabber">
+				<Anchors>
+					<Anchor point="TOPLEFT">
+						<Offset x="18" y="-72"/>
+					</Anchor>
+					<Anchor point="BOTTOMRIGHT" relativeTo="$parentResizeBar" relativePoint="TOPRIGHT">
+						<Offset x="-30" y="0"/>
+					</Anchor>
+				</Anchors>
+				<Scripts>
+					<OnClick>
+						WowLuaFrameEditBox:SetFocus()
+					</OnClick>
+				</Scripts>
+			</Button>
+			<Frame name="$parentCommand">
+				<Size y="16"/>
+				<Anchors>
+					<Anchor point="BOTTOMLEFT">
+						<Offset x="18" y="3"/>
+					</Anchor>
+					<Anchor point="BOTTOMRIGHT">
+						<Offset x="-15" y="0"/>
+					</Anchor>
+				</Anchors>
+				<Layers>
+					<Layer level="BACKGROUND">
+						<Texture>
+							<Anchors>
+								<Anchor point="TOPLEFT"/>
+								<Anchor point="BOTTOMRIGHT" relativeTo="WowLuaFrameResizeCorner">
+									<Offset x="-3" y="2"/>
+								</Anchor>
+							</Anchors>
+							<Color r="0.1" g="0.1" b="0.1" a="0.85"/>
+						</Texture>
+					</Layer>
+					<Layer level="ARTWORK">
+						<FontString name="$parentPrompt" text="&gt; " font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
+							<Anchors>
+								<Anchor point="LEFT"/>
+							</Anchors>
+							<FontHeight val="14"/>
+						</FontString>
+					</Layer>
+				</Layers>
+				<Frames>
+					<EditBox name="$parentEditBox" letters="4096" nonspacewrap="true" spacing="1" historyLines="100" autoFocus="false">
+						<Anchors>
+							<Anchor point="TOPLEFT" relativeTo="$parentPrompt" relativePoint="TOPRIGHT">
+								<Offset x="5" y="0"/>
+							</Anchor>
+							<Anchor point="BOTTOMRIGHT"/>
+						</Anchors>
+						<Scripts>
+							<OnEscapePressed>
+								self:ClearFocus()
+							</OnEscapePressed>
+							<OnTabPressed>
+								WowLuaFrameEditBox:SetFocus()
+							</OnTabPressed>
+							<OnLoad>
+								WowLua.indent.enable(self)
+							</OnLoad>
+							<OnEnterPressed>
+								WowLua:ProcessLine(self:GetText())
+							</OnEnterPressed>
+						</Scripts>
+						<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf">
+							<FontHeight val="14"/>
+						</FontString>
+					</EditBox>
+				</Frames>
+			</Frame>
+			<ScrollingMessageFrame name="$parentOutput" maxLines="9999" fade="false" enableMouse="true">
+				<Anchors>
+					<Anchor point="TOPLEFT" relativeTo="WowLuaFrameResizeBar" relativePoint="BOTTOMLEFT">
+						<Offset x="5" y="2"/>
+					</Anchor>
+					<Anchor point="BOTTOM" relativeTo="WowLuaFrameCommand" relativePoint="TOP">
+						<Offset x="0" y="0"/>
+					</Anchor>
+					<Anchor point="RIGHT">
+						<Offset x="-4" y="0"/>
+					</Anchor>
+				</Anchors>
+				<Frames>
+					<Button name="$parentUpButton" inherits="UIPanelScrollUpButtonTemplate">
+						<Anchors>
+							<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"/>
+						</Anchors>
+						<Scripts>
+							<OnClick>
+								WowLua.ScrollingMessageFrameScroll(self:GetParent(), "up", "page");
+							</OnClick>
+						</Scripts>
+					</Button>
+					<Button name="$parentDownButton" inherits="UIPanelScrollDownButtonTemplate">
+						<Anchors>
+							<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT"/>
+						</Anchors>
+						<Scripts>
+							<OnClick>
+								WowLua.ScrollingMessageFrameScroll(self:GetParent(), "down", "page");
+							</OnClick>
+						</Scripts>
+					</Button>
+				</Frames>
+				<Scripts>
+					<OnMouseWheel>
+						local direction;
+						if delta > 0 then
+						direction = "up";
+						else
+						direction = "down";
+						end
+						local type = ( IsShiftKeyDown() and "end" ) or
+						( IsControlKeyDown() and "page" ) or "line";
+						WowLua.ScrollingMessageFrameScroll(self, direction, type);
+					</OnMouseWheel>
+					<OnMessageScrollChanged>
+						WowLua.UpdateScrollingMessageFrame(self);
+					</OnMessageScrollChanged>
+					<OnShow>
+						WowLua.UpdateScrollingMessageFrame(self);
+					</OnShow>
+				</Scripts>
+				<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf" justifyH="LEFT">
+					<FontHeight val="14"/>
+				</FontString>
+			</ScrollingMessageFrame>
 		</Frames>
 		<Scripts>
-		  <OnMouseWheel>
-                        local direction;
-			if delta > 0 then
-                            direction = "up";
-                        else
-                            direction = "down";
-                        end
-                        local type = ( IsShiftKeyDown() and "end" ) or
-                                     ( IsControlKeyDown() and "page" ) or "line";
-                        WowLua.ScrollingMessageFrameScroll(self, direction, type);
-		  </OnMouseWheel>
-                  <OnMessageScrollChanged>
-                        WowLua.UpdateScrollingMessageFrame(self);
-                  </OnMessageScrollChanged>
-                  <OnShow>
-                        WowLua.UpdateScrollingMessageFrame(self);
-                  </OnShow>
+			<OnShow>
+				WowLua.Initialize(self)
+			</OnShow>
+			<OnHide>
+				PlaySound("igMainMenuQuit");
+			</OnHide>
+			<OnSizeChanged>
+				WowLua.OnSizeChanged(self)
+			</OnSizeChanged>
 		</Scripts>
-		<FontString font="Interface\AddOns\WowLua\fonts\VeraMono.ttf" justifyH="LEFT">
-		  <FontHeight val="14"/>
-		</FontString>
-	  </ScrollingMessageFrame>
-	</Frames>
-	<Scripts>
-	  <OnShow>
-		WowLua.Initialize(self)
-	  </OnShow>
-          <OnHide>
-                PlaySound("igMainMenuQuit");
-          </OnHide>
-	  <OnSizeChanged>
-		WowLua.OnSizeChanged(self)
-	  </OnSizeChanged>
-	</Scripts>
-  </Frame>
+	</Frame>
 </Ui>