<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">
	<Script file="EarthTree.lua"/>
	<Frame name="EarthObjectTemplate" virtual="true">
		<Scripts>			
			<OnUpdate>
				if( this.onUpdate ) then
					this.onUpdate();
				end
			</OnUpdate>
			<OnEvent>
				if( this.onEvent ) then
					this.onEvent();
				end
			</OnEvent>
			<OnShow>
				if( this.onShow ) then
					this.onShow();
				end
			</OnShow>
            <OnClick>
				if( this.onClick ) then
					this.onClick();
				end
			</OnClick>
			<OnHide>
				if( this.onHide ) then
					this.onHide();
				end
			</OnHide>
			<OnEnter>
				if( this.onEnter ) then
					this.onEnter();
				end
			</OnEnter>
			<OnLeave>
				if( this.onLeave ) then
					this.onLeave();
				end
			</OnLeave>
		</Scripts>
	</Frame>
	<Button name="EarthTreeButtonExpandButtonGraphicTemplate" inherits="EarthObjectTemplate" virtual="true">
		<Size>
			<AbsDimension x="16" y="16"/>
		</Size>
		<NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
			<Size>
				<AbsDimension x="16" y="16"/>
			</Size>
			<Anchors>
				<Anchor point="LEFT">
					<Offset>
						<AbsDimension x="3" y="0"/>
					</Offset>
				</Anchor>
			</Anchors>
		</NormalTexture>
		<HighlightTexture name="$parentHighlight" file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
			<Size>
				<AbsDimension x="16" y="16"/>
			</Size>
			<Anchors>
				<Anchor point="LEFT">
					<Offset>
						<AbsDimension x="3" y="0"/>
					</Offset>
				</Anchor>
			</Anchors>
		</HighlightTexture>
	</Button>


	<Button name="EarthTreeButtonGraphicTemplate" inherits="EarthObjectTemplate" virtual="true">
		<Size>
			<AbsDimension x="280" y="16"/>
		</Size>
		<ButtonText name="$parentText" inherits="GameFontNormal" justifyH="LEFT">
			<Size>
				<AbsDimension x="275" y="12"/>
			</Size>
			<Anchors>
				<Anchor point="LEFT">
					<Offset>
						<AbsDimension x="2" y="2"/>
					</Offset>
				</Anchor>
			</Anchors>
		</ButtonText>
		<NormalFont inherits="GameFontNormal" justifyH="LEFT"/>
		<HighlightFont inherits="GameFontHighlight" justifyH="LEFT"/>
		<DisabledFont inherits="GameFontDisable" justifyH="LEFT"/>
	</Button>

	<Button name="EarthTreeButtonScriptedTemplate" inherits="EarthTreeButtonGraphicTemplate" virtual="true">
		<Scripts>
			<OnLoad>
				EarthTree_Text_OnLoad();
			</OnLoad>
			<OnClick>
				if( this.onClick ) then
					this.onClick();
				end
			</OnClick>
			<OnDoubleClick>
				if( this.onDoubleClick ) then
					this.onDoubleClick();
				end
			</OnDoubleClick>
			<OnMouseWheel>
				if( this.onMouseWheel ) then
					this.onMouseWheel(arg1);
				end
			</OnMouseWheel>
		</Scripts>
	</Button>

	<Button name="EarthTreeButtonTemplate" inherits="EarthTreeButtonScriptedTemplate" virtual="true"/>


	<Frame name="EarthTreeButtonFrameTemplate" inherts="EarthObjectTemplate" virtual="true">
		<Size>
			<AbsDimension x="280" y="16"/>
		</Size>
		<Layers>
			<Layer level="OVERLAY">
				<Texture name="$parentBackground" setAllPoints="true">
					<Color r="0" g="1" b="0" a="0.0" />
				</Texture>
			</Layer>
			
			<Layer level="MEDIUM">
				<FontString name="$parentTitleIndent" inherits="GameFontNormal" justifyH="LEFT" hidden="false">
					<Size>
						<AbsDimension x="220" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-2" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="MEDIUM">
				<FontString name="$parentTag" inherits="GameFontNormal" justifyH="RIGHT" hidden="false">
					<Size>
						<AbsDimension x="220" y="16"/>
					</Size>
					<Anchors>
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-2" y="2"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="MEDIUM">
				<FontString name="$parentPrefixSize" inherits="GameFontNormal" justifyH="RIGHT" hidden="true"/>
			</Layer>
		</Layers>

		<Frames>
			<Button name="$parentButton" inherits="EarthTreeButtonTemplate" hidden="false">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentButtonPrefix" inherits="EarthTreeButtonTemplate" hidden="true">
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			
			<CheckButton name="$parentCheck" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-2" y="-2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						EarthTree_CheckButton_OnLoad();
					</OnLoad>
					<OnMouseWheel>
						if( this.onMouseWheel ) then
							this.onMouseWheel(arg1);
						end
					</OnMouseWheel>
					<OnClick>
						if( this.onClick ) then
							this.onClick();
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="$parentRadio" hidden="true">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="-2" y="-2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						EarthTree_RadioButton_OnLoad();
					</OnLoad>
					<OnMouseWheel>
						if( this.onMouseWheel ) then
							this.onMouseWheel(arg1);
						end
					</OnMouseWheel>
					<OnClick>
						if( this.onClick ) then
							this.onClick();
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="$parentExpand" inherits="EarthTreeButtonExpandButtonGraphicTemplate" hidden="false">			
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						EarthTree_ExpandButton_OnLoad();
					</OnLoad>
					<OnMouseWheel>
						if( this.onMouseWheel ) then
							this.onMouseWheel(arg1);
						end
					</OnMouseWheel>
					<OnClick>
						if( this.onClick ) then
							this.onClick();
						end
					</OnClick>
				</Scripts>
			</CheckButton>
		</Frames>
		<Scripts>
			<OnLoad>
				EarthTree_ButtonFrame_OnLoad();
			</OnLoad>
			<OnMouseWheel>
				if( this.onMouseWheel ) then
					this.onMouseWheel(arg1);
				end
			</OnMouseWheel>
		</Scripts>		
	</Frame>


	<Frame name="EarthTreeTemplate" inherits="EarthObjectTemplate" virtual="true" toplevel="true" enableMouse="true" movable="true">
		<Size>
			<AbsDimension x="300" y="330"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" setAllPoints="true">
					<Color r="0" g="0" b="1" a="0.0" />
				</Texture>
			</Layer>
		</Layers>
		<Frames>
			<Frame name="$parentExpand">
				<Size>
					<AbsDimension x="54" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="0" y="1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Frames>
					<Frame name="$parentCollapseAll" hidden="false" inherits="EarthTreeButtonFrameTemplate" id="0">
						<Size>
							<AbsDimension x="40" y="22"/>
						</Size>
						<Anchors>
							<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT">
								<Offset>
									<AbsDimension x="6" y="2"/>
								</Offset>
							</Anchor>
						</Anchors>					
						<Scripts>
							<OnLoad>
								EarthTree_CollapseAllButton_OnLoad();
							</OnLoad>
						</Scripts>
					</Frame>
				</Frames>
			</Frame>
			<Frame name="$parentHighlightFrame" hidden="true">
				<Size>
					<AbsDimension x="293" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOP"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture name="$parentHighlight" file="Interface\Buttons\UI-Listbox-Highlight2" alphaMode="ADD"/>
					</Layer>
				</Layers>
			</Frame>
			<Frame name="$parentTitle1" inherits="EarthTreeButtonFrameTemplate" id="1" hidden="true">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent">
						<Offset>
							<AbsDimension x="20" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle2" inherits="EarthTreeButtonFrameTemplate" id="2" hidden="false">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle1" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle3" inherits="EarthTreeButtonFrameTemplate" id="3" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle2" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle4" inherits="EarthTreeButtonFrameTemplate" id="4" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle3" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle5" inherits="EarthTreeButtonFrameTemplate" id="5" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle4" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle6" inherits="EarthTreeButtonFrameTemplate" id="6" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle5" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle7" inherits="EarthTreeButtonFrameTemplate" id="7" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle6" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle8" inherits="EarthTreeButtonFrameTemplate" id="8" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle7" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle9" inherits="EarthTreeButtonFrameTemplate" id="9" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle8" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle10" inherits="EarthTreeButtonFrameTemplate" id="10" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle9" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle11" inherits="EarthTreeButtonFrameTemplate" id="11" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle10" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle12" inherits="EarthTreeButtonFrameTemplate" id="12" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle11" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle13" inherits="EarthTreeButtonFrameTemplate" id="13" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle12" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle14" inherits="EarthTreeButtonFrameTemplate" id="14" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle13" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle15" inherits="EarthTreeButtonFrameTemplate" id="15" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle14" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle16" inherits="EarthTreeButtonFrameTemplate" id="16" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle15" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle17" inherits="EarthTreeButtonFrameTemplate" id="17" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle16" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle18" inherits="EarthTreeButtonFrameTemplate" id="18" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle17" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle19" inherits="EarthTreeButtonFrameTemplate" id="19" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle18" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<Frame name="$parentTitle20" inherits="EarthTreeButtonFrameTemplate" id="20" hidden="true">
				<Anchors>
					<Anchor point="TOP" relativeTo="$parentTitle19" relativePoint="BOTTOM"/>
				</Anchors>
			</Frame>
			<ScrollFrame name="$parentListScrollFrame" inherits="FauxScrollFrameTemplate">
				<Size>
					<AbsDimension x="32" y="320"/>
				</Size>
				<Anchors>
					<Anchor point="TOPRIGHT" relativeTo="$parent" relativePoint="TOPRIGHT"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parent" relativePoint="BOTTOMRIGHT"/>
				</Anchors>
				<Scripts>
					<OnVerticalScroll>
						if (this:IsVisible()) then
							FauxScrollFrame_OnVerticalScroll(EARTHTREE_TITLE_HEIGHT, function() EarthTree_UpdateFrame(this:GetParent()) end);
						end
					</OnVerticalScroll>
				</Scripts>
			</ScrollFrame>
		</Frames>
		<Scripts>
			<OnLoad>
				EarthTree_Frame_OnLoad();
			</OnLoad>
			<OnMouseWheel>
				if( this.onMouseWheel ) then
					this.onMouseWheel(arg1);
				end
			</OnMouseWheel>
		</Scripts>
	</Frame>

	<!-- Example EarthTree
	<Frame name="EarthTree" inherits="EarthTreeTemplate" parent="UIParent">
		<Anchors>
			<Anchor point="CENTER" relativeTo="UIParent" relativePoint="CENTER">
				<Offset>
					<AbsDimension x="0" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
	</Frame>
	-->

</Ui>


