home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2005 October / Gamestar_77_2005-10_dvd.iso / Programy / nsb-install-8-0.exe / chrome / toolkit.jar / content / global / bindings / popup.xml < prev    next >
Extensible Markup Language  |  2005-07-29  |  23KB  |  671 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.  
  142.       <handler event="popupshowing" phase="target">
  143.         <![CDATA[
  144.           var array = [];
  145.           var width = 0;
  146.           for (var menuitem = this.firstChild; menuitem; menuitem = menuitem.nextSibling) {
  147.             if (menuitem.localName == "menuitem" && menuitem.hasAttribute("acceltext")) {
  148.               var accel = document.getAnonymousElementByAttribute(menuitem, "anonid", "accel");
  149.               if (accel && accel.boxObject) {
  150.                 array.push(accel);
  151.                 if (accel.boxObject.width > width)
  152.                   width = accel.boxObject.width;
  153.               }
  154.             }
  155.           }
  156.           for (var i = 0; i < array.length; i++)
  157.             array[i].width = width;
  158.         ]]>
  159.       </handler>
  160.     </handlers>
  161.   </binding>
  162.  
  163.   <binding id="tooltip" extends="chrome://global/content/bindings/popup.xml#popup">
  164.     <content>
  165.       <children>
  166.         <xul:label class="tooltip-label" xbl:inherits="value=label,crop" crop="right" flex="1"/>
  167.       </children>
  168.     </content>
  169.     
  170.     <implementation>
  171.       <field name="_mouseOutCount">0</field>
  172.       <field name="_isMouseOver">false</field>
  173.       
  174.       <property name="label"
  175.                 onget="return this.getAttribute('label');"
  176.                 onset="this.setAttribute('label', val); return val;"/>
  177.     </implementation>
  178.  
  179.     <handlers>
  180.       <handler event="mouseover"><![CDATA[
  181.         var rel = event.relatedTarget;
  182.         //dump("ENTERING " + (rel ? rel.localName : "null") + "\n");
  183.         if (!rel)
  184.           return;
  185.           
  186.         // find out if the node we entered from is one of our anonymous children
  187.         while (rel) {
  188.           if (rel == this)
  189.             break;
  190.           rel = rel.parentNode;
  191.         }
  192.  
  193.         // if the exited node is not a descendant of ours, we are entering for the first time
  194.         if (rel != this)
  195.           this._isMouseOver = true;
  196.       ]]></handler>
  197.  
  198.       <handler event="mouseout"><![CDATA[
  199.         var rel = event.relatedTarget;
  200.         //dump("LEAVING " + (rel ? rel.localName : "null") + "\n");
  201.  
  202.         // relatedTarget is null when the titletip is first shown: a mouseout event fires
  203.         // because the mouse is exiting the main window and entering the titletip "window".
  204.         // relatedTarget is also null when the mouse exits the main window completely,
  205.         // so count how many times relatedTarget was null after titletip is first shown 
  206.         // and hide popup the 2nd time
  207.         if (!rel) {
  208.           ++this._mouseOutCount;
  209.           if (this._mouseOutCount > 1)
  210.             this.hidePopup();
  211.           return;
  212.         }
  213.           
  214.         // find out if the node we are entering is one of our anonymous children
  215.         while (rel) {
  216.           if (rel == this)
  217.             break;
  218.           rel = rel.parentNode;
  219.         }
  220.         
  221.         // if the entered node is not a descendant of ours, hide the tooltip
  222.         if (rel != this && this._isMouseOver) {
  223.           this.hidePopup();
  224.         }        
  225.       ]]></handler>
  226.  
  227.       <handler event="popupshowing">
  228.       <![CDATA[
  229.         // fill in the label automatically for the default tooltip
  230.         if (this.getAttribute("default") == "true") {
  231.           var label = "";
  232.           var ttNode = document.tooltipNode;
  233.           if (ttNode && ttNode.hasAttribute("tooltiptext"))
  234.             this.label = ttNode.getAttribute("tooltiptext");
  235.         }
  236.  
  237.         // This is a special consideration for tree titletips. There is a
  238.         // case where the user moves the mouse from over the treebody to
  239.         // completely outside of the window, while passing over a cell that
  240.         // displays a titletip.  This causes the titletip to show, even though
  241.         // the mouse is not over the corresponding cell, so we need to check
  242.         // if the titletip was entered by the mouse, and if not, hide it.
  243.         // XXX commenting this out for now because it doesn't work on Mac 
  244.         //     become mouseover isn't fired when the tooltip appears with the mouse over it
  245.         //if (this.hasAttribute("titletip"))
  246.         //  window.setTimeout(function(me) { if (!me._isMouseOver) me.hidePopup(); }, 100, this);
  247.       ]]>
  248.       </handler>
  249.  
  250.       <handler event="popuphiding"><![CDATA[
  251.         this._isMouseOver = false;
  252.         this._mouseOutCount = 0;
  253.       ]]></handler>
  254.     </handlers>
  255.   </binding>
  256.   
  257.   <!-- XXXben this binding is not currently used -->
  258.   <binding id="resizerbase" extends="xul:box">
  259.     <implementation>
  260.       <property name="popup">
  261.         <getter>
  262.         <![CDATA[
  263.           var currNode = this.parentNode;
  264.           while (currNode) {
  265.             try {
  266.               var bo = currNode.boxObject.QueryInterface(Components.interfaces.nsIPopupBoxObject);
  267.               if (bo)
  268.                 return currNode;
  269.             }
  270.             catch (e) {
  271.             }
  272.             currNode = currNode.parentNode;
  273.           }
  274.           return null;
  275.         ]]>
  276.         </getter>
  277.       </property>
  278.       
  279.       <method name="handleMouseMove">
  280.         <parameter name="aEvent"/>
  281.         <body>
  282.         <![CDATA[
  283.           throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
  284.         ]]>
  285.         </body>
  286.       </method> 
  287.       
  288.       <field name="screenLeft">0</field>
  289.       <field name="screenTop">0</field>
  290.       <field name="resizerDirection">0</field>
  291.     </implementation>
  292.     
  293.     <handlers>
  294.       <handler event="mousedown" phase="capturing"> 
  295.       <![CDATA[
  296.         var popup = event.target.popup;
  297.         var boxObject = popup.boxObject;
  298.         boxObject.captureMouseEvents = true;
  299.         event.target.screenLeft = event.screenX;
  300.         event.target.screenTop = event.screenY;
  301.         event.target.setMode();
  302.         event.preventDefault();
  303.       ]]>
  304.       </handler>
  305.       <handler event="mouseup" phase="capturing">
  306.       <![CDATA[
  307.         var popup = event.target.popup;
  308.         var boxObject = popup.boxObject;
  309.         boxObject.captureMouseEvents = false;
  310.         event.target.screenLeft = event.screenX;
  311.         event.target.screenTop = event.screenY;
  312.         event.target.direction = 0;
  313.         event.preventDefault();
  314.       ]]>
  315.       </handler>
  316.       <handler event="mousemove" phase="capturing">
  317.       <![CDATA[
  318.         event.target.handleMouseMove(event);
  319.         event.preventDefault();
  320.       ]]>
  321.       </handler>
  322.     </handlers>
  323.   </binding>
  324.   
  325.   <!-- East-West resizer -->
  326.   <binding id="ew-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  327.     <content>
  328.       <xul:hbox class="ew-resizer-box" flex="1"/>
  329.     </content>
  330.     <!--
  331.     <implementation>
  332.       <method name="handleMouseMove">
  333.         <parameter name="aEvent"/>
  334.         <body>
  335.         <![CDATA[
  336.           var boxObject = aEvent.target.boxObject;
  337.           if (boxObject.captureMouseEvents && this.resizerDirection == "right") {
  338.             var delta = aEvent.screenX - this.screenLeft;
  339.             this.screenLeft = aEvent.screenX;
  340.             
  341.             // We can set this directly as we're only modifying one dimension
  342.             aEvent.target.width += delta;
  343.           }
  344.         ]]>
  345.         </body>
  346.       </method>
  347.       <method name="setMode">
  348.         <body>
  349.         <![CDATA[
  350.           this.resizerDirection = "right";
  351.         ]]>
  352.         </body>
  353.       </method>
  354.     </implementation>
  355.     -->
  356.   </binding>
  357.   
  358.   <!-- North-South resizer -->
  359.   <binding id="ns-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  360.     <content>
  361.       <xul:hbox class="ns-resizer-box" flex="1"/>
  362.     </content>
  363.     <!--
  364.     <implementation>
  365.       <method name="handleMouseMove">
  366.         <parameter name="aEvent"/>
  367.         <body>
  368.         <![CDATA[
  369.           var boxObject = aEvent.target.boxObject;
  370.           if (boxObject.captureMouseEvents && this.resizerDirection == "bottom") {
  371.             var delta = aEvent.screenY - this.screenTop;
  372.             this.screenTop = aEvent.screenY;
  373.             var currWidth = aEvent.target.boxObject.width;
  374.             
  375.             // We can set this directly as we're only modifying one dimension
  376.             aEvent.target.height += delta;
  377.           }
  378.         ]]>
  379.         </body>
  380.       </method>
  381.       <method name="setMode">
  382.         <body>
  383.         <![CDATA[
  384.           this.resizerDirection = "bottom";
  385.         ]]>
  386.         </body>
  387.       </method>
  388.     </implementation>
  389.     -->
  390.   </binding>
  391.   
  392.   <!-- Diagonal resizer -->
  393.   <binding id="diag-resizer" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  394.     <content>
  395.       <xul:hbox class="diag-resizer-box" align="center" flex="1">
  396.         <xul:image class="diag-resizer-image"/>
  397.       </xul:hbox>
  398.     </content>
  399.     <!--
  400.     <implementation>
  401.       <method name="handleMouseMove">
  402.         <parameter name="aEvent"/>
  403.         <body>
  404.         <![CDATA[
  405.           var boxObject = aEvent.target.boxObject;
  406.           if (boxObject.captureMouseEvents && this.resizerDirection == "bottomright") {
  407.             if (!this.screenLeft || !this.screenTop) {
  408.               this.screenLeft = aEvent.screenX; 
  409.               this.screenTop = aEvent.screenY;
  410.             }
  411.             var deltaX = aEvent.screenX - this.screenLeft;
  412.             var deltaY = aEvent.screenY - this.screenTop;
  413.             this.screenLeft = aEvent.screenX;
  414.             this.screenTop = aEvent.screenY;
  415.             var currWidth = aEvent.target.boxObject.width;
  416.             var currHeight = aEvent.target.boxObject.height;
  417.             aEvent.target.sizeTo(currWidth + deltaX, currHeight + deltaY);
  418.           }
  419.         ]]>
  420.         </body>
  421.       </method>
  422.       <method name="setMode">
  423.         <body>
  424.         <![CDATA[
  425.           this.resizerDirection = "bottomright";
  426.         ]]>
  427.         </body>
  428.       </method>
  429.     </implementation>
  430.     -->
  431.   </binding>
  432.   
  433.   <binding id="titlebar" extends="xul:box"> <!-- extends="chrome://global/content/bindings/popup.xml#resizerbase"> -->
  434.     <content>
  435.       <xul:hbox class="titlebar-box" flex="1">
  436.         <xul:hbox class="titlebar-title-box" flex="1" tooltiptext="Click and drag to float">
  437.           <xul:label class="titlebar-title" xbl:inherits="value=title" flex="1" crop="right"/>
  438.         </xul:hbox>
  439.         <xul:button class="popupClose" tooltiptext="Close"/>
  440.       </xul:hbox>
  441.     </content>
  442.     <!--
  443.     <implementation>
  444.       <method name="handleMouseMove">
  445.         <parameter name="aEvent"/>
  446.         <body>
  447.         <![CDATA[
  448.           if (!this.popup) this.popup = aEvent.target.popup;
  449.           var boxObject = this.popup.boxObject;
  450.           if (boxObject.captureMouseEvents && this.direction == "titlebar") {
  451.             if (!this.screenLeft || !this.screenTop) {
  452.               this.screenLeft = aEvent.screenX; 
  453.               this.screenTop = aEvent.screenY;
  454.             }
  455.             var deltaX = aEvent.screenX - this.screenLeft;
  456.             var deltaY = aEvent.screenY - this.screenTop;
  457.             this.screenLeft = aEvent.screenX;
  458.             this.screenTop = aEvent.screenY;
  459.             var currX = aEvent.target.boxObject.screenX;
  460.             var currY = aEvent.target.boxObject.screenY;
  461.             aEvent.target.moveTo(currX + deltaX, currY + deltaY);
  462.           }
  463.         ]]>
  464.         </body>
  465.       </method>
  466.       <method name="setMode">
  467.         <body>
  468.         <![CDATA[
  469.           this.direction = "titlebar";
  470.         ]]>
  471.         </body>
  472.       </method>
  473.     </implementation>
  474.     -->
  475.   </binding>          
  476.  
  477.   <binding id="floater-base" display="xul:popup" extends="chrome://global/content/bindings/popup.xml#popup">
  478.     <implementation>
  479.       
  480.       <!-- Popup Manipulation Constants -->
  481.       <field name="MANIPULATE_NONE"      readonly="true">0</field>
  482.       <field name="MANIPULATE_MOVE"      readonly="true">1</field>
  483.       <field name="MANIPULATE_SIZE_EW"   readonly="true">2</field>
  484.       <field name="MANIPULATE_SIZE_NS"   readonly="true">3</field>
  485.       <field name="MANIPULATE_SIZE_DIAG" readonly="true">4</field>
  486.       
  487.       <method name="handleMouseMove">
  488.         <parameter name="aEvent"/>
  489.         <body>
  490.         <![CDATA[
  491.           var boxObject = this.boxObject;
  492.           if (boxObject.captureMouseEvents) {
  493.             var dX, dY;
  494.             var eScreenX = aEvent.screenX; 
  495.             var eScreenY = aEvent.screenY;
  496.             switch (this.manipulateMode) {
  497.               case this.MANIPULATE_SIZE_EW:
  498.                 var width = boxObject.width;
  499.                 dX = eScreenX - this.screenLeft;
  500.                 this.sizeTo(width + dX, this.height);
  501.                 break;
  502.               case this.MANIPULATE_SIZE_NS:
  503.                 var height = boxObject.height;
  504.                 dY = eScreenY - this.screenTop;
  505.                 this.sizeTo(this.width, height + dY);
  506.                 break;
  507.               case this.MANIPULATE_SIZE_DIAG:
  508.                 dX = eScreenX - this.screenLeft;
  509.                 dY = eScreenY - this.screenTop;
  510.                 this.sizeTo(this.width + dX, this.height + dY);
  511.                 break;
  512.               case this.MANIPULATE_MOVE:
  513.                 // XXXben this may not yet be complete. When we drag away from the 
  514.                 //        owner, we set some properties to ensure that we aren't
  515.                 //        positioned as a menu, automatically closed or steal
  516.                 //        keyboard navigation in an inappropriate way. 
  517.                 this.autoPosition = false;
  518.                 this.enableRollup(false);
  519.                 this.enableKeyboardNavigator(false);
  520.                 dX = eScreenX - this.screenLeft;
  521.                 dY = eScreenY - this.screenTop;
  522.                 this.moveTo(this.left + dX, this.top + dY);
  523.                 break;
  524.               default:
  525.                 break;                      
  526.             }
  527.             this.screenLeft = eScreenX;
  528.             this.screenTop = eScreenY;
  529.           }
  530.         ]]>
  531.         </body>
  532.       </method> 
  533.       <method name="findParentByLocalName">
  534.         <parameter name="aNode"/>
  535.         <parameter name="aLocalName"/>
  536.         <body>
  537.         <![CDATA[
  538.           var parent = aNode;
  539.           var names = [].concat(aLocalName);
  540.           while (parent) {
  541.             for (var i = 0; i < names.length; ++i) {
  542.               if (parent.localName == names[i])
  543.                 return parent;
  544.             }
  545.             parent = parent.parentNode;
  546.           }
  547.           return null;
  548.         ]]>
  549.         </body>
  550.       </method>
  551.       <method name="setMode">
  552.         <parameter name="aEvent"/>
  553.         <body>
  554.         <![CDATA[
  555.           var widget = this.findParentByLocalName(aEvent.originalTarget, ["resizer", "titlebar"]);
  556.           if (widget) {
  557.             if (widget.localName == "titlebar")
  558.               this.manipulateMode = this.MANIPULATE_MOVE;
  559.             else 
  560.               this.sizeDirection = widget.getAttribute("direction");
  561.           }
  562.         ]]>
  563.         </body>
  564.       </method>
  565.       <method name="cleanUp">
  566.         <parameter name="aEvent"/>
  567.         <body>
  568.         <![CDATA[
  569.           this.boxObject.captureMouseEvents = false;
  570.           this.screenLeft = aEvent.screenX;
  571.           this.screenTop = aEvent.screenY;
  572.           this.manipulateMode = this.MANIPULATE_NONE;
  573.           aEvent.preventDefault();
  574.         ]]>
  575.         </body>
  576.       </method>
  577.       <field name="screenLeft">0</field>
  578.       <field name="screenTop">0</field>
  579.       <field name="manipulateMode">0</field>
  580.     </implementation>
  581.     <handlers>
  582.       <handler event="mousedown" phase="capturing"> 
  583.       <![CDATA[
  584.         this.boxObject.captureMouseEvents = true;
  585.         this.screenLeft = event.screenX;
  586.         this.screenTop = event.screenY;
  587.         this.setMode(event);
  588.       ]]>
  589.       </handler>
  590.       <handler event="mouseup" phase="capturing">
  591.       <![CDATA[
  592.         this.cleanUp(event);
  593.       ]]>
  594.       </handler>
  595.       <handler event="mousemove" phase="capturing">
  596.       <![CDATA[
  597.         this.handleMouseMove(event);
  598.         event.preventDefault();
  599.       ]]>
  600.       </handler>
  601.       <!-- clean up, release the mouse, etc -->
  602.       <handler event="popuphiding">
  603.       <![CDATA[
  604.         this.cleanUp(event);
  605.       ]]>
  606.       </handler>
  607.       <handler event="click">
  608.       <![CDATA[
  609.         // Hide the popup if the [X] box is clicked. 
  610.         // XXXben this may not really belong here, but rather in a derived binding. 
  611.         if (event.originalTarget.className.indexOf("popupClose") != -1)
  612.           this.popupBoxObject.hidePopup();
  613.       ]]>
  614.       </handler>
  615.     </handlers>
  616.   </binding>
  617.  
  618.   <binding id="popup-scrollbars" extends="chrome://global/content/bindings/popup.xml#popup">
  619.     <content>
  620.       <xul:hbox class="popup-internal-box" flex="1" orient="vertical" style="overflow: auto;">
  621.         <children/>
  622.       </xul:hbox>
  623.     </content>
  624.   </binding>
  625.  
  626.   <binding id="floater-normal" 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" style="border: 1px outset grey; background-color: grey;"/>
  631.         </box>
  632.         <box class="floater-box-center" flex="1">
  633.           <box class="floater-children" flex="1"> 
  634.             <children/>
  635.           </box>
  636.         </box>
  637.         <box class="floater-box-bottom">
  638.           <resizer direction="bottom" flex="1"/>
  639.           <resizer direction="bottomright" tooltiptext="Click and drag to resize"/>
  640.         </box>
  641.       </vbox>
  642.     </content>
  643.   </binding>
  644.  
  645.   <binding id="floater-dock-left" extends="chrome://global/content/bindings/popup.xml#floater-base">
  646.     <content xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" >
  647.       <vbox class="floater-box" flex="1">
  648.         <box class="floater-box-top">
  649.           <titlebar flex="1" xbl:inherits="title"/>
  650.         </box>
  651.         <box class="floater-box-center" flex="1">
  652.           <box class="floater-children" flex="1"> 
  653.             <children/>
  654.           </box>
  655.           <resizer direction="right" tooltiptext="Click and drag to resize"/>
  656.         </box>
  657.       </vbox>
  658.     </content>
  659.   </binding>  
  660.   
  661.   <binding id="close-button" extends="chrome://global/content/bindings/button.xml#button-base">
  662.     <content>
  663.       <xul:hbox align="center" flex="1">
  664.         <xul:image class="close-button-x"/>
  665.       </xul:hbox>
  666.     </content>
  667.   </binding>
  668.  
  669. </bindings>
  670.  
  671.