<?xml version="1.0"?>

<!DOCTYPE bindings [
<!ENTITY % tabBrowserDTD SYSTEM "chrome://global/locale/tabbrowser.dtd" >
%tabBrowserDTD;
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
]>

<bindings id="globalBindings"
   xmlns="http://www.mozilla.org/xbl"
   xmlns:html="http://www.w3.org/1999/xhtml"
   xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   xmlns:xbl="http://www.mozilla.org/xbl">

  <binding id="radio"
           extends="chrome://global/content/bindings/radio.xml#radio">
    <content>
      <xul:hbox class="radio-check-box1" xbl:inherits="selected,checked,disabled">
        <xul:hbox class="radio-check-box2" flex="1">
          <xul:image class="radio-check" xbl:inherits="selected,checked,disabled"/>
        </xul:hbox>
      </xul:hbox>
      <xul:hbox class="radio-label-box" xbl:inherits="flex">
        <xul:image class="radio-icon" xbl:inherits="src"/>
        <xul:label class="radio-label" xbl:inherits="xbl:text=label,flex,accesskey,crop"/>
      </xul:hbox>
    </content>
  </binding>
  
  
  <!--对MenuList进行扩展  -->
    <binding id="menulist" display="xul:menu" 
           extends="chrome://global/content/bindings/menulist.xml#menulist">
		<content  sizetopopup="pref">
			<xul:hbox class="myMenuList-left-corner" width="3px" />
				<xul:hbox class="menulist-label-box" flex="1">
					<xul:image class="menulist-icon" xbl:inherits="src"/>
					<xul:label class="menulist-label" 
									xbl:inherits="value=label,crop,accesskey" crop="right" flex="1"/>
				</xul:hbox>
				<xul:dropmarker class="menulist-dropmarker" type="menu"/>
			<children includes="menupopup"/>
			<xul:hbox class="myMenuList-right-corner" width="3px" />
		</content>
    </binding>

  <binding id="menulist-editable" extends="chrome://global/content/bindings/menulist.xml#menulist-editable">
    <content sizetopopup="pref">
	  <xul:hbox class="myMenuList-left-corner" width="3px" />
      <xul:hbox class="menulist-editable-box textbox-input-box" xbl:inherits="context" flex="1">
        <html:input class="menulist-editable-input" flex="1" anonid="input" allowevents="true"
                    xbl:inherits="value=label,disabled,tabindex,readonly"/>
      </xul:hbox>
      <xul:dropmarker class="menulist-dropmarker" type="menu"/>
      <children includes="menupopup"/>
  	<xul:hbox class="myMenuList-right-corner" width="3px" />
    </content>
 </binding>
 
  <!--bottom进行扩展  -->
  <binding id="button" display="xul:button"
           extends="chrome://global/content/bindings/button.xml#button">
    <resources>
      <stylesheet src="chrome://global/skin/button.css"/>
    </resources>
		<content>
		  <children includes="observes|template|menupopup|tooltip"/>
		  <xul:hbox class="myButton-left-corner" width="3px" />		  
		  <xul:hbox class="box-inherit myButton-box" xbl:inherits="align,dir,pack,orient"
					align="center" pack="center" flex="1">
			<children>
			  <xul:image class="button-icon" xbl:inherits="src=image"/>
			  <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
			</children>
		  </xul:hbox>
	  	  <xul:hbox class="myButton-right-corner" width="3px" />
		</content>
  </binding>
  
  <binding id="imgButton" 
           extends="chrome://global/content/bindings/button.xml#button">
		<content>
			<children>
			  <xul:image class="button-icon" width="16" height="16" xbl:inherits="src=image"/>
			  <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop"/>
			</children>
		</content>
  </binding>
  
  <binding id="menu-button" display="xul:menu"
           extends="chrome://global/content/bindings/button.xml#menu-button">
    <resources>
      <stylesheet src="chrome://global/skin/button.css"/>
    </resources>
    <content>
      <children includes="observes|template|menupopup|tooltip"/>
	  <xul:hbox class="myButton-left-corner" width="3px" />      
      <xul:button class="box-inherit button-menubutton-button"
                  anonid="button" flex="1" allowevents="true"
                  xbl:inherits="disabled,crop,image,label,accessKey,command,
                                buttonover,buttondown,align,dir,pack,orient">
        <children/>
      </xul:button>
      <xul:dropmarker class="button-menubutton-dropmarker" xbl:inherits="open,disabled"/>
  	  <xul:hbox class="myButton-right-corner" width="3px" />
    </content>
  </binding>
  
  
   <binding id="menu" display="xul:menu"
           extends="chrome://global/content/bindings/button.xml#menu">
    <resources>
      <stylesheet src="chrome://global/skin/button.css"/>
    </resources>           
    <content>
      <children includes="observes|template|menupopup|tooltip"/>
	  <xul:hbox class="myButton-left-corner" width="3px" />          
      <xul:hbox class="box-inherit myButton-box" xbl:inherits="align,dir,pack,orient"
                align="center" pack="center" flex="1">
        <children>
          <xul:image class="button-icon" xbl:inherits="src=image"/>
          <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop" flex="1"/>
          <xul:dropmarker class="button-menu-dropmarker" xbl:inherits="open,disabled"/>
        </children>
      </xul:hbox>
  	  <xul:hbox class="myButton-right-corner" width="3px" />      
    </content>
  </binding>
 
  <!-- ::: ToolbarButton-Menu-button :::::::::::::::::::::::::::::::::::::::::::::::: -->
  <binding id="myToolbar-Menu-button" extends="chrome://global/content/bindings/toolbarbutton.xml#menu-button">
    <resources>
      <stylesheet src="chrome://global/skin/myFirefox/myToolBarButton/myToolBarButton.css"/>
    </resources>
    <content>
      <children includes="observes|template|menupopup|tooltip"/>
   	  <xul:hbox class="myButton-left" width="3px" style="margin-left:-1px;"/>    
      <xul:toolbarbutton class="box-inherit toolbarbutton-menubutton-button"
             anonid="button" flex="1" allowevents="true"  orient="horizontal"
             xbl:inherits="disabled,crop,image,label,accesskey,command,align,dir,pack,toolbarmode,buttonstyle">
          <xul:image class="button-icon" xbl:inherits="src=image"/>
          <xul:label class="button-text" xbl:inherits="value=label,accesskey,crop" crop="right" flex="1"/>   
      </xul:toolbarbutton>
   	  <xul:hbox class="myButton-middle" width="3px"/>
   	  <xul:hbox class="myButton-arrowBox">
      <xul:dropmarker type="menu-button" class="toolbarbutton-menubutton-dropmarker"
                      xbl:inherits="align,dir,pack,orient,disabled,toolbarmode,buttonstyle,label"/>
      </xul:hbox>                
   	  <xul:hbox class="myButton-right" width="3px" style="margin-right:-1px ;"/>
    </content>
  </binding>
  <!-- ::: ToolbarButton-Menu :::::::::::::::::::::::::::::::::::::::::::::::: -->    
  <binding id="myMenu"  extends="chrome://global/content/bindings/toolbarbutton.xml#menu">
    <resources>
      <stylesheet src="chrome://global/skin/myFirefox/myToolBarButton/myToolBarButton.css"/>
    </resources>
    <content>
      <children includes="observes|template|menupopup|tooltip"/>
	  <xul:hbox class="myButton-left" width="3px" style="margin-left:-1px;"/>      
      <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/>
      <xul:label class="toolbarbutton-text" crop="right" flex="1"
                 xbl:inherits="value=label,accesskey,crop,dragover-top,toolbarmode,buttonstyle"/>
      <xul:dropmarker type="menu" class="toolbarbutton-menu-dropmarker" xbl:inherits="disabled,label"/>
   	  <xul:hbox class="myButton-right" width="3px" style="margin-right:-1px ;"/>       
    </content>
  </binding>
  
  <!-- ::: Toolbar-button :::::::::::::::::::::::::::::::::::::::::::::::: -->  
  <binding id="toolbarbutton" extends="chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton">
    <resources>
      <stylesheet src="chrome://global/skin/myFirefox/myToolBarButton/myToolBarButton.css"/>
    </resources>    
    <content>
      <children includes="observes|template|menupopup|tooltip"/>
	  <xul:hbox class="myButton-left" width="3px" style="margin-left:-1px;"/>      
      <xul:image class="toolbarbutton-icon" xbl:inherits="validate,src=image,toolbarmode,buttonstyle"/>
      <xul:label class="toolbarbutton-text" crop="right" flex="1"
                 xbl:inherits="value=label,accesskey,crop,toolbarmode,buttonstyle"/>
   	  <xul:hbox class="myButton-right" width="3px" style="margin-right:-1px ;"/>                 
    </content>
  </binding>

<!-- ::: Scrollbar thumb :::::::::::::::::::::::::::::::::::::::::::::::: -->
 <binding id="thumb" extends="chrome://global/content/bindings/scrollbar.xml#thumb">
    <content>
	  <xul:image class="thumb-start"/>
	  <xul:box  flex="2"/>
	  <xul:gripper flex="1"/>
	  <xul:box  flex="2"/>
	  <xul:image class="thumb-end"/>    
    </content>
  </binding>
<!-- 完成 :::::::::::::::::::::::::::::::::::::: -->

  <binding id="radio-with-spacing"
           extends="chrome://global/skin/globalBindings.xml#radio">
    <content>
      <xul:hbox class="radio-spacer-box">
        <xul:hbox class="radio-check-box1" xbl:inherits="selected,checked,disabled">
          <xul:hbox class="radio-check-box2" flex="1">
            <xul:image class="radio-check" xbl:inherits="selected,checked,disabled"/>
          </xul:hbox>
        </xul:hbox>
      </xul:hbox>
      <xul:hbox class="radio-label-center-box" flex="1">
        <xul:hbox class="radio-label-box" flex="1">
          <xul:image class="radio-icon" xbl:inherits="src"/>
          <xul:label class="radio-label" xbl:inherits="xbl:text=label,accesskey,crop" flex="1"/>
        </xul:hbox>
      </xul:hbox>
    </content>
  </binding>

  <binding id="toolbarpaletteitem-spacer" extends="chrome://global/content/bindings/toolbar.xml#toolbarpaletteitem">
    <content>
      <xul:spacer class="spacer-left"/>
      <children/>
      <xul:spacer class="spacer-right"/>
    </content>
  </binding>

</bindings>


