
<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">

	<FontString name="KLHTM_Font" inherits="GameFontNormal" virtual="true">
		<FontHeight>
			<AbsValue val="20"/>
		</FontHeight>
		<Color r="0.0" g="1.0" b="1.0"/>
	</FontString>
	
	<FontString name="KLHTM_Font2" inherits="KLHTM_Font" virtual="true">
		<Size>
			<AbsDimension x="100" y="20"/>
		</Size>
		<FontHeight>
			<AbsValue val="15"/>
		</FontHeight>
	</FontString>

	<Button name="KLHTM_ButtonTemplate" virtual="true" inherits="UIPanelButtonTemplate">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>
		
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight"/>
	</Button>

	<Frame name="KLHTM_WindowTemplate" toplevel="true" parent="UIParent" hidden="false" virtual="true">
		<Size>
			<AbsDimension x="280" y="100"/> <!-- not really meaningful, will get resized on startup -->
		</Size>
		
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="$parentTextMain" inherits="KLHTM_Font" justifyH="LEFT" justifyV="TOP">
					<Size>
						<AbsDimension x="280" y="20"/>
					</Size>
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="5" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		
		<!-- not 100% sure what the 16's do here, just copied this paragraph from another file, and it works -->
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
			    <AbsValue val="16"/>
			</EdgeSize>
			<TileSize>
			    <AbsValue val="16"/>
			</TileSize>
			<BackgroundInsets>
			    <AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		
		<Scripts>
			<OnDragStart>
				KLHTM_Frame_OnDragStart(this)
			</OnDragStart>
			<OnDragStop>
				KLHTM_Frame_OnDragStop(this)
			</OnDragStop>
		</Scripts>
		
		<Frames>
			<Frame name="$parentTable" hidden="true" inherits="KLHTM_TableTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTextMain" relativePoint="BOTTOMLEFT" />
				</Anchors>
			</Frame>
			
			<Button name="$parentClose" inherits="KLHTM_ButtonTemplate" text="X">
				
				<Anchors>
					<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="-5" y="-5"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<Scripts>
					<OnClick>
						KLHTM_Button_OnClick(this:GetParent(), "Close")
					</OnClick>
					
					<OnLeave>
						KLHTM_Button_OnLeave()
					</OnLeave>
					
					<OnEnter>
						KLHTM_Button_OnEnter("Close", "Hides this window.")
					</OnEnter>						
				</Scripts>
				
			</Button>
			
			<Button name="$parentPin" inherits="KLHTM_ButtonTemplate" text = "P">
			
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentClose" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<Scripts>							
					<OnClick>
						KLHTM_Button_OnClick(this:GetParent(), "Pin")
					</OnClick>
					
					<OnLeave>
						KLHTM_Button_OnLeave()
					</OnLeave>
					<OnEnter>
						KLHTM_Button_OnEnter("Pin", "Prevents the window from being moved.")
					</OnEnter>
				</Scripts>
				
			</Button>
			
			<Button name="$parentMinimise" inherits="KLHTM_ButtonTemplate" text="T">
				
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentPin" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<Scripts>					
					<OnClick>
						KLHTM_Button_OnClick(this:GetParent(), "Minimise")
					</OnClick>
					
					<OnLeave>
						KLHTM_Button_OnLeave()
					</OnLeave>
					<OnEnter>
						KLHTM_Button_OnEnter("Toggle Table", "Shows or hides the table for this window.")
					</OnEnter>
				</Scripts>

			</Button>
			
			<Button name="$parentShowOther" inherits="KLHTM_ButtonTemplate" text=">>">
				
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentMinimise" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<Scripts>					
					<OnClick>
						KLHTM_Button_OnClick(this:GetParent(), "ShowOther")
					</OnClick>
					<OnLeave>
						KLHTM_Button_OnLeave()
					</OnLeave>
					<OnEnter>
						KLHTM_Button_OnEnter("RaidView", "Shows the other window, if it is hidden. Otherwise, hides it.")
					</OnEnter>
				</Scripts>

			</Button>
			
			<Button name="$parentClear" inherits="KLHTM_ButtonTemplate" text="C">
				
				<Anchors>
					<Anchor point="RIGHT" relativeTo="$parentShowOther" relativePoint="LEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				
				<Scripts>					
					<OnClick>
						KLHTM_Button_OnClick(this:GetParent(), "Clear")
					</OnClick>
					<OnLeave>
						KLHTM_Button_OnLeave()
					</OnLeave>
					<OnEnter>
						KLHTM_Button_OnEnter("Clear", "Clears the data in this window's table.")
					</OnEnter>
				</Scripts>

			</Button>
			
		</Frames>
	</Frame>

		<Frame name="KLHTM_RowTemplate" virtual="true">
		<Size>
			<AbsDimension x="20" y="20"/>
		</Size>		
		<Frames>
			<!-- lukon mod: two dummy frames to ensure the text objects appear above the bars -->
			<Frame setAllPoints="true">
				<Frames>
					<Frame setAllPoints="true">
						<Layers>
							<Layer level="BACKGROUND">
		
								<FontString name="$parentText1" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT"/>
									</Anchors>
								</FontString>
								<FontString name="$parentText2" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="LEFT" relativeTo="$parentText1" relativePoint="RIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText3" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText2" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText4" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText3" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText5" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText4" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText6" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText5" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText7" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText6" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText8" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText7" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText9" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText8" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
								<FontString name="$parentText10" inherits="KLHTM_Font2">
									<Anchors>
										<Anchor point="TOPLEFT" relativeTo="$parentText9" relativePoint="TOPRIGHT" />
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
					</Frame>
				</Frames>
			</Frame>
		
			<!-- lukon mod: each row has "status" bar -->
			<StatusBar name="$parentBar" inherits="TextStatusBar" setAllPoints="true">
				<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentText1" relativePoint="TOPLEFT">		
						<Offset>
							<AbsDimension x="2" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>	
			</StatusBar>
		</Frames>
	</Frame>

	<Frame name="KLHTM_TableTemplate" hidden="true" virtual="true">		
		<Frames>
			<Frame name="$parentRowLabel" inherits="KLHTM_RowTemplate" id="0">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="TOPLEFT">		
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow1" inherits="KLHTM_RowTemplate" id="1">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRowLabel" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>			
			<Frame name="$parentRow2" inherits="KLHTM_RowTemplate" id="2">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow3" inherits="KLHTM_RowTemplate" id="3">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow4" inherits="KLHTM_RowTemplate" id="4">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow3" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow5" inherits="KLHTM_RowTemplate" id="5">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow4" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow6" inherits="KLHTM_RowTemplate" id="6">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow5" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow7" inherits="KLHTM_RowTemplate" id="7">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow6" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow8" inherits="KLHTM_RowTemplate" id="8">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow7" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow9" inherits="KLHTM_RowTemplate" id="9">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow8" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow10" inherits="KLHTM_RowTemplate" id="10">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow9" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow11" inherits="KLHTM_RowTemplate" id="11">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow10" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow12" inherits="KLHTM_RowTemplate" id="12">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow11" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow13" inherits="KLHTM_RowTemplate" id="13">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow12" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow14" inherits="KLHTM_RowTemplate" id="14">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow13" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
			<Frame name="$parentRow15" inherits="KLHTM_RowTemplate" id="15">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentRow14" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>				
			</Frame>
		</Frames>
	</Frame>

</Ui>