home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 May / PCWorld_2003-05_cd.bin / Komunik / phoenix / chrome / toolkit.jar / content / global / bindings / popup.xml < prev    next >
Extensible Markup Language  |  2002-11-05  |  22KB  |  652 lines

  1. <?xml version="1.0"?>
  2.  
  3. <bindings id="popupBindings"
  4.    xmlns="http://www.mozilla.org/xbl"
  5.    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  6.    xmlns:xbl="http://www.mozilla.org/xbl">
  7.  
  8.   <binding id="popup-base">
  9.     <resources>
  10.       <stylesheet src="chrome://global/skin/popup.css"/>
  11.     </resources>
  12.   </binding>
  13.  
  14.   <binding id="popup" extends="chrome://global/content/bindings/popup.xml#popup-base">
  15.     <content>
  16.       <xul:arrowscrollbox class="popup-internal-box" flex="1" orient="vertical">
  17.         <children/>
  18.       </xul:arrowscrollbox>
  19.     </content>
  20.  
  21.     <implementation implements="nsIDOMXULPopupElement, nsIAccessibleProvider">
  22.       <property name="accessible">
  23.         <getter>
  24.           <![CDATA[
  25.             var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
  26.             if (this.localName == "popup" || this.localName == "menupopup")
  27.               return (this.parentNode.localName == "menulist")? accService.createXULSelectListAccessible(this): accService.createXULMenupopupAccessible(this);
  28.             else if (this.localName == "tooltip")
  29.               return accService.createXULTooltipAccessible(this);
  30.             return null;
  31.           ]]>
  32.         </getter>
  33.       </property>
  34.  
  35.       <property name="position" onget="return this.getAttribute('position');"
  36.                                 onset="this.setAttribute('position', val); return val;"/>
  37.       <property name="popupBoxObject">
  38.         <getter>
  39.           return this.boxObject.QueryInterface(Components.interfaces.nsIPopupBoxObject);
  40.         </getter>
  41.       </property>
  42.       
  43.       <method name="showPopup">
  44.         <parameter name="element"/>
  45.         <parameter name="xpos"/>
  46.         <parameter name="ypos"/>
  47.         <parameter name="popuptype"/>
  48.         <parameter name="anchoralignment"/>
  49.         <parameter name="popupalignment"/>
  50.         <body>
  51.         <![CDATA[
  52.           var popupBox = null;
  53.           var menuBox = null;
  54.           try {
  55.             popupBox = this.popupBoxObject;
  56.           } catch(e) {}
  57.           try {
  58.             menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
  59.           } catch(e) {}
  60.           if (menuBox)
  61.             menuBox.openMenu(true);
  62.           else if (popupBox)
  63.             popupBox.showPopup(element, this, xpos, ypos, popuptype, anchoralignment, popupalignment);
  64.         ]]>
  65.         </body>
  66.       </method>
  67.       
  68.       <method name="hidePopup">
  69.         <body>
  70.         <![CDATA[
  71.           var popupBox = null;
  72.           var menuBox = null;
  73.           try {
  74.             popupBox = this.boxObject.QueryInterface(Components.interfaces.nsIPopupBoxObject);
  75.           } catch(e) {}
  76.           try {
  77.             menuBox = this.parentNode.boxObject.QueryInterface(Components.interfaces.nsIMenuBoxObject);
  78.           } catch(e) {}
  79.           if (menuBox)
  80.             menuBox.openMenu(false);
  81.           else if (popupBox)
  82.             popupBox.hidePopup();
  83.         ]]>
  84.         </body>
  85.       </method>
  86.  
  87.       <property name="autoPosition">
  88.         <getter>
  89.         <![CDATA[
  90.           return this.popupBoxObject.autoPosition;
  91.         ]]>
  92.         </getter>
  93.         <setter>
  94.         <![CDATA[
  95.           return this.popupBoxObject.autoPosition = val;
  96.         ]]>
  97.         </setter>
  98.       </property>
  99.       
  100.       <method name="enableKeyboardNavigator">
  101.         <parameter name="aEnableKeyboardNavigator"/>
  102.         <body>
  103.         <![CDATA[
  104.           this.popupBoxObject.enableKeyboardNavigator(aEnableKeyboardNavigator);
  105.         ]]>
  106.         </body>
  107.       </method>
  108.       
  109.       <method name="enableRollup">
  110.         <parameter name="aEnableRollup"/>
  111.         <body>
  112.         <![CDATA[
  113.           this.popupBoxObject.enableRollup(aEnableRollup);
  114.         ]]>
  115.         </body>
  116.       </method>
  117.       
  118.       <method name="sizeTo">
  119.         <parameter name="aWidth"/>
  120.         <parameter name="aHeight"/>
  121.         <body>
  122.         <![CDATA[
  123.           this.popupBoxObject.sizeTo(aWidth, aHeight);
  124.         ]]>
  125.         </body>
  126.       </method>
  127.       
  128.       <method name="moveTo">
  129.         <parameter name="aLeft"/>
  130.         <parameter name="aTop"/>
  131.         <body>
  132.         <![CDATA[
  133.           this.popupBoxObject.moveTo(aLeft, aTop);
  134.         ]]>
  135.         </body>
  136.       </method>
  137.     </implementation>     
  138.  
  139.     <handlers>
  140.       <handler event="contextmenu" action="event.preventDefault();"/>
  141.     </handlers>
  142.   </binding>
  143.  
  144.   <binding id="tooltip" extends="chrome://global/content/bindings/popup.xml#popup">
  145.     <content>
  146.       <children>
  147.         <xul:label class="tooltip-label" xbl:inherits="value=label,crop" crop="right" flex="1"/>
  148.       </children>
  149.     </content>
  150.     
  151.     <implementation>
  152.       <field name="_mouseOutCount">0</field>
  153.       <field name="_isMouseOver">false</field>
  154.       
  155.       <property name="label"
  156.                 onget="return this.getAttribute('label');"
  157.                 onset="this.setAttribute('label', val); return val;"/>
  158.     </implementation>
  159.  
  160.     <handlers>
  161.       <handler event="mouseover"><![CDATA[
  162.         var rel = event.relatedTarget;
  163.         //dump("ENTERING " + (rel ? rel.localName : "null") + "\n");
  164.         if (!rel)
  165.           return;
  166.           
  167.         // find out if the node we entered from is one of our anonymous children
  168.         while (rel) {
  169.           if (rel == this)
  170.             break;
  171.           rel = rel.parentNode;
  172.         }
  173.  
  174.         // if the exited node is not a descendant of ours, we are entering for the first time
  175.         if (rel != this)
  176.           this._isMouseOver = true;
  177.       ]]></handler>
  178.  
  179.       <handler event="mouseout"><![CDATA[
  180.         var rel = event.relatedTarget;
  181.         //dump("LEAVING " + (rel ? rel.localName : "null") + "\n");
  182.  
  183.         // relatedTarget is null when the titletip is first shown: a mouseout event fires
  184.         // because the mouse is exiting the main window and entering the titletip "window".
  185.         // relatedTarget is also null when the mouse exits the main window completely,
  186.         // so count how many times relatedTarget was null after titletip is first shown 
  187.         // and hide popup the 2nd time
  188.         if (!rel) {
  189.           ++this._mouseOutCount;
  190.           if (this._mouseOutCount > 1)
  191.             this.hidePopup();
  192.           return;
  193.         }
  194.           
  195.         // find out if the node we are entering is one of our anonymous children
  196.         while (rel) {
  197.           if (rel == this)
  198.             break;
  199.           rel = rel.parentNode;
  200.         }
  201.         
  202.         // if the entered node is not a descendant of ours, hide the tooltip
  203.         if (rel != this && this._isMouseOver) {
  204.           this.hidePopup();
  205.         }        
  206.       ]]></handler>
  207.  
  208.       <handler event="popupshowing">
  209.       <![CDATA[
  210.         // fill in the label automatically for the default tooltip
  211.         if (this.getAttribute("default") == "true") {
  212.           var label = "";
  213.           var ttNode = document.tooltipNode;
  214.           if (ttNode && ttNode.hasAttribute("tooltiptext"))
  215.             this.label = ttNode.getAttribute("tooltiptext");
  216.         }
  217.  
  218.         // This is a special consideration for tree titletips. There is a
  219.         // case where the user moves the mouse from over the treebody to
  220.         // completely outside of the window, while passing over a cell that
  221.         // displays a titletip.  This causes the titletip to show, even though
  222.         // the mouse is not over the corresponding cell, so we need to check
  223.         // if the titletip was entered by the mouse, and if not, hide it.
  224.         // XXX commenting this out for now because it doesn't work on Mac 
  225.         //     become mouseover isn't fired when the tooltip appears with the mouse over it
  226.         //if (this.hasAttribute("titletip"))
  227.         //  window.setTimeout(function(me) { if (!me._isMouseOver) me.hidePopup(); }, 100, this);
  228.       ]]>
  229.       </handler>
  230.  
  231.       <handler event="popuphiding"><![CDATA[
  232.         this._isMouseOver = false;
  233.         this._mouseOutCount = 0;
  234.       ]]></handler>
  235.     </handlers>
  236.   </binding>
  237.   
  238.   <!-- XXXben this binding is not currently used -->
  239.   <binding id="resizerbase" extends="xul:box">
  240.     <implementation>
  241.       <property name="popup">
  242.         <getter>
  243.         <![CDATA[
  244.           var currNode = this.parentNode;
  245.           while (currNode) {
  246.             try {
  247.               var bo = currNode.boxObject.QueryInterface(Components.interfaces.nsIPopupBoxObject);
  248.               if (bo)
  249.                 return currNode;
  250.             }
  251.             catch (e) {
  252.             }
  253.             currNode = currNode.parentNode;
  254.           }
  255.           return null;
  256.         ]]>
  257.         </getter>
  258.       </property>
  259.       
  260.       <method name="handleMouseMove">
  261.         <parameter name="aEvent"/>
  262.         <body>
  263.         <![CDATA[
  264.           throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
  265.         ]]>
  266.         </body>
  267.       </method> 
  268.       
  269.       <field name="screenLeft">0</field>
  270.       <field name="screenTop">0</field>
  271.       <field name="resizerDirection">0</field>
  272.     </implementation>
  273.     
  274.     <handlers>
  275.       <handler event="mousedown" phase="capturing"> 
  276.       <![CDATA[
  277.         var popup = event.target.popup;
  278.         var boxObject = popup.boxObject;
  279.         boxObject.captureMouseEvents = true;
  280.         event.target.screenLeft = event.screenX;
  281.         event.target.screenTop = event.screenY;
  282.         event.target.setMode();
  283.         event.preventDefault();
  284.       ]]>
  285.       </handler>
  286.       <handler event="mouseup" phase="capturing">
  287.       <![CDATA[
  288.         var popup = event.target.popup;
  289.         var boxObject = popup.boxObject;
  290.         boxObject.captureMouseEvents = false;
  291.         event.target.screenLeft = event.screenX;
  292.         event.target.screenTop = event.screenY;
  293.         event.target.direction = 0;
  294.         event.preventDefault();
  295.       ]]>
  296.       </handler>
  297.       <handler event="mousemove" phase="capturing">
  298.       <![CDATA[
  299.         event.target.handleMouseMove(event);
  300.         event.preventDefault();
  301.       ]]>
  302.       </handler>
  303.     </handlers>
  304.   </binding>
  305.   
  306.   <!-- East-West resizer -->
  307.   <binding id="ew-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  308.     <content>
  309.       <xul:hbox class="ew-resizer-box" flex="1"/>
  310.     </content>
  311.     <!--
  312.     <implementation>
  313.       <method name="handleMouseMove">
  314.         <parameter name="aEvent"/>
  315.         <body>
  316.         <![CDATA[
  317.           var boxObject = aEvent.target.boxObject;
  318.           if (boxObject.captureMouseEvents && this.resizerDirection == "right") {
  319.             var delta = aEvent.screenX - this.screenLeft;
  320.             this.screenLeft = aEvent.screenX;
  321.             
  322.             // We can set this directly as we're only modifying one dimension
  323.             aEvent.target.width += delta;
  324.           }
  325.         ]]>
  326.         </body>
  327.       </method>
  328.       <method name="setMode">
  329.         <body>
  330.         <![CDATA[
  331.           this.resizerDirection = "right";
  332.         ]]>
  333.         </body>
  334.       </method>
  335.     </implementation>
  336.     -->
  337.   </binding>
  338.   
  339.   <!-- North-South resizer -->
  340.   <binding id="ns-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  341.     <content>
  342.       <xul:hbox class="ns-resizer-box" flex="1"/>
  343.     </content>
  344.     <!--
  345.     <implementation>
  346.       <method name="handleMouseMove">
  347.         <parameter name="aEvent"/>
  348.         <body>
  349.         <![CDATA[
  350.           var boxObject = aEvent.target.boxObject;
  351.           if (boxObject.captureMouseEvents && this.resizerDirection == "bottom") {
  352.             var delta = aEvent.screenY - this.screenTop;
  353.             this.screenTop = aEvent.screenY;
  354.             var currWidth = aEvent.target.boxObject.width;
  355.             
  356.             // We can set this directly as we're only modifying one dimension
  357.             aEvent.target.height += delta;
  358.           }
  359.         ]]>
  360.         </body>
  361.       </method>
  362.       <method name="setMode">
  363.         <body>
  364.         <![CDATA[
  365.           this.resizerDirection = "bottom";
  366.         ]]>
  367.         </body>
  368.       </method>
  369.     </implementation>
  370.     -->
  371.   </binding>
  372.   
  373.   <!-- Diagonal resizer -->
  374.   <binding id="diag-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  375.     <content>
  376.       <xul:hbox class="diag-resizer-box" align="center" flex="1">
  377.         <xul:image class="diag-resizer-image"/>
  378.       </xul:hbox>
  379.     </content>
  380.     <!--
  381.     <implementation>
  382.       <method name="handleMouseMove">
  383.         <parameter name="aEvent"/>
  384.         <body>
  385.         <![CDATA[
  386.           var boxObject = aEvent.target.boxObject;
  387.           if (boxObject.captureMouseEvents && this.resizerDirection == "bottomright") {
  388.             if (!this.screenLeft || !this.screenTop) {
  389.               this.screenLeft = aEvent.screenX; 
  390.               this.screenTop = aEvent.screenY;
  391.             }
  392.             var deltaX = aEvent.screenX - this.screenLeft;
  393.             var deltaY = aEvent.screenY - this.screenTop;
  394.             this.screenLeft = aEvent.screenX;
  395.             this.screenTop = aEvent.screenY;
  396.             var currWidth = aEvent.target.boxObject.width;
  397.             var currHeight = aEvent.target.boxObject.height;
  398.             aEvent.target.sizeTo(currWidth + deltaX, currHeight + deltaY);
  399.           }
  400.         ]]>
  401.         </body>
  402.       </method>
  403.       <method name="setMode">
  404.         <body>
  405.         <![CDATA[
  406.           this.resizerDirection = "bottomright";
  407.         ]]>
  408.         </body>
  409.       </method>
  410.     </implementation>
  411.     -->
  412.   </binding>
  413.   
  414.   <binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  415.     <content>
  416.       <xul:hbox class="titlebar-box" flex="1">
  417.         <xul:hbox class="titlebar-title-box" flex="1" tooltiptext="Click and drag to float">
  418.           <xul:label class="titlebar-title" xbl:inherits="value=title" flex="1" crop="right"/>
  419.         </xul:hbox>
  420.         <xul:button class="popupClose" tooltiptext="Close"/>
  421.       </xul:hbox>
  422.     </content>
  423.     <!--
  424.     <implementation>
  425.       <method name="handleMouseMove">
  426.         <parameter name="aEvent"/>
  427.         <body>
  428.         <![CDATA[
  429.           if (!this.popup) this.popup = aEvent.target.popup;
  430.           var boxObject = this.popup.boxObject;
  431.           if (boxObject.captureMouseEvents && this.direction == "titlebar") {
  432.             if (!this.screenLeft || !this.screenTop) {
  433.               this.screenLeft = aEvent.screenX; 
  434.               this.screenTop = aEvent.screenY;
  435.             }
  436.             var deltaX = aEvent.screenX - this.screenLeft;
  437.             var deltaY = aEvent.screenY - this.screenTop;
  438.             this.screenLeft = aEvent.screenX;
  439.             this.screenTop = aEvent.screenY;
  440.             var currX = aEvent.target.boxObject.screenX;
  441.             var currY = aEvent.target.boxObject.screenY;
  442.             aEvent.target.moveTo(currX + deltaX, currY + deltaY);
  443.           }
  444.         ]]>
  445.         </body>
  446.       </method>
  447.       <method name="setMode">
  448.         <body>
  449.         <![CDATA[
  450.           this.direction = "titlebar";
  451.         ]]>
  452.         </body>
  453.       </method>
  454.     </implementation>
  455.     -->
  456.   </binding>          
  457.  
  458.   <binding id="floater-base" display="xul:popup" extends="chrome://global/content/bindings/popup.xml#popup">
  459.     <implementation>
  460.       
  461.       <!-- Popup Manipulation Constants -->
  462.       <field name="MANIPULATE_NONE"      readonly="true">0</field>
  463.       <field name="MANIPULATE_MOVE"      readonly="true">1</field>
  464.       <field name="MANIPULATE_SIZE_EW"   readonly="true">2</field>
  465.       <field name="MANIPULATE_SIZE_NS"   readonly="true">3</field>
  466.       <field name="MANIPULATE_SIZE_DIAG" readonly="true">4</field>
  467.       
  468.       <method name="handleMouseMove">
  469.         <parameter name="aEvent"/>
  470.         <body>
  471.         <![CDATA[
  472.           var boxObject = this.boxObject;
  473.           if (boxObject.captureMouseEvents) {
  474.             var dX, dY;
  475.             var eScreenX = aEvent.screenX; 
  476.             var eScreenY = aEvent.screenY;
  477.             switch (this.manipulateMode) {
  478.               case this.MANIPULATE_SIZE_EW:
  479.                 var width = boxObject.width;
  480.                 dX = eScreenX - this.screenLeft;
  481.                 this.sizeTo(width + dX, this.height);
  482.                 break;
  483.               case this.MANIPULATE_SIZE_NS:
  484.                 var height = boxObject.height;
  485.                 dY = eScreenY - this.screenTop;
  486.                 this.sizeTo(this.width, height + dY);
  487.                 break;
  488.               case this.MANIPULATE_SIZE_DIAG:
  489.                 dX = eScreenX - this.screenLeft;
  490.                 dY = eScreenY - this.screenTop;
  491.                 this.sizeTo(this.width + dX, this.height + dY);
  492.                 break;
  493.               case this.MANIPULATE_MOVE:
  494.                 // XXXben this may not yet be complete. When we drag away from the 
  495.                 //        owner, we set some properties to ensure that we aren't
  496.                 //        positioned as a menu, automatically closed or steal
  497.                 //        keyboard navigation in an inappropriate way. 
  498.                 this.autoPosition = false;
  499.                 this.enableRollup(false);
  500.                 this.enableKeyboardNavigator(false);
  501.                 dX = eScreenX - this.screenLeft;
  502.                 dY = eScreenY - this.screenTop;
  503.                 this.moveTo(this.left + dX, this.top + dY);
  504.                 break;
  505.               default:
  506.                 break;                      
  507.             }
  508.             this.screenLeft = eScreenX;
  509.             this.screenTop = eScreenY;
  510.           }
  511.         ]]>
  512.         </body>
  513.       </method> 
  514.       <method name="findParentByLocalName">
  515.         <parameter name="aNode"/>
  516.         <parameter name="aLocalName"/>
  517.         <body>
  518.         <![CDATA[
  519.           var parent = aNode;
  520.           var names = [].concat(aLocalName);
  521.           while (parent) {
  522.             for (var i = 0; i < names.length; ++i) {
  523.               if (parent.localName == names[i])
  524.                 return parent;
  525.             }
  526.             parent = parent.parentNode;
  527.           }
  528.           return null;
  529.         ]]>
  530.         </body>
  531.       </method>
  532.       <method name="setMode">
  533.         <parameter name="aEvent"/>
  534.         <body>
  535.         <![CDATA[
  536.           var widget = this.findParentByLocalName(aEvent.originalTarget, ["resizer", "titlebar"]);
  537.           if (widget) {
  538.             if (widget.localName == "titlebar")
  539.               this.manipulateMode = this.MANIPULATE_MOVE;
  540.             else 
  541.               this.sizeDirection = widget.getAttribute("direction");
  542.           }
  543.         ]]>
  544.         </body>
  545.       </method>
  546.       <method name="cleanUp">
  547.         <parameter name="aEvent"/>
  548.         <body>
  549.         <![CDATA[
  550.           this.boxObject.captureMouseEvents = false;
  551.           this.screenLeft = aEvent.screenX;
  552.           this.screenTop = aEvent.screenY;
  553.           this.manipulateMode = this.MANIPULATE_NONE;
  554.           aEvent.preventDefault();
  555.         ]]>
  556.         </body>
  557.       </method>
  558.       <field name="screenLeft">0</field>
  559.       <field name="screenTop">0</field>
  560.       <field name="manipulateMode">0</field>
  561.     </implementation>
  562.     <handlers>
  563.       <handler event="mousedown" phase="capturing"> 
  564.       <![CDATA[
  565.         this.boxObject.captureMouseEvents = true;
  566.         this.screenLeft = event.screenX;
  567.         this.screenTop = event.screenY;
  568.         this.setMode(event);
  569.       ]]>
  570.       </handler>
  571.       <handler event="mouseup" phase="capturing">
  572.       <![CDATA[
  573.         this.cleanUp(event);
  574.       ]]>
  575.       </handler>
  576.       <handler event="mousemove" phase="capturing">
  577.       <![CDATA[
  578.         this.handleMouseMove(event);
  579.         event.preventDefault();
  580.       ]]>
  581.       </handler>
  582.       <!-- clean up, release the mouse, etc -->
  583.       <handler event="popuphiding">
  584.       <![CDATA[
  585.         this.cleanUp(event);
  586.       ]]>
  587.       </handler>
  588.       <handler event="click">
  589.       <![CDATA[
  590.         // Hide the popup if the [X] box is clicked. 
  591.         // XXXben this may not really belong here, but rather in a derived binding. 
  592.         if (event.originalTarget.className.indexOf("popupClose") != -1)
  593.           this.popupBoxObject.hidePopup();
  594.       ]]>
  595.       </handler>
  596.     </handlers>
  597.   </binding>
  598.  
  599.   <binding id="popup-scrollbars" extends="chrome://global/content/bindings/popup.xml#popup">
  600.     <content>
  601.       <xul:hbox class="popup-internal-box" flex="1" orient="vertical" style="overflow: auto;">
  602.         <children/>
  603.       </xul:hbox>
  604.     </content>
  605.   </binding>
  606.  
  607.   <binding id="floater-normal" extends="chrome://global/content/bindings/popup.xml#floater-base">
  608.     <content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
  609.       <vbox class="floater-box" flex="1">
  610.         <box class="floater-box-top">
  611.           <titlebar flex="1" xbl:inherits="title" style="border: 1px outset grey; background-color: grey;"/>
  612.         </box>
  613.         <box class="floater-box-center" flex="1">
  614.           <box class="floater-children" flex="1"> 
  615.             <children/>
  616.           </box>
  617.         </box>
  618.         <box class="floater-box-bottom">
  619.           <resizer direction="bottom" flex="1"/>
  620.           <resizer direction="bottomright" tooltiptext="Click and drag to resize"/>
  621.         </box>
  622.       </vbox>
  623.     </content>
  624.   </binding>
  625.  
  626.   <binding id="floater-dock-left" extends="chrome://global/content/bindings/popup.xml#floater-base">
  627.     <content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
  628.       <vbox class="floater-box" flex="1">
  629.         <box class="floater-box-top">
  630.           <titlebar flex="1" xbl:inherits="title"/>
  631.         </box>
  632.         <box class="floater-box-center" flex="1">
  633.           <box class="floater-children" flex="1"> 
  634.             <children/>
  635.           </box>
  636.           <resizer direction="right" tooltiptext="Click and drag to resize"/>
  637.         </box>
  638.       </vbox>
  639.     </content>
  640.   </binding>  
  641.   
  642.   <binding id="close-button" extends="chrome://global/content/bindings/button.xml#button-base">
  643.     <content>
  644.       <xul:hbox align="center" flex="1">
  645.         <xul:image class="close-button-x"/>
  646.       </xul:hbox>
  647.     </content>
  648.   </binding>
  649.  
  650. </bindings>
  651.  
  652.