<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="CharacterFrame.lua"/>
    <Frame name="CVCharacterFrame" toplevel="true" movable="true" parent="UIParent" hidden="true">
        <Size>
            <AbsDimension x="384" y="512"/>
        </Size>
        <Anchors>
            <Anchor point="TOPLEFT">
                <Offset>
                    <AbsDimension x="0" y="-104"/>
                </Offset>
            </Anchor>
        </Anchors>
		<HitRectInsets>
			<AbsInset left="0" right="30" top="0" bottom="45"/>
		</HitRectInsets>
        <Layers>
            <Layer level="ARTWORK">
                <Texture name="CVCharacterFramePortrait">
                    <Size>
                        <AbsDimension x="60" y="60"/>
                    </Size>
                    <Anchors>
                        <Anchor point="TOPLEFT">
                            <Offset>
                                <AbsDimension x="7" y="-6"/>
                            </Offset>
                        </Anchor>
                    </Anchors>
                </Texture>
            </Layer>
        </Layers>
        <Frames>
            <Frame name="CVCharacterNameFrame">
                <Size>
                    <AbsDimension x="109" y="12"/>
                </Size>
                 <Anchors>
                    <Anchor point="CENTER">
                        <Offset>
                            <AbsDimension x="6" y="232"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Layers>
                    <Layer>
                        <FontString name="CVCharacterNameText" inherits="GameFontNormal" text="NAME">
                            <Size>
                                <AbsDimension x="300" y="12"/>
                            </Size>
                            <Anchors>
                                <Anchor point="CENTER"/>
                            </Anchors>
                            <Color r="1.0" g="1.0" b="1.0"/>
                        </FontString>
                    </Layer>
                </Layers>
                <Scripts>
                     <OnLoad>
                        this:SetFrameLevel(this:GetFrameLevel() + 1);
                    </OnLoad>
                </Scripts>
            </Frame>
            <Button name="CVCharacterFrameCloseButton" inherits="UIPanelCloseButton">
                <Anchors>
                    <Anchor point="CENTER" relativeTo="CVCharacterFrame" relativePoint="TOPRIGHT">
                        <Offset>
                            <AbsDimension x="-44" y="-25"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
                    <OnLoad>
                        this:SetFrameLevel(this:GetFrameLevel() + 4);
                    </OnLoad>
                </Scripts>
            </Button>
            <Button name="CVCharacterFrameTab1" inherits="CVCharacterFrameTabButtonTemplate" id="1" text="CHARACTER">
                <Anchors>
                    <Anchor point="CENTER" relativePoint="BOTTOMLEFT">
                        <Offset>
                            <AbsDimension x="55" y="62"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(CHARACTER_INFO), "TOGGLECHARACTER0"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
            <Button name="CVCharacterFrameTab2" inherits="CVCharacterFrameTabButtonTemplate" id="2" text="PET">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab1" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(PET), "TOGGLECHARACTER3"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
			<Button name="CVCharacterFrameTab3" inherits="CVCharacterFrameTabButtonTemplate" id="3" text="REPUTATION">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab2" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(REPUTATION), "TOGGLECHARACTER2"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
			<Button name="CVCharacterFrameTab4" inherits="CVCharacterFrameTabButtonTemplate" id="4" text="SKILLS">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab3" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(SKILLS), "TOGGLECHARACTER1"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
			<Button name="CVCharacterFrameTab5" inherits="CVCharacterFrameTabButtonTemplate" id="5" text="HONOR">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab4" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(HONOR), "TOGGLECHARACTER4"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
				<Button name="CVCharacterFrameTab6" inherits="CVCharacterFrameTabButtonTemplate" id="6" text="CHARACTERSVIEWER_REPORT">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab5" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(HONOR), "TOGGLECHARACTER4"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
				<Button name="CVCharacterFrameTab7" inherits="CVCharacterFrameTabButtonTemplate" id="7" text="CHARACTERSVIEWER_OPTION">
                <Anchors>
                   <Anchor point="LEFT" relativeTo="CVCharacterFrameTab6" relativePoint="RIGHT">
                        <Offset>
                            <AbsDimension x="-18" y="0"/>
                        </Offset>
                    </Anchor>
                </Anchors>
                <Scripts>
					<OnEnter>
						--GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
						--GameTooltip:SetText(MicroButtonTooltipText(TEXT(HONOR), "TOGGLECHARACTER4"), 1.0,1.0,1.0 );
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
                </Scripts>
            </Button>
        </Frames>
        <Scripts>
			<OnLoad>
				tinsert(UISpecialFrames,"CVCharacterFrame");
				CharactersViewer.CharacterFrame.CharacterFrame_OnLoad();
			</OnLoad>
            <OnEvent>
				CharactersViewer.OnEvent(event);
            </OnEvent>
            <OnShow>
				CharactersViewer.CharacterFrame.CharacterFrame_OnShow();
            </OnShow>
			<OnHide>
				if ( this.isMoving ) then
					this:StopMovingOrSizing();
					this.isMoving = false;
				end
				CharactersViewer.CharacterFrame.CharacterFrame_OnHide();
			</OnHide>	
			<OnMouseUp>
				if ( this.isMoving ) then
					this:StopMovingOrSizing();
					this.isMoving = false;
				end
			</OnMouseUp>
			<OnMouseDown>
				if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
					this:StartMoving();
					this.isMoving = true;
				end
			</OnMouseDown>
		</Scripts>
    </Frame>
	 
	 <Frame name="CVHonorFrame" toplevel="true" movable="true" parent="UIParent" hidden="true"> </Frame>
	 <Frame name="CVPetPaperDollFrame" toplevel="true" movable="true" parent="UIParent" hidden="true"> </Frame>
	 <Frame name="CVHonorFrame" toplevel="true" movable="true" parent="UIParent" hidden="true"> </Frame>
	 
</Ui>
