FloatingChatFrame.xml

FloatingChatFrame.xml (8.3.0.34963; unchanged since 8.2.5.31960)
  1. <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/
  2. ..\FrameXML\UI.xsd">
  3.   <Script file="FloatingChatFrame.lua"/>
  4.   <Script file="ChannelFrameButtonMixin.lua"/>
  5.   <Script file="ChatAlertFrameMixin.lua"/>
  6.   <Frame name="FloatingBorderedFrame" virtual="true">
  7.     <Layers>
  8.       <Layer level="BACKGROUND">
  9.         <Texture name="$parentBackground" parentKey="Background" file="Interface\ChatFrame\ChatFrameBackground">
  10.           <Anchors>
  11.             <Anchor point="TOPLEFT" x="-2" y="3"/>
  12.             <Anchor point="TOPRIGHT" x="2" y="3"/>
  13.             <Anchor point="BOTTOMLEFT" x="-2" y="-6"/>
  14.             <Anchor point="BOTTOMRIGHT" x="3" y="-6"/>
  15.           </Anchors>
  16.         </Texture>
  17.       </Layer>
  18.       <Layer level="BORDER">
  19.         <Texture name="$parentTopLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  20.           <Size x="8" y="8"/>
  21.           <Anchors>
  22.             <Anchor point="TOPLEFT" relativeTo="$parentBackground" x="-4" y="4"/>
  23.           </Anchors>
  24.         </Texture>
  25.         <Texture name="$parentBottomLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  26.           <Size x="8" y="8"/>
  27.           <Anchors>
  28.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBackground" x="-4" y="-4"/>
  29.           </Anchors>
  30.           <TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
  31.         </Texture>
  32.         <Texture name="$parentTopRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  33.           <Size x="8" y="8"/>
  34.           <Anchors>
  35.             <Anchor point="TOPRIGHT" relativeTo="$parentBackground" x="4" y="4"/>
  36.           </Anchors>
  37.           <TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
  38.         </Texture>
  39.         <Texture name="$parentBottomRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderCorner">
  40.           <Size x="8" y="8"/>
  41.           <Anchors>
  42.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBackground" x="4" y="-4"/>
  43.           </Anchors>
  44.           <TexCoords left="1.0" right="0.0" top="1.0" bottom="0.0"/>
  45.         </Texture>
  46.         <Texture name="$parentLeftTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderLeft" vertTile="true">
  47.           <Size x="16" y="0"/>
  48.           <Anchors>
  49.             <Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="BOTTOMLEFT"/>
  50.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeftTexture" relativePoint="TOPLEFT"/>
  51.           </Anchors>
  52.         </Texture>
  53.         <Texture name="$parentRightTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderLeft" vertTile="true">
  54.           <Size x="16" y="0"/>
  55.           <Anchors>
  56.             <Anchor point="TOPRIGHT" relativeTo="$parentTopRightTexture" relativePoint="BOTTOMRIGHT"/>
  57.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRightTexture" relativePoint="TOPRIGHT"/>
  58.           </Anchors>
  59.           <TexCoords left="1.0" right="0.0" top="0.0" bottom="1.0"/>
  60.         </Texture>
  61.         <Texture name="$parentBottomTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderTop" horizTile="true">
  62.           <Size x="0" y="16"/>
  63.           <Anchors>
  64.             <Anchor point="BOTTOMLEFT" relativeTo="$parentBottomLeftTexture" relativePoint="BOTTOMRIGHT"/>
  65.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentBottomRightTexture" relativePoint="BOTTOMLEFT"/>
  66.           </Anchors>
  67.           <TexCoords left="0.0" right="1.0" top="1.0" bottom="0.0"/>
  68.         </Texture>
  69.         <Texture name="$parentTopTexture" file="Interface\ChatFrame\UI-ChatFrame-BorderTop" horizTile="true">
  70.           <Size x="0" y="16"/>
  71.           <Anchors>
  72.             <Anchor point="TOPLEFT" relativeTo="$parentTopLeftTexture" relativePoint="TOPRIGHT"/>
  73.             <Anchor point="TOPRIGHT" relativeTo="$parentTopRightTexture" relativePoint="TOPLEFT"/>
  74.           </Anchors>
  75.         </Texture>
  76.       </Layer>
  77.     </Layers>
  78.   </Frame>
  79.   <Button name="DockManagerOverflowListButtonTemplate" virtual="true">
  80.     <Size x="150" y="12"/>
  81.     <Layers>
  82.       <Layer level="BACKGROUND">
  83.         <Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" parentKey="highlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
  84.       </Layer>
  85.       <Layer level="BORDER">
  86.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  87.           <Anchors>
  88.             <Anchor point="BOTTOMLEFT" x="8" y="-2"/>
  89.             <Anchor point="BOTTOMRIGHT" x="-8" y="-2"/>
  90.           </Anchors>
  91.         </Texture>
  92.       </Layer>
  93.       <Layer level="ARTWORK">
  94.         <Texture name="$parentConversationIcon" file="Interface\ChatFrame\UI-ChatConversationIcon" parentKey="conversationIcon">
  95.           <Size x="16" y="16"/>
  96.           <Anchors>
  97.             <Anchor point="LEFT" x="2" y="-1"/>
  98.           </Anchors>
  99.         </Texture>
  100.       </Layer>
  101.     </Layers>
  102.     <Scripts>
  103.       <OnEnter>
  104.         self.highlight:Show();
  105.       </OnEnter>
  106.       <OnLeave>
  107.         self.highlight:Hide();
  108.       </OnLeave>
  109.       <OnClick>
  110.         FCFDockOverflowListButton_OnClick(self, button)
  111.       </OnClick>
  112.     </Scripts>
  113.     <ButtonText>
  114.       <Anchors>
  115.         <Anchor point="LEFT" x="20" y="0"/>
  116.         <Anchor point="RIGHT" x="-20" y="0"/>
  117.       </Anchors>
  118.     </ButtonText>
  119.     <NormalFont style="GameFontNormalSmallLeft"/>
  120.   </Button>
  121.   <Frame name="DockManagerOverflowListTemplate" hidden="true" clampedToScreen="true" virtual="true">
  122.     <Size x="160" y="12"/>
  123.     <Layers>
  124.       <Layer level="ARTWORK">
  125.         <FontString name="$parentNumTabs" inherits="GameFontDisable" parentKey="numTabs">
  126.           <Anchors>
  127.             <Anchor point="TOPLEFT" x="24" y="-5"/>
  128.           </Anchors>
  129.         </FontString>
  130.       </Layer>
  131.     </Layers>
  132.     <Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
  133.       <EdgeSize val="16"/>
  134.       <TileSize val="16"/>
  135.       <BackgroundInsets left="4" right="5" top="5" bottom="4"/>
  136.     </Backdrop>
  137.     <Scripts>
  138.       <OnLoad>
  139.         self:SetBackdropColor(0.05, 0.05, 0.11);
  140.         self.buttons = {};
  141.       </OnLoad>
  142.     </Scripts>
  143.   </Frame>
  144.   <Frame name="DockManagerTemplate" frameStrata="LOW" virtual="true" parent="UIParent">
  145.     <Size x="0" y="26"/>
  146.     <Layers>
  147.       <Layer level="ARTWORK">
  148.         <Texture name="$parentInsertHighlight" file="Interface\ChatFrame\UI-ChatFrame-DockHighlight" alphaMode="ADD" parentKey="insertHighlight">
  149.           <Size x="32" y="32"/>
  150.         </Texture>
  151.       </Layer>
  152.     </Layers>
  153.     <Frames>
  154.       <Button name="$parentOverflowButton" parentKey="overflowButton" alpha="0.6">
  155.         <Size x="16" y="16"/>
  156.         <Anchors>
  157.           <Anchor point="BOTTOMRIGHT" x="0" y="-5"/>
  158.         </Anchors>
  159.         <Frames>
  160.           <Frame name="$parentList" inherits="DockManagerOverflowListTemplate" parentKey="list">
  161.             <Anchors>
  162.               <Anchor point="LEFT" relativePoint="RIGHT"/>
  163.             </Anchors>
  164.           </Frame>
  165.         </Frames>
  166.         <Scripts>
  167.           <OnLoad>
  168.             self.width = self:GetWidth();
  169.             self:RegisterEvent("UPDATE_CHAT_COLOR");
  170.           </OnLoad>
  171.           <OnEvent>
  172.             FCFDockOverflowButton_OnEvent(self, event, ...);
  173.           </OnEvent>
  174.           <OnClick>
  175.             FCFDockOverflowButton_OnClick(self, button);
  176.           </OnClick>
  177.         </Scripts>
  178.         <NormalTexture file="Interface\ChatFrame\chat-tab-arrow"/>
  179.         <HighlightTexture file="Interface\ChatFrame\chat-tab-arrow-on" alphaMode="ADD"/>
  180.       </Button>
  181.       <ScrollFrame name="$parentScrollFrame" parentKey="scrollFrame">
  182.         <Size x="0" y="31"/>
  183.         <Anchors>
  184.           <Anchor point="BOTTOMRIGHT" x="0" y="-5"/>
  185.         </Anchors>
  186.         <ScrollChild>
  187.           <Frame name="$parentChild" parentKey="child">
  188.             <Size x="1" y="26"/>
  189.             <Anchors>
  190.               <Anchor point="LEFT"/>
  191.             </Anchors>
  192.           </Frame>
  193.           <!--Frames will be dynamically added to the ScrollChild for now-->
  194.         </ScrollChild>
  195.       </ScrollFrame>
  196.     </Frames>
  197.     <Scripts>
  198.       <OnLoad function="FCFDock_OnLoad"/>
  199.       <OnEvent>
  200.         FCFDock_OnEvent(self, event, ...);
  201.       </OnEvent>
  202.     </Scripts>
  203.   </Frame>
  204.  
  205.   <!-- Tab Template-->
  206.   <Texture name="ChatTabConversationIconTemplate" file="Interface\ChatFrame\UI-ChatConversationIcon" virtual="true">
  207.     <Size x="16" y="16"/>
  208.   </Texture>
  209.   <Button name="ChatTabArtTemplate" virtual="true" alpha="0.4">
  210.     <Size x="64" y="32"/>
  211.     <Layers>
  212.       <Layer level="BACKGROUND">
  213.         <Texture name="$parentLeft" file="Interface\ChatFrame\ChatFrameTab-BGLeft" parentKey="leftTexture">
  214.           <Size x="16" y="32"/>
  215.           <Anchors>
  216.             <Anchor point="TOPLEFT"/>
  217.           </Anchors>
  218.         </Texture>
  219.         <Texture name="$parentMiddle" file="Interface\ChatFrame\ChatFrameTab-BGMid" horizTile="true" parentKey="middleTexture">
  220.           <Size x="44" y="32"/>
  221.           <Anchors>
  222.             <Anchor point="LEFT" relativeKey="$parent.leftTexture" relativePoint="RIGHT"/>
  223.           </Anchors>
  224.         </Texture>
  225.         <Texture name="$parentRight" file="Interface\ChatFrame\ChatFrameTab-BGRight" parentKey="rightTexture">
  226.           <Size x="16" y="32"/>
  227.           <Anchors>
  228.             <Anchor point="LEFT" relativeKey="$parent.middleTexture" relativePoint="RIGHT"/>
  229.           </Anchors>
  230.         </Texture>
  231.       </Layer>
  232.       <Layer level="BORDER">
  233.         <Texture name="$parentSelectedLeft" file="Interface\ChatFrame\ChatFrameTab-SelectedLeft" alphaMode="ADD" parentKey="leftSelectedTexture">
  234.           <Size x="16" y="32"/>
  235.           <Anchors>
  236.             <Anchor point="TOPLEFT" relativeKey="$parent.leftTexture" relativePoint="TOPLEFT"/>
  237.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.leftTexture" relativePoint="BOTTOMRIGHT"/>
  238.           </Anchors>
  239.         </Texture>
  240.         <Texture name="$parentSelectedMiddle" file="Interface\ChatFrame\ChatFrameTab-SelectedMid" horizTile="true" alphaMode="ADD" parentKey="middleSelectedTexture">
  241.           <Size x="44" y="32"/>
  242.           <Anchors>
  243.             <Anchor point="TOPLEFT" relativeKey="$parent.middleTexture" relativePoint="TOPLEFT"/>
  244.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.middleTexture" relativePoint="BOTTOMRIGHT"/>
  245.           </Anchors>
  246.         </Texture>
  247.         <Texture name="$parentSelectedRight" file="Interface\ChatFrame\ChatFrameTab-SelectedRight" alphaMode="ADD" parentKey="rightSelectedTexture">
  248.           <Size x="16" y="32"/>
  249.           <Anchors>
  250.             <Anchor point="TOPLEFT" relativeKey="$parent.rightTexture" relativePoint="TOPLEFT"/>
  251.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.rightTexture" relativePoint="BOTTOMRIGHT"/>
  252.           </Anchors>
  253.         </Texture>
  254.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  255.           <Anchors>
  256.             <Anchor point="BOTTOMLEFT" x="8"/>
  257.             <Anchor point="BOTTOMRIGHT" x="-8"/>
  258.           </Anchors>
  259.         </Texture>
  260.       </Layer>
  261.       <Layer level="HIGHLIGHT">
  262.         <Texture name="$parentHighlightLeft" file="Interface\ChatFrame\ChatFrameTab-HighlightLeft" alphaMode="ADD" parentKey="leftHighlightTexture">
  263.           <Size x="16" y="32"/>
  264.           <Anchors>
  265.             <Anchor point="TOPLEFT" relativeKey="$parent.leftTexture" relativePoint="TOPLEFT"/>
  266.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.leftTexture" relativePoint="BOTTOMRIGHT"/>
  267.           </Anchors>
  268.         </Texture>
  269.         <Texture name="$parentHighlightMiddle" file="Interface\ChatFrame\ChatFrameTab-HighlightMid" horizTile="true" alphaMode="ADD" parentKey="middleHighlightTexture">
  270.           <Size x="44" y="32"/>
  271.           <Anchors>
  272.             <Anchor point="TOPLEFT" relativeKey="$parent.middleTexture" relativePoint="TOPLEFT"/>
  273.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.middleTexture" relativePoint="BOTTOMRIGHT"/>
  274.           </Anchors>
  275.         </Texture>
  276.         <Texture name="$parentHighlightRight" file="Interface\ChatFrame\ChatFrameTab-HighlightRight" alphaMode="ADD" parentKey="rightHighlightTexture">
  277.           <Size x="16" y="32"/>
  278.           <Anchors>
  279.             <Anchor point="TOPLEFT" relativeKey="$parent.rightTexture" relativePoint="TOPLEFT"/>
  280.             <Anchor point="BOTTOMRIGHT" relativeKey="$parent.rightTexture" relativePoint="BOTTOMRIGHT"/>
  281.           </Anchors>
  282.         </Texture>
  283.       </Layer>
  284.     </Layers>
  285.   </Button>
  286.   <Button name="ChatTabTemplate" frameStrata="LOW" parent="UIParent" virtual="true" inherits="ChatTabArtTemplate">
  287.     <Anchors>
  288.       <Anchor point="BOTTOMLEFT" x="0" y="2"/>
  289.     </Anchors>
  290.     <Frames>
  291.       <Frame name="$parentFlash" hidden="true">
  292.         <Size x="5" y="32"/>
  293.         <Anchors>
  294.           <Anchor point="LEFT" relativeTo="$parentLeft" x="0" y="-7"/>
  295.           <Anchor point="RIGHT" relativeTo="$parentRight" x="0" y="-7"/>
  296.         </Anchors>
  297.         <Layers>
  298.           <Layer level="BACKGROUND">
  299.             <Texture file="Interface\PaperDollInfoFrame\UI-Character-Tab-Highlight" alphaMode="ADD" setAllPoints="true"/>
  300.           </Layer>
  301.         </Layers>
  302.       </Frame>
  303.       <Frame name="$parentDropDown" inherits="UIDropDownMenuTemplate" hidden="true">
  304.         <Anchors>
  305.           <Anchor point="TOP" x="-80" y="-35"/>
  306.         </Anchors>
  307.         <Scripts>
  308.           <OnLoad function="FCFOptionsDropDown_OnLoad"/>
  309.           <OnShow function="FCFOptionsDropDown_OnLoad"/>
  310.         </Scripts>
  311.       </Frame>
  312.     </Frames>
  313.     <Scripts>
  314.       <OnLoad>
  315.         self:RegisterForClicks("LeftButtonUp", "RightButtonUp", "MiddleButtonUp");
  316.         self:RegisterForDrag("LeftButton");
  317.       </OnLoad>
  318.       <OnClick>
  319.         FCF_Tab_OnClick(self, button);
  320.         PlaySound(SOUNDKIT.U_CHAT_SCROLL_BUTTON);
  321.       </OnClick>
  322.       <OnDoubleClick>
  323.         if ( button ~= "RightButton" ) then
  324.           local chatFrame = _G["ChatFrame"..self:GetID()];
  325.           if ( not chatFrame.isDocked ) then
  326.             FCF_MinimizeFrame(chatFrame, chatFrame.buttonSide);
  327.           end
  328.         end
  329.       </OnDoubleClick>
  330.       <OnDragStart>
  331.         local chatFrame = _G["ChatFrame"..self:GetID()];
  332.         if ( chatFrame == DEFAULT_CHAT_FRAME ) then
  333.           if (chatFrame.isLocked) then
  334.             return;
  335.           end
  336.           chatFrame:StartMoving();
  337.           MOVING_CHATFRAME = chatFrame;
  338.         elseif ( chatFrame.isDocked ) then
  339.           FCF_UnDockFrame(chatFrame);
  340.           FCF_SetLocked(chatFrame, false);
  341.           local chatTab = _G[chatFrame:GetName().."Tab"];
  342.           local x,y = chatTab:GetCenter();
  343.           x = x - (chatTab:GetWidth()/2);
  344.           y = y - (chatTab:GetHeight()/2);
  345.           chatTab:ClearAllPoints();
  346.           chatFrame:ClearAllPoints();
  347.           chatFrame:SetPoint("TOPLEFT", "UIParent", "BOTTOMLEFT", x, y);
  348.           FCF_SetTabPosition(chatFrame, 0);
  349.           chatFrame:StartMoving();
  350.           MOVING_CHATFRAME = chatFrame;
  351.           Blizzard_CombatLog_Update_QuickButtons();
  352.           SELECTED_CHAT_FRAME = chatFrame;
  353.         else
  354.           if ( chatFrame.isLocked ) then
  355.             return;
  356.           end
  357.           chatFrame:StartMoving();
  358.           SELECTED_CHAT_FRAME = chatFrame;
  359.           MOVING_CHATFRAME = chatFrame;
  360.         end
  361.  
  362.         self:LockHighlight();
  363.  
  364.         --OnUpdate simulates OnDragStop
  365.         --This is a hack fix we need to do because when SetParent is called, the OnDragStop never fires for the matching OnDragStart.
  366.         self.dragButton = button;
  367.         self:SetScript("OnUpdate", FCFTab_OnUpdate);
  368.       </OnDragStart>
  369.       <!--OnDragStop>
  370.         FCF_StopDragging(_G["ChatFrame"..self:GetID()]);
  371.       </OnDragStop-->
  372.     </Scripts>
  373.     <ButtonText name="$parentText" parentKey="Text">
  374.       <Size x="50" y="8"/>
  375.       <Anchors>
  376.         <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT" x="0" y="-5"/>
  377.       </Anchors>
  378.     </ButtonText>
  379.     <NormalFont style="GameFontNormalSmall"/>
  380.   </Button>
  381.  
  382.   <!-- ===============================================================================-->
  383.   <!-- Floating frame template-->
  384.   <ScrollingMessageFrame name="FloatingChatFrameTemplate" movable="true" enableMouse="false" resizable="true" inherits="ChatFrameTemplate, FloatingBorderedFrame" parent="UIParent" hidden="true" clampedToScreen="true" dontSavePosition="true" frameLevel="5" virtual="true">
  385.     <Size x="430" y="120"/>
  386.     <Anchors>
  387.       <Anchor point="BOTTOMLEFT" x="100" y="100"/>
  388.     </Anchors>
  389.     <ResizeBounds>
  390.       <minResize>
  391.         <AbsDimension x="296" y="120"/>
  392.       </minResize>
  393.       <maxResize>
  394.         <AbsDimension x="608" y="400"/>
  395.       </maxResize>
  396.     </ResizeBounds>
  397.     <Frames>
  398.       <Button name="$parentClickAnywhereButton" setAllPoints="true" hidden="true" parentKey="clickAnywhereButton">
  399.         <Scripts>
  400.           <OnLoad>
  401.             FCFClickAnywhereButton_OnLoad(self);
  402.           </OnLoad>
  403.           <OnEvent>
  404.             FCFClickAnywhereButton_OnEvent(self, event, ...);
  405.           </OnEvent>
  406.           <OnClick>
  407.             ChatEdit_SetLastActiveWindow(self:GetParent().editBox);
  408.           </OnClick>
  409.         </Scripts>
  410.       </Button>
  411.       <Button name="$parentResizeButton" parentKey="ResizeButton">
  412.         <Size x="16" y="16"/>
  413.         <Anchors>
  414.           <Anchor point="BOTTOMRIGHT" relativeTo="$parentBackground" x="0" y="0"/>
  415.         </Anchors>
  416.         <Scripts>
  417.           <OnMouseDown>
  418.             local chatFrame = self:GetParent();
  419.             self:SetButtonState("PUSHED", true);
  420.             --SetCursor("UI-Cursor-Size");  --Hide the cursor
  421.  
  422.             self:GetHighlightTexture():Hide();
  423.  
  424.             if( self:GetParent().isDocked ) then
  425.               GENERAL_CHAT_DOCK.primary:StartSizing("BOTTOMRIGHT");
  426.             else
  427.               self:GetParent():StartSizing("BOTTOMRIGHT");
  428.             end
  429.  
  430.  
  431.           </OnMouseDown>
  432.           <OnMouseUp>
  433.             self:SetButtonState("NORMAL", false);
  434.             --SetCursor(nil); --Show the cursor again
  435.  
  436.             self:GetHighlightTexture():Show();
  437.  
  438.             if( self:GetParent().isDocked ) then
  439.               GENERAL_CHAT_DOCK.primary:StopMovingOrSizing();
  440.             else
  441.               self:GetParent():StopMovingOrSizing();
  442.             end
  443.             FCF_SavePositionAndDimensions(self:GetParent());
  444.           </OnMouseUp>
  445.         </Scripts>
  446.         <NormalTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Up"/>
  447.         <HighlightTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Highlight"/>
  448.         <PushedTexture file="Interface\ChatFrame\UI-ChatIM-SizeGrabber-Down"/>
  449.       </Button>
  450.       <Frame name="$parentButtonFrame" inherits="FloatingBorderedFrame" parentKey="buttonFrame" alpha="0.2">
  451.         <Size x="29" y="0"/>
  452.         <Frames>
  453.           <Button name="$parentMinimizeButton" parentKey="minimizeButton">
  454.             <Size x="32" y="32"/>
  455.             <Anchors>
  456.               <Anchor point="TOP" x="0" y="4"/>
  457.             </Anchors>
  458.             <Scripts>
  459.               <OnClick>
  460.                 local chatFrame = self:GetParent():GetParent();
  461.                 FCF_MinimizeFrame(chatFrame, strupper(chatFrame.buttonSide));
  462.               </OnClick>
  463.             </Scripts>
  464.             <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Minimize-Up"/>
  465.             <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Minimize-Down"/>
  466.             <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  467.           </Button>
  468.         </Frames>
  469.       </Frame>
  470.       <Button parentKey="ScrollToBottomButton" alpha="0">
  471.         <Size x="24" y="24"/>
  472.         <Anchors>
  473.           <Anchor point="BOTTOMRIGHT" relativeKey="$parent.ResizeButton" relativePoint="TOPRIGHT" x="0" y="-2"/>
  474.         </Anchors>
  475.         <Layers>
  476.           <Layer level="OVERLAY">
  477.             <Texture parentKey="Flash" file="Interface\ChatFrame\UI-ChatIcon-BlinkHilight" hidden="true"/>
  478.           </Layer>
  479.         </Layers>
  480.         <Scripts>
  481.           <OnClick>
  482.             PlaySound(SOUNDKIT.IG_CHAT_BOTTOM);
  483.             self:GetParent():ScrollToBottom();
  484.           </OnClick>
  485.         </Scripts>
  486.         <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Up"/>
  487.         <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Down"/>
  488.         <DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-ScrollEnd-Disabled"/>
  489.         <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  490.       </Button>
  491.       <Slider parentKey="ScrollBar" obeyStepOnDrag="true" valueStep="1" minValue="0" maxValue="1" alpha="0">
  492.         <Size x="22" y="0"/>
  493.         <ThumbTexture name="$parentThumbTexture" parentKey="ThumbTexture" atlas="chatframe-scrollbar-knob" useAtlasSize="true"/>
  494.         <Scripts>
  495.           <OnValueChanged>
  496.             if userInput then
  497.               local min, max = self:GetMinMaxValues();
  498.               self:GetParent():SetScrollOffset(max - value);
  499.             end
  500.           </OnValueChanged>
  501.         </Scripts>
  502.       </Slider>
  503.       <EditBox name="$parentEditBox" inherits="ChatFrameEditBoxTemplate" parentKey="editBox">
  504.         <Size x="5" y="32"/>
  505.         <Anchors>
  506.           <Anchor point="TOPLEFT" relativeTo="$parent" relativePoint="BOTTOMLEFT" x="-5" y="-2"/>
  507.           <Anchor point="RIGHT" relativeKey="$parent.ScrollBar" relativePoint="RIGHT" x="5" y="0"/>
  508.         </Anchors>
  509.         <Scripts>
  510.           <OnLoad>
  511.             self.chatFrame = self:GetParent();
  512.             ChatEdit_OnLoad(self);
  513.           </OnLoad>
  514.         </Scripts>
  515.       </EditBox>
  516.     </Frames>
  517.     <Scripts>
  518.       <OnLoad>
  519.         ChatFrame_OnLoad(self);
  520.         FloatingChatFrame_OnLoad(self);
  521.       </OnLoad>
  522.       <OnUpdate>
  523.         ChatFrame_OnUpdate(self, elapsed);
  524.       </OnUpdate>
  525.       <OnShow>
  526.         SetChatWindowShown(self:GetID(), true);
  527.         FCF_StopAlertFlash(self);
  528.       </OnShow>
  529.       <OnHide>
  530.         --If UIParent is hidden (Alt-Z), OnHide is called, but self:IsShown() is still true (self:IsVisible() would be false)
  531.         if ( not self:IsShown() ) then
  532.           if ( not self.minimized ) then
  533.             SetChatWindowShown(self:GetID(), false);
  534.           end
  535.         end
  536.       </OnHide>
  537.       <OnEvent>
  538.         ChatFrame_OnEvent(self, event, ...);
  539.         FloatingChatFrame_OnEvent(self, event, ...);
  540.       </OnEvent>
  541.     </Scripts>
  542.   </ScrollingMessageFrame>
  543.  
  544.   <Button name="FloatingChatFrameMinimizedTemplate" movable="true" clampedToScreen="true" virtual="true">
  545.     <Size x="180" y="32"/>
  546.     <Layers>
  547.       <Layer level="BACKGROUND">
  548.         <Texture name="$parentLeftTexture" file="Interface\ChatFrame\ChatFrameTab-BGLeft-min" parentKey="leftTexture">
  549.           <Size x="16" y="32"/>
  550.           <Anchors>
  551.             <Anchor point="LEFT"/>
  552.           </Anchors>
  553.         </Texture>
  554.         <Texture name="$parentRightTexture" file="Interface\ChatFrame\ChatFrameTab-BGRight-min" parentKey="rightTexture">
  555.           <Size x="16" y="32"/>
  556.           <Anchors>
  557.             <Anchor point="RIGHT"/>
  558.           </Anchors>
  559.         </Texture>
  560.         <Texture name="$parentMiddleTexture" file="Interface\ChatFrame\ChatFrameTab-BGMid-min" horizTile="true" parentKey="middleTexture">
  561.           <Size x="0" y="32"/>
  562.           <Anchors>
  563.             <Anchor point="TOPLEFT" relativeTo="$parentLeftTexture" relativePoint="TOPRIGHT"/>
  564.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentRightTexture" relativePoint="BOTTOMLEFT"/>
  565.           </Anchors>
  566.         </Texture>
  567.       </Layer>
  568.       <Layer level="BORDER">
  569.         <Texture name="$parentGlow" file="Interface\ChatFrame\ChatFrameTab-NewMessage" parentKey="glow" alphaMode="ADD" hidden="true">
  570.           <Anchors>
  571.             <Anchor point="BOTTOMLEFT" x="8" y="7"/>
  572.             <Anchor point="BOTTOMRIGHT" x="-24" y="7"/>
  573.           </Anchors>
  574.         </Texture>
  575.       </Layer>
  576.       <Layer level="ARTWORK">
  577.         <Texture name="$parentConversationIcon" file="Interface\ChatFrame\UI-ChatConversationIcon" parentKey="conversationIcon">
  578.           <Size x="16" y="16"/>
  579.           <Anchors>
  580.             <Anchor point="LEFT" x="12" y="-1"/>
  581.           </Anchors>
  582.         </Texture>
  583.       </Layer>
  584.       <Layer level="HIGHLIGHT">
  585.         <Texture name="$parentLeftHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightLeft-min" alphaMode="ADD" parentKey="leftHighlightTexture">
  586.           <Size x="16" y="32"/>
  587.           <Anchors>
  588.             <Anchor point="LEFT"/>
  589.           </Anchors>
  590.         </Texture>
  591.         <Texture name="$parentRightHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightRight-min" alphaMode="ADD" parentKey="rightHighlightTexture">
  592.           <Size x="16" y="32"/>
  593.           <Anchors>
  594.             <Anchor point="RIGHT"/>
  595.           </Anchors>
  596.         </Texture>
  597.         <Texture name="$parentMiddleHighlightTexture" file="Interface\ChatFrame\ChatFrameTab-HighlightMid-min" horizTile="true" alphaMode="ADD" parentKey="middleHighlightTexture">
  598.           <Size x="0" y="32"/>
  599.           <Anchors>
  600.             <Anchor point="TOPLEFT" relativeTo="$parentLeftTexture" relativePoint="TOPRIGHT"/>
  601.             <Anchor point="BOTTOMRIGHT" relativeTo="$parentRightTexture" relativePoint="BOTTOMLEFT"/>
  602.           </Anchors>
  603.         </Texture>
  604.       </Layer>
  605.     </Layers>
  606.     <Frames>
  607.       <Button name="$parentMaximizeButton">
  608.         <Size x="25" y="25"/>
  609.         <Anchors>
  610.           <Anchor point="RIGHT" x="-3" y="0"/>
  611.         </Anchors>
  612.         <Scripts>
  613.           <OnClick>
  614.             FCF_MaximizeFrame(self:GetParent().maxFrame);
  615.           </OnClick>
  616.         </Scripts>
  617.         <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Maximize-Up"/>
  618.         <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Maximize-Down"/>
  619.         <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  620.       </Button>
  621.     </Frames>
  622.     <Scripts>
  623.       <OnLoad>
  624.         self:RegisterForDrag("LeftButton");
  625.         self:SetClampRectInsets(0, 0, 0, -50);
  626.         self.Text:ClearAllPoints();
  627.         self.Text:SetPoint("LEFT", self, "LEFT", 15, 0);
  628.         self.Text:SetPoint("RIGHT", self, "RIGHT", -25, 0);
  629.       </OnLoad>
  630.       <OnDragStart>
  631.         self:StartMoving();
  632.       </OnDragStart>
  633.       <OnDragStop>
  634.         self:StopMovingOrSizing();
  635.         self:SetUserPlaced(false);  --So that we don't save the position
  636.       </OnDragStop>
  637.       <OnDoubleClick>
  638.         FCF_MaximizeFrame(self.maxFrame);
  639.       </OnDoubleClick>
  640.     </Scripts>
  641.     <ButtonText name="$parentText" parentKey="Text">
  642.       <Size x="0" y="8"/>
  643.     </ButtonText>
  644.     <NormalFont style="GameFontNormalSmall"/>
  645.   </Button>
  646.  
  647.   <!-- Main dock manager -->
  648.   <Frame name="GeneralDockManager" inherits="DockManagerTemplate">
  649.     <Scripts>
  650.       <OnLoad>
  651.         FCFDock_OnLoad(self);
  652.         GENERAL_CHAT_DOCK = self;
  653.         -- resize for locales
  654.         local list = self.overflowButton.list;
  655.         list.numTabs:SetFormattedText(CHAT_WINDOWS_COUNT, 10);
  656.         list:SetWidth(list.numTabs:GetWidth() + 48);  -- 24 pixel margins
  657.       </OnLoad>
  658.     </Scripts>
  659.   </Frame>
  660.  
  661.   <!-- Main chat window -->
  662.   <Button name="ChatFrame1Tab" inherits="ChatTabTemplate" id="1"/>
  663.   <ScrollingMessageFrame name="ChatFrame1" hidden="false" inherits="FloatingChatFrameTemplate" id="1">
  664.     <Size x="430" y="120"/>
  665.     <Anchors>
  666.       <Anchor point="BOTTOMLEFT" x="32" y="95"/>
  667.     </Anchors>
  668.     <Scripts>
  669.       <OnLoad>
  670.         tinsert(CHAT_FRAMES, self:GetName());
  671.         ChatFrame_OnLoad(self);
  672.         DEFAULT_CHAT_FRAME = ChatFrame1;
  673.         SELECTED_CHAT_FRAME = ChatFrame1;
  674.         SELECTED_DOCK_FRAME = ChatFrame1;
  675.  
  676.         self.isStaticDocked = true;
  677.         FCFDock_SetPrimary(GENERAL_CHAT_DOCK, self);
  678.         ChatEdit_SetLastActiveWindow(self.editBox);
  679.  
  680.         self:RegisterEvent("UPDATE_CHAT_WINDOWS");
  681.         self:RegisterEvent("UPDATE_FLOATING_CHAT_WINDOWS");
  682.  
  683.         FloatingChatFrame_SetupScrolling(self);
  684.       </OnLoad>
  685.       <OnEvent>
  686.         ChatFrame_OnEvent(self, event, ...);
  687.         FloatingChatFrame_OnEvent(self, event, ...);
  688.       </OnEvent>
  689.     </Scripts>
  690.   </ScrollingMessageFrame>
  691.   <!-- ChatFrame1 Specific buttons -->
  692.   <Button name="ChatFrameMenuButton" frameStrata="LOW" parent="UIParent">
  693.     <Size x="32" y="32"/>
  694.     <Anchors>
  695.       <Anchor point="BOTTOM" relativeTo="ChatFrame1ButtonFrame" relativePoint="BOTTOM" x="0" y="0"/>
  696.     </Anchors>
  697.     <Scripts>
  698.       <OnClick>
  699.         PlaySound(SOUNDKIT.IG_CHAT_EMOTE_BUTTON);
  700.         ChatFrame_ToggleMenu();
  701.       </OnClick>
  702.     </Scripts>
  703.     <NormalTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Up"/>
  704.     <PushedTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Down"/>
  705.     <DisabledTexture file="Interface\ChatFrame\UI-ChatIcon-Chat-Disabled"/>
  706.     <HighlightTexture file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD"/>
  707.   </Button>
  708.   <Button name="ChatFrameChannelButton" frameStrata="LOW" parent="UIParent" mixin="ChannelFrameButtonMixin" inherits="VoiceToggleButtonTemplate">
  709.     <Anchors>
  710.       <Anchor point="TOP" relativeTo="ChatFrame1ButtonFrame" relativePoint="TOP" x="0" y="0"/>
  711.     </Anchors>
  712.     <Layers>
  713.       <Layer level="OVERLAY">
  714.         <Texture parentKey="Flash" atlas="chatframe-button-highlightalert" useAtlasSize="true" alphaMode="ADD" hidden="true">
  715.           <Anchors>
  716.             <Anchor point="CENTER" x="0" y="0"/>
  717.           </Anchors>
  718.         </Texture>
  719.       </Layer>
  720.     </Layers>
  721.   </Button>
  722.   <Button name="ChatFrameToggleVoiceDeafenButton" frameStrata="LOW" parent="UIParent" inherits="ToggleVoiceDeafenButtonTemplate">
  723.     <Anchors>
  724.       <Anchor point="TOP" relativeTo="ChatFrameChannelButton" relativePoint="BOTTOM" x="0" y="-2" />
  725.     </Anchors>
  726.   </Button>
  727.   <Button name="ChatFrameToggleVoiceMuteButton" frameStrata="LOW" parent="UIParent" inherits="ToggleVoiceMuteButtonTemplate">
  728.     <Anchors>
  729.       <Anchor point="TOP" relativeTo="ChatFrameToggleVoiceDeafenButton" relativePoint="BOTTOM" x="0" y="-2" />
  730.     </Anchors>
  731.   </Button>
  732.   <Frame name="ChatMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="UIParent">
  733.     <Anchors>
  734.       <Anchor point="BOTTOMLEFT" relativeTo="ChatFrameMenuButton" relativePoint="TOPRIGHT"/>
  735.     </Anchors>
  736.     <Scripts>
  737.       <OnLoad function="ChatMenu_OnLoad"/>
  738.       <OnShow function="ChatMenu_OnShow"/>
  739.     </Scripts>
  740.   </Frame>
  741.   <Frame name="EmoteMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  742.     <Scripts>
  743.       <OnLoad function="EmoteMenu_OnLoad"/>
  744.     </Scripts>
  745.   </Frame>
  746.   <Frame name="LanguageMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  747.     <Scripts>
  748.       <OnLoad function="LanguageMenu_OnLoad"/>
  749.       <OnEvent function="LanguageMenu_OnEvent"/>
  750.     </Scripts>
  751.   </Frame>
  752.   <Frame name="VoiceMacroMenu" inherits="UIMenuTemplate" hidden="true" clampedToScreen="true" parent="ChatMenu">
  753.     <Scripts>
  754.       <OnLoad function="VoiceMacroMenu_OnLoad"/>
  755.     </Scripts>
  756.   </Frame>
  757.   <Frame name="ChatAlertFrame" mixin="ChatAlertFrameMixin" inherits="AlertContainerTemplate">
  758.     <Size x="10" y="10"/>
  759.     <Anchors>
  760.       <Anchor point="BOTTOMLEFT" relativeTo="ChatFrame1ButtonFrame" relativePoint="TOPLEFT" x="-1" y="27"/>
  761.     </Anchors>
  762.     <Scripts>
  763.       <OnLoad method="OnLoad"/>
  764.     </Scripts>
  765.   </Frame>
  766.   <Button name="ChatFrame2Tab" inherits="ChatTabTemplate" id="2"/>
  767.   <ScrollingMessageFrame name="ChatFrame2" inherits="FloatingChatFrameTemplate" id="2">
  768.     <Scripts>
  769.       <OnLoad>
  770.         ChatFrame_OnLoad(self);
  771.         FloatingChatFrame_OnLoad(self);
  772.         self:SetClampRectInsets(-35, 35, 52, -50);
  773.         self.isStaticDocked = true;
  774.       </OnLoad>
  775.     </Scripts>
  776.   </ScrollingMessageFrame>
  777.   <Button name="ChatFrame3Tab" inherits="ChatTabTemplate" id="3"/>
  778.   <ScrollingMessageFrame name="ChatFrame3" inherits="FloatingChatFrameTemplate" id="3"/>
  779.   <Button name="ChatFrame4Tab" inherits="ChatTabTemplate" id="4"/>
  780.   <ScrollingMessageFrame name="ChatFrame4" inherits="FloatingChatFrameTemplate" id="4"/>
  781.   <Button name="ChatFrame5Tab" inherits="ChatTabTemplate" id="5"/>
  782.   <ScrollingMessageFrame name="ChatFrame5" inherits="FloatingChatFrameTemplate" id="5"/>
  783.   <Button name="ChatFrame6Tab" inherits="ChatTabTemplate" id="6"/>
  784.   <ScrollingMessageFrame name="ChatFrame6" inherits="FloatingChatFrameTemplate" id="6"/>
  785.   <Button name="ChatFrame7Tab" inherits="ChatTabTemplate" id="7"/>
  786.   <ScrollingMessageFrame name="ChatFrame7" inherits="FloatingChatFrameTemplate" id="7"/>
  787.   <Button name="ChatFrame8Tab" inherits="ChatTabTemplate" id="8"/>
  788.   <ScrollingMessageFrame name="ChatFrame8" inherits="FloatingChatFrameTemplate" id="8"/>
  789.   <Button name="ChatFrame9Tab" inherits="ChatTabTemplate" id="9"/>
  790.   <ScrollingMessageFrame name="ChatFrame9" inherits="FloatingChatFrameTemplate" id="9"/>
  791.   <Button name="ChatFrame10Tab" inherits="ChatTabTemplate" id="10"/>
  792.   <ScrollingMessageFrame name="ChatFrame10" inherits="FloatingChatFrameTemplate" id="10"/>
  793.  
  794.   <!--This frame is here to work as a single point of entry for events which must fire once and only once-->
  795.   <Frame name="FloatingChatFrameManager">
  796.     <Scripts>
  797.       <OnLoad function="FloatingChatFrameManager_OnLoad"/>
  798.       <OnEvent function="FloatingChatFrameManager_OnEvent"/>
  799.     </Scripts>
  800.   </Frame>
  801. </Ui>