 <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">
	
	<!-- Don't touch, this order is important -->
	<Script file="..\Libs\LibStub\LibStub.lua"/>
	<Include file="..\libs\AceAddon-3.0\AceAddon-3.0.xml"/>
	
	<Script file="APIInterface.lua"/>
	
	<!--
	<Frame name="APII_DebugLine" parentArray="DependencyLines" virtual="true">
		<Layers>
			<Layer level="OVERLAY" textureSubLevel="-2">
				<Line parentKey="Fill" file="Interface/Artifacts/_Artifacts-DependencyBar-Fill" thickness="4" horizTile="true" alpha="1" />
			</Layer>
		</Layers>
	</Frame>
	-->
	<Frame name="APII_InsetTemplate" inherits="InsetFrameTemplate" virtual="true">
		<Layers>
			<Layer level="OVERLAY">
				<Texture parentKey="OverlayShadowTopLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="4" y="-4"/>
					</Anchors>
				</Texture>

				<Texture parentKey="OverlayShadowTop" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="17" y="-4"/>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-17" y="-4"/>
					</Anchors>
					<TexCoords left="0.9999" right="1" top="0" bottom="1"/>
				</Texture>

				<Texture parentKey="OverlayShadowTopRight" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="-4"/>
					</Anchors>
					<TexCoords left="1" right="0" top="0" bottom="1"/>
				</Texture>

				<Texture parentKey="OverlayShadowLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="4" y="-17"/>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="4" y="16"/>
					</Anchors>
					<TexCoords left="0" right="1" top="0.9999" bottom="1"/>
				</Texture>

				<Texture parentKey="OverlayShadowBottomLeft" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="4" y="3"/>
					</Anchors>
					<TexCoords left="0" right="1" top="1" bottom="0"/>
				</Texture>

				<Texture parentKey="OverlayShadowRight" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="-17"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-4" y="16"/>
					</Anchors>
					<TexCoords left="1" right="0" top="0.9999" bottom="1"/>
				</Texture>

				<Texture parentKey="OverlayShadowBottomRight" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-4" y="3"/>
					</Anchors>
					<TexCoords left="1" right="0" top="1" bottom="0"/>
				</Texture>

				<Texture parentKey="OverlayShadowBottom" atlas="collections-background-shadow-small" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="17" y="3"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-17" y="3"/>
					</Anchors>
					<TexCoords left="0.9999" right="1" top="1" bottom="0"/>
				</Texture>
			</Layer>

			<Layer level="BORDER" textureSubLevel="2">
				<Texture parentKey="ShadowCornerTopLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" x="4" y="-4"/>
					</Anchors>
				</Texture>

				<Texture parentKey="ShadowCornerTopRight" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="-4" />
					</Anchors>
					<TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
				</Texture>

				<Texture parentKey="ShadowCornerBottomLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="4" y="4"/>
					</Anchors>
					<TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
				</Texture>

				<Texture parentKey="ShadowCornerBottomRight" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-4" y="4"/>
					</Anchors>
					<TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
				</Texture>

				<Texture parentKey="ShadowCornerTop" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="149" y="-4"/>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-149" y="-4"/>
					</Anchors>
					<TexCoords left="0.9999" right="1" top="0" bottom="1"/>
				</Texture>

				<Texture parentKey="ShadowCornerLeft" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="4" y="-151"/>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="4" y="151"/>
					</Anchors>
					<TexCoords left="0" right="1" top="0.9999" bottom="1"/>
				</Texture>

				<Texture parentKey="ShadowCornerRight" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-4" y="-151"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-4" y="151"/>
					</Anchors>
					<TexCoords left="1" right="0" top="0.9999" bottom="1"/>
				</Texture>

				<Texture parentKey="ShadowCornerBottom" atlas="collections-background-shadow-large" useAtlasSize="true">
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="149" y="4"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="-149" y="4"/>
					</Anchors>
					<TexCoords left="0.9999" right="1" top="1" bottom="0"/>
				</Texture>
			</Layer>
		</Layers>
	</Frame>
	
	<Button name="APII_ListSystemTemplate" hidden="false" inherits="SecureFrameTemplate" virtual="true">
		<Size y="34"/>
		<Anchors>
			<Anchor point="LEFT"/>
			<Anchor point="RIGHT"/>
		</Anchors>
		<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="16"/>
			</EdgeSize>
		</Backdrop>		
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBackground" file="Interface\Garrison\GarrisonMissionParchment" vertTile="true" horizTile="true" parentKey="background">
					<Anchors>
						<Anchor point="TOPLEFT" x="3" y="-3"/>
						<Anchor point="BOTTOMRIGHT" x="-3" y="3"/>
					</Anchors>
					<Color r="0.7" g="0.7" b="0.7" a="1" />
				</Texture>	
			</Layer>
			<Layer level="BACKGROUND" textureSubLevel="1">
				<Texture name="$parentTitleBackground" file="Interface\PETBATTLES\PetBattleHUDAtlas" horizTile="true" parentKey="titleBar">
					<Size x="0" y="31"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="4" y="-3"/>
						<Anchor point="TOPRIGHT" x="-4" y="-3"/>
					</Anchors>
					<TexCoords left="0" right="1" top="0.123046875" bottom="0.2060546875"/>
				</Texture>				
			<!--
				<Texture file="Interface\FrameGeneral\UI-Background-Marble" vertTile="true" horizTile="true" parentKey="HeaderBG">
					<Anchors>
						<Anchor point="TOPLEFT" x="2" y="-1"/>
						<Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT" x="-2"  y="-31" />
					</Anchors>
				</Texture>
				-->
			</Layer>

			<Layer level="ARTWORK">						
			
				
				
				<FontString name="$parentName" inherits="GameFontWhite" maxLines="1" hidden="false" justifyH="LEFT" justifyV="MIDDLE" parentKey="Name">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.titleBar" x="20" />
						<Anchor point="BOTTOMRIGHT" relativeKey="$parent.titleBar" x="-20" y="2"/>
					</Anchors>
				</FontString>
				
				<FontString inherits="GameFontWhiteSmall" maxLines="1" hidden="true" justifyH="LEFT" justifyV="MIDDLE" parentKey="ClipboardInfo" text="Clipboard:">
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.titleBar" relativePoint="BOTTOMLEFT" x="30" y="-8"/>
					</Anchors>
				</FontString>
				
				<FontString inherits="GameFontWhite" hidden="true" justifyH="LEFT" justifyV="MIDDLE" parentKey="Details" spacing="3">
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="30" y="13"/>
						<Anchor point="BOTTOMRIGHT" x="-20" y="13"/>
					</Anchors>
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
                <Texture parentKey="selectedTexture" atlas="PetList-ButtonSelect" hidden="true"/>
			</Layer>
		</Layers>

		<Frames>
			<EditBox parentKey="ClipboardString" inherits="InputBoxTemplate" hidden="true"> 
				<Size y="20"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.ClipboardInfo" relativePoint="RIGHT" x="15"/>
					<Anchor point="RIGHT" x="-35"/>
				</Anchors>
				
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="Checkmark" file="Interface\Scenarios\ScenarioIcon-Check" alpha="0">
							<Size x="16" y="16" />
							<Anchors>
								<Anchor point="LEFT" relativePoint="RIGHT" x="3"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				
				<Animations>
					<AnimationGroup parentKey="CheckAnim" setToFinalAlpha="true" looping="NONE">
						<Alpha parentKey="Checkmark" childKey="Checkmark" fromAlpha="1" toAlpha="0"  Duration="0.6" order="0" />
						<Scale parentKey="Checkmark" childKey="Checkmark" fromScaleX="0.7" toScaleX="1.5" smoothing="NONE" fromScaleY="0.7" toScaleY="1.5" Duration="0.6" order="0"/>
					</AnimationGroup>
				</Animations>
				
				<Scripts>
					<Onload>
						self:SetAutoFocus(false);
					</Onload>
					<OnEnterPressed>
						self:ClearFocus();
					</OnEnterPressed>
					<OnKeyUp>
						if (key == "C" and IsControlKeyDown()) then
							self.CheckAnim:Stop();
							self:ClearFocus();
							self.CheckAnim:Play();
							PlaySound(SOUNDKIT.TUTORIAL_POPUP);
						end
					</OnKeyUp>
					<OnTextChanged>
						if userInput then
							self:SetText(self:GetParent().Api:GetClipboardString());
							self:HighlightText();
						end
					</OnTextChanged>
				</Scripts>
			</EditBox>
			
			<Frame name="$parentHighlight" setAllPoints="true" hidden="true" enableMouse="false" parentKey="highlight">
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentTopLeft" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Size x="16" y="16"/>
							<Anchors>
								<Anchor point="TOPLEFT" x="-1" y="2"/>
							</Anchors>
							<TexCoords left="0.06640625" right="0" top="0.4375" bottom="0.65625"/>
						</Texture>
						<Texture name="$parentBottomLeft" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Size x="16" y="16"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-1" y="-2"/>
							</Anchors>
							<TexCoords left="0.06640625" right="0" top="0.65625" bottom="0.4375"/>
						</Texture>		
						<Texture name="$parentTopRight" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Size x="16" y="16"/>
							<Anchors>
								<Anchor point="TOPRIGHT" x="1" y="2"/>
							</Anchors>
							<TexCoords left="0" right="0.06640625" top="0.4375" bottom="0.65625"/>
						</Texture>
						<Texture name="$parentBottomRight" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Size x="16" y="16"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="1" y="-2"/>
							</Anchors>
							<TexCoords left="0" right="0.06640625" top="0.65625" bottom="0.4375"/>
						</Texture>			
						<Texture name="$parentTop" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentTopRight" relativePoint="BOTTOMLEFT"/>
							</Anchors>
							<TexCoords left="0" right="0.015" top="0.4375" bottom="0.65625"/>
						</Texture>
						<Texture name="$parentBottom" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentBottomLeft" relativePoint="TOPRIGHT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="BOTTOMLEFT"/>
							</Anchors>
							<TexCoords left="0" right="0.015" top="0.65625" bottom="0.4375"/>
						</Texture>			
						<Texture name="$parentLeft" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentTopLeft" relativePoint="BOTTOMLEFT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomLeft" relativePoint="TOPRIGHT"/>
							</Anchors>
							<TexCoords left="0.06640625" right="0" top="0.65625" bottom="0.6"/>
						</Texture>
						<Texture name="$parentRight" file="Interface\PaperDollInfoFrame\UI-Character-ReputationBar-Highlight" alphaMode="ADD">
							<Anchors>
								<Anchor point="TOPLEFT" relativeTo="$parentTopRight" relativePoint="BOTTOMLEFT"/>
								<Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRight" relativePoint="TOPRIGHT"/>
							</Anchors>
							<TexCoords left="0" right="0.06640625" top="0.65625" bottom="0.6"/>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
		</Frames>

		<Scripts>
			<OnClick function="APII_List_OnClick"/>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
				self:SetBackdropBorderColor(0.7, 0.5, 0.125, 1);
			</OnLoad>
			<OnEnter>
				self.highlight:Show();
			</OnEnter>
			<OnLeave>
				if ( not self.selected ) then
					self.highlight:Hide();
				end
			</OnLeave>
		</Scripts>
	</Button>
	
	
	<Button name="APII_ListFunctionTemplate" hidden="false" inherits="SecureFrameTemplate" virtual="true">
		<Size>
			<AbsDimension  y="40"/>
		</Size>
		<Anchors>
			<Anchor point="LEFT"/>
			<Anchor point="RIGHT"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture atlas="PetList-ButtonBackground" parentKey="background"/>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="$parentName" inherits="GameFontNormal" maxLines="1" hidden="false" justifyH="LEFT" justifyV="MIDDLE" parentKey="Name" text="Namescpae.Name(Argument)">
					<Size y="15"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="20" y="-5"/>
						<Anchor point="TOPRIGHT" x="-20" y="-5"/>
					</Anchors>
				</FontString>
				<FontString name="$parentArguments" inherits="GameFontWhite" maxLines="1" hidden="false" justifyH="LEFT" justifyV="MIDDLE" parentKey="Arguments">
					<Size y="10"/>
					<Anchors>
						<Anchor point="TOPLEFT" relativeKey="$parent.Name" relativePoint="BOTTOMLEFT" x="10" y="-2"/>
						<Anchor point="TOPRIGHT" relativeKey="$parent.Name" relativePoint="BOTTOMRIGHT" y="-2"/>
					</Anchors>
					<Color r="0.7" g="0.7" b="0.7" />
				</FontString>
			</Layer>
			<Layer level="OVERLAY">
                <Texture parentKey="selectedTexture" atlas="PetList-ButtonSelect" hidden="true"/>
			</Layer>
		</Layers>
		
		<HighlightTexture atlas="PetList-ButtonHighlight">
			<Color r="1" g="1" b="1" a="1"/>
		</HighlightTexture>

		<Scripts>
			<OnClick function="APII_ListFunction_OnClick"/>
			<OnLoad>
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
			</OnLoad>
		</Scripts>
	</Button>
	
	<Frame name="APII_Core" inherits="BasicFrameTemplate" mixin="APII_COREMIXIN" movable="true" resizable="true" toplevel="true" frameStrata="MEDIUM" enableMouse="true" parent="UIParent" hidden="true">
		<Size x="550" y="450"/>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		
		<!--
		<Frames>
			<Frame parentKey="Resize">
				<Size x="15" y="15" />
				<Anchors>
					<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture parentKey="Art" file="Interface\CHATFRAME\UI-ChatIM-SizeGrabber-Up" alpha="1">
						</Texture>
					</Layer>
					
					<Layer level="HIGHLIGHT">
						<Texture parentKey="Art" file="Interface\CHATFRAME\UI-ChatIM-SizeGrabber-Highlight" alpha="1">
						</Texture>
					</Layer>
				</Layers>
				<Scripts>
					<OnMouseDown function="APII_Resize_OnMouseDown"/>
					<OnMouseUp function="APII_Resize_OnMouseUp"/>
					<OnEnter>
						self.Art:SetAlpha(1);
					</OnEnter>
					<OnLeave>
						self.Art:SetAlpha(1);
					</OnLeave>
				</Scripts>
			</Frame>
		</Frames>
		-->
		
		<Scripts>
			<OnLoad>
				self:SetClampedToScreen(true);
				self.TitleText:SetText("APIInterface");
				self:RegisterForDrag("LeftButton");
				self:SetMinResize(250, 200)
			</OnLoad>
			<OnShow>
				PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN);
			</OnShow>
			<OnHide>
				PlaySound(SOUNDKIT.IG_CHARACTER_INFO_CLOSE);
			</OnHide>
		</Scripts>
	</Frame>
	
	<Frame name="APIILists" parent="APII_Core" hidden="false">
		<Anchors>
			<Anchor point="BOTTOMLEFT" x="0" y="0"/>
			<Anchor point="BOTTOMRIGHT" x="0" y="0"/>
			<Anchor point="TOP" x="0" y="-27"/>
		</Anchors>

		<Frames>
			<Frame name="$parentInsetLeft" inherits="InsetFrameTemplate" parentKey="insetLeft">
				<Anchors>
					<Anchor point="TOPLEFT" relativePoint="TOPLEFT" y="3" x="4"/>
					<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="4" y="5"/>
					<Anchor point="RIGHT" x="-26"/>
				</Anchors>
			</Frame>
			
			<EditBox parentKey="searchBox" inherits="SearchBoxTemplate" letters="40">
				<Size x="145" y="20"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.insetLeft"  x="15" y="-9"/>
				</Anchors>
				<Scripts>
					<OnTextChanged>
						APII_Core:Search_OnTextChanged(self);
					</OnTextChanged>
				</Scripts>
			</EditBox>
			<Button parentKey="buttonFunctions" inherits="UIMenuButtonStretchTemplate" text="Functions" frameStrata="HIGH">
				<Size x="80" y="22"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.searchBox" relativePoint="RIGHT" x="15" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetEnabled(false);
					</OnLoad>
					<OnClick> 
						APII_Core:GlobalSearch_OnClick("function");
					</OnClick>	
					<OnEnter> 
						APII_Core:GlobalSearch_OnEnter(self, "function");
					</OnEnter>
					<OnLeave> 
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>				
			</Button>
			<Button parentKey="buttonTables" inherits="UIMenuButtonStretchTemplate" text="Tables" frameStrata="HIGH">
				<Size x="80" y="22"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.buttonFunctions" relativePoint="RIGHT" x="5" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetEnabled(false);
					</OnLoad>
					<OnClick> 
						APII_Core:GlobalSearch_OnClick("table");
					</OnClick>	
					<OnEnter> 
						APII_Core:GlobalSearch_OnEnter(self, "table");
					</OnEnter>
					<OnLeave> 
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>				
			</Button>
			<Button parentKey="buttonFrames" inherits="UIMenuButtonStretchTemplate" text="Frames" frameStrata="HIGH">
				<Size x="80" y="22"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.buttonTables" relativePoint="RIGHT" x="5" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetEnabled(false);
					</OnLoad>
					<OnClick> 
						APII_Core:GlobalSearch_OnClick("table", true);
					</OnClick>	
					<OnEnter> 
						APII_Core:GlobalSearch_OnEnter(self, "frame");
					</OnEnter>
					<OnLeave> 
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>				
			</Button>
			<Button parentKey="buttonStrings" inherits="UIMenuButtonStretchTemplate" text="Strings" frameStrata="HIGH">
				<Size x="80" y="22"/>
				<Anchors>
					<Anchor point="LEFT" relativeKey="$parent.buttonFrames" relativePoint="RIGHT" x="5" />
				</Anchors>
				<Scripts>
					<OnLoad>
						self:SetEnabled(false);
					</OnLoad>
					<OnClick> 
						APII_Core:GlobalSearch_OnClick("string");
					</OnClick>
					<OnEnter> 
						APII_Core:GlobalSearch_OnEnter(self, "string");
					</OnEnter>
					<OnLeave> 
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>				
			</Button>
			<Frame parentKey="filterBar">
				<Size y="0.1"/>
				<Anchors>
					<Anchor point="TOP" relativeKey="$parent.searchBox" relativePoint="BOTTOM" y="-2"/>
					<Anchor point="LEFT" relativeKey="$parent.insetLeft" x="3" />
					<Anchor point="RIGHT" relativeKey="$parent.insetLeft"/>
				</Anchors>
				<Layers>
					<Layer level="ARTWORK">
						<Texture file="Interface\Buttons\UI-Listbox-Highlight2">
							<Color r="0.6" g="0.75" b="1.0" a="0.5" />
						</Texture>
						<FontString parentKey="text" inherits="GameFontHighlightSmall" justifyH="LEFT">
							<Size y="13"/>
							<Anchors>
								<Anchor point="LEFT" x="25" y="0"/>
								<Anchor point="RIGHT" x="-25" y="0"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="$parentClearButton" parentKey="clearButton" hidden="true">
						<Size x="17" y="17"/>
						<Anchors>
							<Anchor point="RIGHT"/>
						</Anchors>
						<Layers>
							<Layer level="ARTWORK">
								<Texture file="Interface\FriendsFrame\ClearBroadcastIcon" alpha="0.5" parentKey="texture">
									<Size>
										<AbsDimension x="17" y="17"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT" x="0" y="0"/>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
						<Scripts>
							<OnEnter>
								self.texture:SetAlpha(1.0);
							</OnEnter>
							<OnLeave>
								self.texture:SetAlpha(0.5);
							</OnLeave>
							<OnMouseDown>
								if self:IsEnabled() then
									self.texture:SetPoint("TOPLEFT", self, "TOPLEFT", 1, -1);
								end
							</OnMouseDown>
							<OnMouseUp>
								self.texture:SetPoint("TOPLEFT", self, "TOPLEFT", 0, 0);
							</OnMouseUp>
							<OnClick> <!-- function="APII_FilterClearButton_OnClick" />-->
								self:GetParent():GetParent():GetParent():FilterClearButton_OnClick();
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			
			<ScrollFrame name="$parentSystemList" parentKey="scrollFrame" inherits="HybridScrollFrameTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeKey="$parent.filterBar" relativePoint="BOTTOMLEFT" x="0" y="-2"/>
					<Anchor point="BOTTOMRIGHT" relativeTo="$parentInsetLeft" x="-2" y="5"/>
				</Anchors>
				<Frames>
					<Slider name="$parentScrollBar" inherits="HybridScrollBarTrimTemplate" parentKey="scrollBar">
						<Anchors>
							<Anchor point="TOPLEFT" relativePoint="BOTTOMRIGHT" x="4" y="400"/>
							<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="4" y="7"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self.trackBG:Show();
								self.trackBG:SetVertexColor(0, 0, 0, 0.75);
							</OnLoad>
						</Scripts>
					</Slider>
				</Frames>
			</ScrollFrame>
			
		</Frames>
		<Layers>
		</Layers>
	</Frame>

	
 </Ui>