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 / menu.xml < prev    next >
Extensible Markup Language  |  2005-07-29  |  7KB  |  152 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!DOCTYPE bindings [
  4.   <!ENTITY % globalRegionDTD SYSTEM "chrome://global-region/locale/region.dtd">
  5.   %globalRegionDTD;
  6. ]>
  7.  
  8. <bindings id="menuitemBindings"
  9.    xmlns="http://www.mozilla.org/xbl"
  10.    xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  11.    xmlns:xbl="http://www.mozilla.org/xbl">
  12.  
  13.   <binding id="menuitem-base">
  14.     <resources>
  15.       <stylesheet src="chrome://global/skin/menu.css"/>
  16.     </resources>
  17.     <implementation implements="nsIDOMXULSelectControlItemElement, nsIAccessibleProvider">
  18.       <property name="accessible">
  19.         <getter>
  20.           <![CDATA[
  21.             var accService = Components.classes["@mozilla.org/accessibilityService;1"].getService(Components.interfaces.nsIAccessibilityService);
  22.             if (this.localName == "menuseparator")
  23.               return accService.createXULMenuSeparatorAccessible(this);
  24.             if (this.parentNode && this.parentNode.parentNode &&
  25.                 this.parentNode.localName == "menupopup" && this.parentNode.parentNode.localName == "menulist")
  26.               return accService.createXULSelectOptionAccessible(this);
  27.             return accService.createXULMenuitemAccessible(this);
  28.           ]]>
  29.         </getter>
  30.       </property>
  31.     </implementation>
  32.   </binding>
  33.  
  34.   <binding id="menu" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  35.     <content>
  36.       <xul:label class="menu-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  37.       <xul:hbox anonid="accel">
  38.         <xul:label class="menu-accel" xbl:inherits="value=acceltext"/>
  39.       </xul:hbox>
  40.       <xul:hbox align="center" class="menu-right" chromedir="&locale.dir;"
  41.                 xbl:inherits="_moz-menuactive,disabled">
  42.         <xul:image/>
  43.       </xul:hbox>
  44.       <children includes="menupopup"/>
  45.     </content>
  46.     
  47.     <implementation>
  48.       <property name="value" onset="this.setAttribute('value',val); return val;"
  49.                             onget="return this.getAttribute('value');"/>
  50.     </implementation>  
  51.   </binding>
  52.  
  53.   <binding id="menuitem" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  54.     <content>
  55.       <xul:label class="menu-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  56.       <xul:hbox anonid="accel">
  57.         <xul:label class="menu-accel" xbl:inherits="value=acceltext"/>
  58.       </xul:hbox>
  59.     </content>
  60.     
  61.     <implementation>
  62.       <property name="value" onset="this.setAttribute('value',val); return val;"
  63.                             onget="return this.getAttribute('value');"/>
  64.       <property name="label" onget="return this.getAttribute('label');"
  65.                              onset="this.setAttribute('label', val); return val;"/>
  66.     </implementation>  
  67.   </binding>
  68.  
  69.   <binding id="menu-menubar" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  70.     <content>
  71.       <xul:label class="menubar-text" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  72.       <children includes="menupopup"/>
  73.     </content>
  74.   </binding>
  75.  
  76.   <binding id="menu-menubar-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  77.     <content>
  78.       <xul:image class="menubar-left" xbl:inherits="image=src"/>
  79.       <xul:label class="menubar-text" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  80.       <children includes="menupopup"/>
  81.     </content>
  82.   </binding>
  83.  
  84.   <binding id="menuitem-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem">
  85.     <content>
  86.       <xul:hbox class="menu-iconic-left" align="center" pack="center"
  87.                 xbl:inherits="selected,_moz-menuactive,disabled,checked">
  88.         <xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
  89.       </xul:hbox>
  90.       <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  91.       <xul:hbox anonid="accel">
  92.         <xul:label class="menu-iconic-accel" xbl:inherits="value=acceltext"/>
  93.       </xul:hbox>
  94.     </content>
  95.   </binding>
  96.  
  97.   <binding id="menuitem-iconic-checkbox" extends="chrome://global/content/bindings/menu.xml#menuitem">
  98.     <content>
  99.       <xul:hbox class="menu-iconic-left" align="center" pack="center"
  100.                 xbl:inherits="selected,_moz-menuactive,disabled,checked">
  101.         <xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
  102.         <xul:image class="menu-iconic-favicon" xbl:inherits="src=favsrc"/>
  103.       </xul:hbox>
  104.       <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  105.       <xul:hbox anonid="accel">
  106.         <xul:label class="menu-iconic-accel" xbl:inherits="value=acceltext"/>
  107.       </xul:hbox>
  108.     </content>
  109.   </binding>
  110.  
  111.   <binding id="menuitem-iconic-noaccel" extends="chrome://global/content/bindings/menu.xml#menuitem">
  112.     <content>
  113.       <xul:hbox class="menu-iconic-left" align="center" pack="center"
  114.                 xbl:inherits="selected,disabled,checked">
  115.         <xul:image class="menu-iconic-icon" xbl:inherits="src=image,validate,src"/>
  116.       </xul:hbox>
  117.       <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  118.     </content>
  119.   </binding>
  120.  
  121.   <binding id="menu-iconic" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  122.     <content>
  123.       <xul:hbox class="menu-iconic-left" align="center" pack="center">
  124.         <xul:image xbl:inherits="src=image"/>
  125.       </xul:hbox>
  126.       <xul:label class="menu-iconic-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  127.       <xul:hbox anonid="accel">
  128.         <xul:label class="menu-iconic-accel" xbl:inherits="value=acceltext"/>
  129.       </xul:hbox>
  130.       <xul:hbox class="menu-right" xbl:inherits="_moz-menuactive,disabled" align="center" pack="center">
  131.         <xul:image/>
  132.       </xul:hbox>
  133.       <children includes="menupopup|template"/>
  134.     </content>
  135.     
  136.     <implementation>
  137.       <property name="value" onset="this.setAttribute('value',val); return val;"
  138.                             onget="return this.getAttribute('value');"/>
  139.     </implementation>  
  140.   </binding>
  141.   
  142.   <binding id="menubutton-item" extends="chrome://global/content/bindings/menu.xml#menuitem-base">
  143.     <content>
  144.       <xul:label class="menubutton-text" flex="1" xbl:inherits="value=label,accesskey,crop" crop="right"/>
  145.       <children includes="menupopup"/>
  146.     </content>
  147.   </binding>  
  148.   
  149.   <binding id="menuseparator" extends="chrome://global/content/bindings/menu.xml#menuitem-base"/>
  150.  
  151. </bindings>
  152.