<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">

	<Frame name="WIM_IconFrame" parent="UIParent" enableMouse="true" hidden="false" frameStrata="LOW"  clampedToScreen="true" movable="true">
		<Size>
			<AbsDimension x="32" y="32"/>
		</Size>
		<Anchors>
			<Anchor point="TOPLEFT" relativeTo="Minimap" relativePoint="RIGHT">
				<Offset>
					<AbsDimension x="2" y="0"/>
				</Offset>
			</Anchor>
		</Anchors>
		<Frames>
			<Button name="$parentButton">
				<Size>
					<AbsDimension x="32" y="32"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="0" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<NormalTexture file="Interface\AddOns\WIM\Images\miniDisabled"/>
				<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
				<Scripts>
					<OnLoad>
						this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
					</OnLoad>
					<OnClick>
						if( not IsShiftKeyDown() ) then
							if(arg1 == "LeftButton") then
								WIM_Icon_ToggleDropDown();
							else
								WIM_ConversationMenu:Hide();
								if( WIM_Data.menuOnRightClick ) then
									WIM_IconNavMenu_Toggle();
								else
									WIM_ShowNewMessages();
								end
							end
						end
					</OnClick>
					<OnEnter>
						if(WIM_Data.showToolTips == true and (not IsShiftKeyDown())) then
							WIM_Icon_ToolTip:Show();
							WIM_Icon_ToolTip:ClearAllPoints();
							WIM_Icon_ToolTip:SetPoint("BOTTOMRIGHT", this, "TOPLEFT", 5 , -5);
						else
							WIM_Icon_ToolTip:Hide();
						end
					</OnEnter>
					<OnLeave>
						WIM_Icon_ToolTip:Hide();
					</OnLeave>
					<OnMouseDown>
						if( IsShiftKeyDown() and WIM_Data.miniFreeMoving.enabled == true and arg1 == "LeftButton" ) then
							WIM_Icon_ToolTip:Hide();
							this:GetParent():StartMoving();
							this:GetParent().isMoving = true;
						end
					</OnMouseDown>
					<OnMouseUp>
						this:GetParent():StopMovingOrSizing();
						this:GetParent().isMoving = false;
						if(WIM_Data.miniFreeMoving.enabled) then
							WIM_Data.miniFreeMoving.left = WIM_IconFrame:GetLeft();
							WIM_Data.miniFreeMoving.top = WIM_IconFrame:GetTop();
						end
					</OnMouseUp>
				</Scripts>
				<Frames>
					<Frame name="WIM_Icon_NewMessageFlash" hidden="true"  frameStrata="DIALOG">
						<Size>
							<AbsDimension x="32" y="32"/>
						</Size>
						<Anchors>
							<Anchor point="TOPLEFT">
								<Offset>
									<AbsDimension x="0" y="0"/>
								</Offset>
							</Anchor>
						</Anchors>
						<Layers>
							<Layer level="BACKGROUND">
								<Texture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight">
									<Size>
										<AbsDimension x="32" y="32"/>
									</Size>
									<Anchors>
										<Anchor point="TOPLEFT">
											<Offset>
												<AbsDimension x="0" y="0"/>
											</Offset>
										</Anchor>
									</Anchors>
								</Texture>
							</Layer>
						</Layers>
					</Frame>
				</Frames>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				WIM_Icon_UpdatePosition();
				this:Raise();
			</OnLoad>
			<OnEvent>
				
			</OnEvent>
			<OnUpdate>
				WIM_Icon_OnUpdate(arg1);
			</OnUpdate>
		</Scripts>
	</Frame>

	<Frame name="WIM_Icon_ToolTip" hidden="true" frameStrata="TOOLTIP" clampedToScreen="true">
		<Size>
			<AbsDimension x="250" y="88" />
		</Size>
		<Anchors>
			<Anchor point="BOTTOMRIGHT" relativePoint="TOPLEFT">
				<Offset>
					<AbsDimension x="5" y="-5" />
				</Offset>
			</Anchor>
		</Anchors>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5" />
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="16" />
			</TileSize>
			<EdgeSize>
				<AbsValue val="16" />
			</EdgeSize>
			<Color r="0" g="0" b="0" />
			<BorderColor r="1" g="1" b="1" />
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString name="$parentTitle" inherits="GameFontNormalLarge" text="WIM">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="10" y="-10"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="0.8196079" b="0" />
				</FontString>
				<FontString inherits="GameFontNormal" text="WIM_VERSION">
					<Anchors>
						<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT">
							<Offset>
								<AbsDimension x="-10" y="-10"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="15" />
					</FontHeight>
					<Color r="0.5" g="0.5" b="0.5" />
				</FontString>
				<FontString name="$parentLine1" inherits="GameFontNormal" text="WIM_LOCALIZED_ICON_CONVO_MENU">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentTitle" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString inherits="GameFontNormal" text="WIM_LOCALIZED_LEFT_CLICK">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parentLine1" relativePoint="TOP" />
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-10" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="$parentLine2" inherits="GameFontNormal" text="WIM_LOCALIZED_ICON_WIM_TOOLS">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLine1" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString inherits="GameFontNormal" text="WIM_LOCALIZED_RIGHT_CLICK">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parentLine2" relativePoint="TOP" />
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-10" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString name="$parentLine3" inherits="GameFontNormal" text="WIM_LOCALIZED_ICON_OPTIONS">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="$parentLine2" relativePoint="BOTTOMLEFT">
							<Offset>
								<AbsDimension x="0" y="-5"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
				<FontString inherits="GameFontNormal" text="/wim">
					<Anchors>
						<Anchor point="TOP" relativeTo="$parentLine3" relativePoint="TOP" />
						<Anchor point="RIGHT" relativeTo="$parent" relativePoint="RIGHT">
							<Offset>
								<AbsDimension x="-10" y="0"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="20" />
					</FontHeight>
					<Color r="1" g="1" b="1" />
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				this:Raise();
			</OnLoad>
			<OnShow>
				this:SetScale(UIParent:GetScale());
			</OnShow>
		</Scripts>
	</Frame>

	<!-- CONVERSATION MENU COMPONENTS -->
	<Button name="WIM_ConversationMenuButtonTemplate" virtual="true">
		<Size>
			<AbsDimension x="110" y="16"/>
		</Size>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alpha=".5" alphaMode="ADD" setAllPoints="true" hidden="true"/>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentClose" hidden="false">
				<Size>
					<AbsDimension x="16" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="RIGHT">
						<Offset>
							<AbsDimension x="-6" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnShow>
						this:SetAlpha(.4);
					</OnShow>
					<OnClick>
						WIM_CloseConvo(this:GetParent().theUser);
						PlaySound("UChatScrollButton");
					</OnClick>
					<OnEnter>
						getglobal(this:GetParent():GetName().."Highlight"):Show();
						this:SetAlpha(1);
						this:GetParent():GetParent().timeElapsed = 0;
						this:GetParent():GetParent().isCounting = false;
					</OnEnter>
					<OnLeave>
						getglobal(this:GetParent():GetName().."Highlight"):Hide();
						this:SetAlpha(.4);
						this:GetParent().timeElapsed = 0;
						this:GetParent().isCounting = true;
					</OnLeave>
				</Scripts>
				<NormalTexture name="$parentNormalTexture" file="Interface\AddOns\WIM\Images\closebutton"/>
			</Button>
		</Frames>
		<Scripts>
			<OnLoad>
				getglobal(this:GetName().."Highlight"):SetAlpha(.25);
			</OnLoad>
			<OnClick>
				WIM_Icon_PlayerClick();
				this:GetParent():Hide();
				PlaySound("UChatScrollButton");
			</OnClick>
			<OnEnter>
				getglobal(this:GetName().."Highlight"):Show();
				this:GetParent().timeElapsed = 0;
				this:GetParent().isCounting = false;
			</OnEnter>
			<OnLeave>
				getglobal(this:GetName().."Highlight"):Hide();
				this:GetParent().timeElapsed = 0;
				this:GetParent().isCounting = true;
			</OnLeave>
		</Scripts>
		<ButtonText name="$parentNormalText" justifyH="LEFT"/>
		<NormalFont inherits="GameFontHighlightSmall" justifyH="LEFT"/>
		<HighlightFont inherits="GameFontHighlightSmall" justifyH="LEFT"/>
		<DisabledFont inherits="GameFontDisableSmall" justifyH="LEFT"/>
	</Button>




	<Frame name="WIM_ConversationMenu" hidden="true" frameStrata="TOOLTIP" clampedToScreen="true">
		<Size>
			<AbsDimension x="128" y="88" />
		</Size>
		<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5" />
			</BackgroundInsets>
			<TileSize>
				<AbsValue val="16" />
			</TileSize>
			<EdgeSize>
				<AbsValue val="16" />
			</EdgeSize>
			<Color r="0" g="0" b="0" />
			<BorderColor r="1" g="1" b="1" />
		</Backdrop>
		<Layers>
			<Layer level="ARTWORK">
				<FontString inherits="GameFontNormalSmall" text="WIM_LOCALIZED_CONVERSATIONS">
					<Anchors>
						<Anchor point="TOPLEFT">
							<Offset>
								<AbsDimension x="15" y="-15"/>
							</Offset>
						</Anchor>
					</Anchors>
					<FontHeight>
						<AbsValue val="12" />
					</FontHeight>
					<Color r="1" g="0.8196079" b="0" />
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="$parentTellButton1" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT">
						<Offset>
							<AbsDimension x="15" y="-30" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton2" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton1" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton3" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton2" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton4" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton3" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton5" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton4" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton6" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton5" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton7" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton6" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton8" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton7" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton9" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton8" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton10" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton9" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton11" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton10" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton12" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton11" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton13" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton12" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton14" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton13" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton15" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton14" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton16" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton15" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton17" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton16" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton18" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton17" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton19" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton18" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>
			<Button name="$parentTellButton20" inherits="WIM_ConversationMenuButtonTemplate" text="Test">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentTellButton19" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="0" />
						</Offset>
					</Anchor>
				</Anchors>
			</Button>

		
		</Frames>
		<Scripts>
			<OnShow>
				--this:SetScale(UIParent:GetScale());
				this.timeElapsed = 0;
				this.isCounting = false;
			</OnShow>
			<OnHide>
				this.timeElapsed = 0;
				this.isCounting = false;
			</OnHide>
			<OnEnter>
				this.timeElapsed = 0;
				this.isCounting = false;
			</OnEnter>
			<OnLeave>
				this.timeElapsed = 0;
				this.isCounting = true;
			</OnLeave>
			<OnUpdate>
				WIM_ConversationMenu_OnUpdate(arg1);
			</OnUpdate>
		</Scripts>
	</Frame>

	<Frame name="WIM_IconNavMenu" inherits="UIDropDownMenuTemplate"  clampedToScreen="true">
		<Scripts>
			<OnLoad>
				UIDropDownMenu_Initialize(this, WIM_IconNavMenu_Initialize, "MENU");
			</OnLoad>
		</Scripts>
	</Frame>

</Ui>