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

	<!-- =============================================================== -->
	<!-- Various frame element templates used by MobInfo options frame   -->
	<!-- =============================================================== -->

	<!-- ============================================================ -->
	<!-- Template for a tooltip entry       -->
	<FontString name="MI3TT_InfoTemplate" inherits="GameFontNormal" justifyH="LEFT" justifyV="TOP" virtual="true">
			<Color r="1.0" g="1.0" b="1.0"/>
	</FontString>
	<FontString name="MI3TT_TextTemplate" inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="TOP" text="TXT" virtual="true">
   	<Color r="1.0" g="0.8" b="0.0"/>
	</FontString>
	<FontString name="MI3TT_ValTemplate" inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="TOP" text="VAL" virtual="true">
   	<Color r="1.0" g="1.0" b="1.0"/>
	</FontString>
	<FontString name="MI3TT_ItemTemplate" inherits="GameFontNormalSmall" justifyH="LEFT" justifyV="TOP" text="ITEM" virtual="true">
	</FontString>
		
	<!-- ============================================================ -->
	<!-- Template for one line of the search result scroll list       -->
	<Button name="MI3_SearchResultLineTemplate" virtual="true">
		<Size x="360" y="14"/>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
			</Layer>
			<Layer level="ARTWORK">
				<FontString name="$parentIndex" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="30" y="12"/>
					<Anchors>
						<Anchor point="LEFT"> <Offset x="0" y="0"/></Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentValue" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Size x="70" y="12"/>
					<Anchors>
						<Anchor point="LEFT"> <Offset x="35" y="0"/></Anchor>
					</Anchors>
				</FontString>
				<FontString name="$parentName" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size x="250" y="12"/>
					<Anchors>
						<Anchor point="LEFT"> <Offset x="115" y="0"/></Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnter> getglobal(this:GetName().."Highlight"):Show() MI3_ShowSearchResultTooltip() </OnEnter>
			<OnLeave> getglobal(this:GetName().."Highlight"):Hide() MI3_HideSearchResultTooltip() </OnLeave> 
		</Scripts>
		<NormalText name="$parentNormalText" inherits="GameFontNormalSmall" justifyH="LEFT"/>
	</Button>

	<!-- ============================================================ -->
	<!-- Template for frame	around option groups + title above frame  -->
	<Frame name="MI3_OptionsBoxTemplate" virtual="true">
		<Backdrop name="$parentBD" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize> <AbsValue val="16"/> </EdgeSize>
		</Backdrop> 	
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentTitle" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT"> <Offset x="4" y="10"/></Anchor>
					</Anchors>
					<Color r="1.0" g="1.0" b="1.0"/> 
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad> getglobal(this:GetName().."Title"):SetText(MI3_FRAME_TEXTS[this:GetName()]) </OnLoad>
		</Scripts>
	</Frame>

	<!-- ============================================================ -->
	<!-- Template for all checkboxes used in options dialog			  -->
	<!-- defines size, text	and	all	otherevent related actions		  -->
	<CheckButton name="MI3_CheckboxTemplate" inherits="UICheckButtonTemplate" virtual="true">
		<Size x="20"	y="20" />
				<HitRectInsets>	<AbsInset left="0" right="-20"	top="0"	bottom="0"/> </HitRectInsets>
		<Scripts>
			<OnLoad> local opt=MI3_OPTIONS[this:GetName()] getglobal(this:GetName().."Text"):SetText(opt.opt or opt.text) </OnLoad>
			<OnClick> MI3_SlashParse(this:GetName()) </OnClick>
			<OnEnter> MI3_ShowOptionHelpTooltip() </OnEnter>
			<OnLeave> GameTooltip:Hide() </OnLeave>
		</Scripts>
	</CheckButton>
	<CheckButton name="MI3_BigCheckboxTemplate" inherits="MI3_CheckboxTemplate" virtual="true">
		<Scripts>
			<OnLoad>  getglobal(this:GetName().."Text"):SetText(MI3_OPTIONS[this:GetName()].text)
			this:SetScale( 1.2 ) </OnLoad>
		</Scripts>
	</CheckButton>

	<!-- ==============================================================	-->
	<!-- Template for all search options checkboxes						-->
	<CheckButton name="MI3_SearchCheckboxTemplate" inherits="UICheckButtonTemplate" virtual="true">
		<Size x="24"	y="24" />
		<HitRectInsets>	<AbsInset left="0" right="-40"	top="0"	bottom="0"/> </HitRectInsets>
		<Scripts>
			<OnLoad>  getglobal(this:GetName().."Text"):SetText(MI3_OPTIONS[this:GetName()].text) </OnLoad>
			<OnClick> MI3_SearchCheckboxClicked()	</OnClick>
			<OnEnter> MI3_ShowOptionHelpTooltip() </OnEnter>
			<OnLeave> GameTooltip:Hide() </OnLeave>
		</Scripts>
	</CheckButton>

	<!-- ============================================================ -->
	<!-- Template for all push buttons options dialog				  -->
	<!-- defines text and all other	event related actions			  -->
	<Button	name="MI3_PushButtonTemplate" inherits="OptionsButtonTemplate" virtual="true">
		<Size x="100" y="22"/>
		<Scripts>
			<OnLoad>  getglobal(this:GetName()):SetText(MI3_OPTIONS[this:GetName()].text) </OnLoad>
			<OnClick> MI3_SlashParse(this:GetName()) </OnClick>
			<OnEnter> MI3_ShowOptionHelpTooltip() </OnEnter>
			<OnLeave> GameTooltip:Hide() </OnLeave>
		</Scripts>
	</Button>

	<!-- ============================================================ -->
	<!-- Template for all sliders in options dialog					  -->
	<!-- defines text and all other	event related actions			  -->
	<Slider	name="MI3_SliderTemplate" inherits="OptionsSliderTemplate" virtual="true">
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentValueText" inherits="GameFontNormalSmall">
					<Anchors>
						<Anchor point="TOPLEFT" relativePoint="TOPRIGHT">
							<Offset x="2" y="-4"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>  
				getglobal(this:GetName().."Text"):SetText(MI3_OPTIONS[this:GetName()].text); 
				getglobal(this:GetName().."Low"):Hide();
				getglobal(this:GetName().."High"):Hide();
				this:SetValueStep( 1 );
				MI3_OPTIONS[this:GetName()].val = 1
			</OnLoad>
			<OnEnter> MI3_ShowOptionHelpTooltip(); </OnEnter>
			<OnLeave> GameTooltip:Hide(); </OnLeave>
			<OnValueChanged> 
				MI3_SlashParse(this:GetName().." "..math.floor(this:GetValue()))
				local valTxtFrame = getglobal( this:GetName().."ValueText" )
				valTxtFrame:SetText( tostring(math.floor(this:GetValue())) )
			</OnValueChanged>
		</Scripts>
	</Slider>

	<Button	name="MI3_DropDownTemplate" inherits="UIDropDownMenuTemplate" virtual="true">
		<Layers>
			<Layer level="BACKGROUND">
				<FontString	name="$parentTitle"	inherits="GameFontNormalSmall" text="Font">
					<Anchors>
						<Anchor	point="BOTTOMLEFT" relativePoint="TOPLEFT">
							<Offset x="20" y="0"/>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				UIDropDownMenu_SetWidth(self, 120 )
				getglobal(this:GetName().."Title"):SetText( MI3_OPTIONS[this:GetName()].text )
				UIDropDownMenu_Initialize( this, MI3_DropDown_Initialize )
				MI3_OPTIONS[this:GetName()].dd = 1
			</OnLoad>
			<OnShow> MI3_DropDown_OnShow(self) </OnShow>
			<OnEnter> MI3_ShowOptionHelpTooltip() </OnEnter>
			<OnLeave> GameTooltip:Hide() </OnLeave>
		</Scripts>
	</Button>

	<!-- ============================================================ -->
	<!-- Template for value edit boxes in search options dialog		  -->
	<!-- the edit box is prefixed with a description text			  -->
	<EditBox name="MI3_EditBox_Template" autoFocus="false" inherits="InputBoxTemplate" virtual="true">
		<Size x="26" y="24"/>
		<Layers>
			<Layer level="BACKGROUND">
				<FontString	name="$parentDesc" inherits="GameFontNormalSmall" justifyH="RIGHT">
					<Anchors> <Anchor	point="BOTTOMRIGHT"	relativePoint="BOTTOMLEFT">
						<Offset x="-6" y="5"/>
					</Anchor> </Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnEnterPressed>	this:ClearFocus();	</OnEnterPressed>
			<OnEscapePressed>	this:ClearFocus();	</OnEscapePressed>
			<OnLoad>	getglobal(this:GetName().."Desc"):SetText(MI3_OPTIONS[this:GetName()].text); </OnLoad>
			<OnEnter>	MI3_ShowOptionHelpTooltip(); </OnEnter>
			<OnLeave>	GameTooltip:Hide();			</OnLeave>
		</Scripts>
	</EditBox>

	<!-- ============================================================ -->
	<!-- Template for value edit boxes in search options dialog		  -->
	<!-- the edit box is prefixed with a description text			  -->
	<EditBox name="MI3_ValueEditBox_Template" letters="2" numeric="true" inherits="MI3_EditBox_Template" virtual="true">
		<Scripts>
			<OnTextChanged>	MI3_SearchValueChanged(); </OnTextChanged>
		</Scripts>
	</EditBox>

	<!-- ============================================================ -->
	<!-- Template for text edit boxes in search options dialog		  -->
	<!-- the edit box is prefixed with a description text			  -->
	<EditBox name="MI3_TextEditBox_Template" letters="28" inherits="MI3_EditBox_Template" virtual="true">
		<Size x="135" y="24"/>
		<Scripts>
			<OnTextChanged>	MI3_SearchTextChanged() </OnTextChanged>
		</Scripts>
	</EditBox>

	<!-- ============================================================ -->
	<!-- Template for text edit boxes in options dialog		          -->
	<!-- the edit box is prefixed with a description text			  -->
	<EditBox name="MI3_OptionsEditBox_Template" letters="28" inherits="MI3_EditBox_Template" virtual="true">
		<Scripts>
			<OnLoad>
				getglobal(this:GetName().."Desc"):ClearAllPoints()
				getglobal(this:GetName().."Desc"):SetPoint( "TOPLEFT", 0, 10 )
				getglobal(this:GetName().."Desc"):SetText(MI3_OPTIONS[this:GetName()].text)
				MI3_OPTIONS[this:GetName()].txt = 1
			</OnLoad>
			<OnTextChanged>	MI3_SlashParse(this:GetName().." "..this:GetText()) </OnTextChanged>
		</Scripts>
	</EditBox>

	<!-- ============================================================ -->
	<!-- Template for TAB button in the options dialog				  -->
	<!-- TAB buttons select the options page to display				  -->
	<Button	name="MI3_TabButtonTemplate" inherits="TabButtonTemplate" virtual="true">
		<Scripts>
			<OnClick> MI3_TabButton_OnClick( self	)</OnClick>
			<OnEnter> MI3_ShowOptionHelpTooltip(); </OnEnter>
			<OnLeave> GameTooltip:Hide(); </OnLeave>
			<OnLoad>  
				getglobal(self:GetName()):SetText(MI3_OPTIONS[self:GetName()].text);
				PanelTemplates_TabResize(self, 0)
			</OnLoad>
		</Scripts>
	</Button>
</Ui>
