2007-03-22 10:30:00 -07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<bindings id="generalBindings"
|
|
|
|
xmlns="http://www.mozilla.org/xbl"
|
|
|
|
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
|
|
xmlns:xbl="http://www.mozilla.org/xbl">
|
|
|
|
|
|
|
|
<binding id="basecontrol">
|
|
|
|
<implementation implements="nsIDOMXULControlElement">
|
|
|
|
<!-- public implementation -->
|
|
|
|
<property name="disabled" onset="if (val) this.setAttribute('disabled', 'true');
|
|
|
|
else this.removeAttribute('disabled');
|
|
|
|
return val;"
|
|
|
|
onget="return this.getAttribute('disabled') == 'true';"/>
|
2007-04-16 13:04:39 -07:00
|
|
|
<property name="tabIndex" onget="return parseInt(this.getAttribute('tabindex')) || 0"
|
2007-03-22 10:30:00 -07:00
|
|
|
onset="if (val) this.setAttribute('tabindex', val);
|
|
|
|
else this.removeAttribute('tabindex'); return val;"/>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="basetext" extends="chrome://global/content/bindings/general.xml#basecontrol">
|
2008-07-02 12:57:12 -07:00
|
|
|
<implementation implements="nsIDOMXULLabeledControlElement">
|
2007-03-22 10:30:00 -07:00
|
|
|
<!-- public implementation -->
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="label" onset="this.setAttribute('label',val); return val;"
|
2007-03-22 10:30:00 -07:00
|
|
|
onget="return this.getAttribute('label');"/>
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="crop" onset="this.setAttribute('crop',val); return val;"
|
2007-03-22 10:30:00 -07:00
|
|
|
onget="return this.getAttribute('crop');"/>
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="image" onset="this.setAttribute('image',val); return val;"
|
2007-03-22 10:30:00 -07:00
|
|
|
onget="return this.getAttribute('image');"/>
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="command" onset="this.setAttribute('command',val); return val;"
|
|
|
|
onget="return this.getAttribute('command');"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
<property name="accessKey">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return this.labelElement ? this.labelElement.accessKey : this.getAttribute('accesskey');
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
<setter>
|
|
|
|
<![CDATA[
|
|
|
|
// Always store on the control
|
|
|
|
this.setAttribute('accesskey', val);
|
|
|
|
// If there is a label, change the accesskey on the labelElement
|
|
|
|
// if it's also set there
|
|
|
|
if (this.labelElement) {
|
|
|
|
this.labelElement.accessKey = val;
|
|
|
|
}
|
|
|
|
return val;
|
|
|
|
]]>
|
|
|
|
</setter>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<field name="labelElement"/>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="control-item" extends="chrome://global/content/bindings/general.xml#basetext">
|
|
|
|
<implementation>
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="value" onset="this.setAttribute('value', val); return val;"
|
2007-03-22 10:30:00 -07:00
|
|
|
onget="return this.getAttribute('value');"/>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2009-09-04 03:58:18 -07:00
|
|
|
<binding id="root-element">
|
|
|
|
<implementation>
|
|
|
|
<field name="_lightweightTheme">null</field>
|
|
|
|
<constructor><![CDATA[
|
|
|
|
if (this.hasAttribute("lightweightthemes")) {
|
|
|
|
let temp = {};
|
|
|
|
Components.utils.import("resource://gre/modules/LightweightThemeConsumer.jsm", temp);
|
|
|
|
this._lightweightTheme = new temp.LightweightThemeConsumer(this.ownerDocument);
|
|
|
|
}
|
|
|
|
]]></constructor>
|
|
|
|
<destructor><![CDATA[
|
|
|
|
if (this._lightweightTheme) {
|
|
|
|
this._lightweightTheme.destroy();
|
|
|
|
this._lightweightTheme = null;
|
|
|
|
}
|
|
|
|
]]></destructor>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
<binding id="iframe">
|
|
|
|
<implementation implements="nsIAccessibleProvider">
|
|
|
|
<property name="accessibleType" readonly="true">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return Components.interfaces.nsIAccessibleProvider.OuterDoc;
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
</property>
|
|
|
|
<property name="docShell"
|
|
|
|
readonly="true"
|
|
|
|
onget="return this.boxObject.QueryInterface(Components.interfaces.nsIContainerBoxObject).docShell"/>
|
|
|
|
<property name="contentWindow"
|
|
|
|
readonly="true"
|
|
|
|
onget="return this.docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIDOMWindow);"/>
|
|
|
|
<property name="webNavigation"
|
|
|
|
onget="return this.docShell.QueryInterface(Components.interfaces.nsIWebNavigation);"
|
|
|
|
readonly="true"/>
|
|
|
|
<property name="contentDocument" readonly="true"
|
|
|
|
onget="return this.webNavigation.document;"/>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="statusbarpanel" display="xul:button">
|
|
|
|
<content>
|
|
|
|
<children>
|
|
|
|
<xul:label class="statusbarpanel-text" xbl:inherits="value=label,crop" crop="right" flex="1"/>
|
|
|
|
</children>
|
|
|
|
</content>
|
|
|
|
|
2008-03-05 20:17:19 -08:00
|
|
|
<implementation implements="nsIAccessibleProvider">
|
|
|
|
<property name="accessibleType" readonly="true">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return Components.interfaces.nsIAccessibleProvider.XULButton;
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
</property>
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
<property name="label"
|
|
|
|
onget="return this.getAttribute('label');"
|
|
|
|
onset="this.setAttribute('label',val); return val;"/>
|
2007-09-01 16:17:44 -07:00
|
|
|
<property name="image"
|
|
|
|
onget="return this.getAttribute('image');"
|
|
|
|
onset="this.setAttribute('image',val); return val;"/>
|
2007-09-04 12:26:02 -07:00
|
|
|
<property name="src"
|
|
|
|
onget="return this.getAttribute('src');"
|
|
|
|
onset="this.setAttribute('src',val); return val;"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="statusbarpanel-menu-iconic" display="xul:menu"
|
|
|
|
extends="chrome://global/content/bindings/general.xml#statusbarpanel">
|
|
|
|
<content>
|
2007-09-17 07:25:38 -07:00
|
|
|
<xul:image class="statusbarpanel-icon" xbl:inherits="src,src=image"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
<children/>
|
|
|
|
</content>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="statusbar">
|
|
|
|
<content>
|
|
|
|
<children/>
|
|
|
|
<xul:statusbarpanel class="statusbar-resizerpanel">
|
2009-01-18 02:28:19 -08:00
|
|
|
<xul:resizer dir="bottomend"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
</xul:statusbarpanel>
|
|
|
|
</content>
|
|
|
|
|
|
|
|
<implementation implements="nsIAccessibleProvider">
|
|
|
|
<property name="accessibleType" readonly="true">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return Components.interfaces.nsIAccessibleProvider.XULStatusBar;
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
</property>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2008-10-18 02:57:46 -07:00
|
|
|
<binding id="statusbar-drag"
|
|
|
|
extends="chrome://global/content/bindings/general.xml#statusbar">
|
|
|
|
<implementation>
|
2011-01-20 07:38:26 -08:00
|
|
|
<field name="_dragBindingAlive">true</field>
|
2008-10-18 02:57:46 -07:00
|
|
|
<constructor>
|
2010-06-25 13:06:36 -07:00
|
|
|
if (!this._draggableStarted) {
|
|
|
|
this._draggableStarted = true;
|
|
|
|
try {
|
2010-06-29 08:09:32 -07:00
|
|
|
let tmp = {};
|
|
|
|
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
2012-02-02 00:28:04 -08:00
|
|
|
let draghandle = new tmp.WindowDraggingElement(this);
|
2011-01-20 07:38:26 -08:00
|
|
|
draghandle.mouseDownCheck = function () this._dragBindingAlive;
|
2010-06-25 13:06:36 -07:00
|
|
|
} catch (e) {}
|
|
|
|
}
|
2008-10-18 02:57:46 -07:00
|
|
|
</constructor>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
<binding id="statusbarpanel-iconic" display="xul:button"
|
|
|
|
extends="chrome://global/content/bindings/general.xml#statusbarpanel">
|
|
|
|
<content>
|
2007-09-17 07:25:38 -07:00
|
|
|
<xul:image class="statusbarpanel-icon" xbl:inherits="src,src=image"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
</content>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="statusbarpanel-iconic-text" display="xul:button"
|
|
|
|
extends="chrome://global/content/bindings/general.xml#statusbarpanel">
|
|
|
|
<content>
|
2007-09-17 07:25:38 -07:00
|
|
|
<xul:image class="statusbarpanel-icon" xbl:inherits="src,src=image"/>
|
2007-03-22 10:30:00 -07:00
|
|
|
<xul:label class="statusbarpanel-text" xbl:inherits="value=label,crop"/>
|
|
|
|
</content>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="image">
|
|
|
|
<implementation implements="nsIDOMXULImageElement, nsIAccessibleProvider">
|
|
|
|
<property name="src"
|
|
|
|
onget="return this.getAttribute('src');"
|
|
|
|
onset="this.setAttribute('src',val); return val;"/>
|
|
|
|
<property name="accessibleType" readonly="true">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
2008-02-08 05:05:20 -08:00
|
|
|
// Expose XUL images with an onclick as a toolbarbutton
|
|
|
|
return this.hasAttribute("onclick") ?
|
|
|
|
Components.interfaces.nsIAccessibleProvider.XULToolbarButton :
|
|
|
|
Components.interfaces.nsIAccessibleProvider.XULImage;
|
2007-03-22 10:30:00 -07:00
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
</property>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="deck">
|
|
|
|
<implementation>
|
|
|
|
<property name="selectedIndex"
|
2007-09-01 16:17:44 -07:00
|
|
|
onget="return this.getAttribute('selectedIndex') || '0'">
|
2007-03-22 10:30:00 -07:00
|
|
|
<setter>
|
|
|
|
<![CDATA[
|
|
|
|
if (this.selectedIndex == val)
|
|
|
|
return val;
|
|
|
|
this.setAttribute("selectedIndex", val);
|
|
|
|
var event = document.createEvent('Events');
|
|
|
|
event.initEvent('select', true, true);
|
|
|
|
this.dispatchEvent(event);
|
|
|
|
return val;
|
|
|
|
]]>
|
|
|
|
</setter>
|
|
|
|
</property>
|
|
|
|
|
|
|
|
<property name="selectedPanel">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return this.childNodes[this.selectedIndex];
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
|
|
|
|
<setter>
|
|
|
|
<![CDATA[
|
|
|
|
var selectedIndex = -1;
|
|
|
|
for (var panel = val; panel != null; panel = panel.previousSibling)
|
|
|
|
++selectedIndex;
|
|
|
|
this.selectedIndex = selectedIndex;
|
|
|
|
return val;
|
|
|
|
]]>
|
|
|
|
</setter>
|
|
|
|
</property>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
|
|
|
<binding id="dropmarker" extends="xul:button">
|
|
|
|
<resources>
|
|
|
|
<stylesheet src="chrome://global/skin/dropmarker.css"/>
|
|
|
|
</resources>
|
|
|
|
|
|
|
|
<content>
|
|
|
|
<xul:image class="dropmarker-icon"/>
|
|
|
|
</content>
|
|
|
|
|
|
|
|
<implementation implements="nsIAccessibleProvider">
|
|
|
|
<property name="accessibleType" readonly="true">
|
|
|
|
<getter>
|
|
|
|
<![CDATA[
|
|
|
|
return Components.interfaces.nsIAccessibleProvider.XULDropmarker;
|
|
|
|
]]>
|
|
|
|
</getter>
|
|
|
|
</property>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2008-10-18 02:57:46 -07:00
|
|
|
<binding id="windowdragbox">
|
|
|
|
<implementation>
|
2011-01-20 07:38:26 -08:00
|
|
|
<field name="_dragBindingAlive">true</field>
|
2008-10-18 02:57:46 -07:00
|
|
|
<constructor>
|
2010-06-25 13:06:36 -07:00
|
|
|
if (!this._draggableStarted) {
|
|
|
|
this._draggableStarted = true;
|
|
|
|
try {
|
2010-06-29 08:09:32 -07:00
|
|
|
let tmp = {};
|
|
|
|
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
|
2012-02-02 00:28:04 -08:00
|
|
|
let draghandle = new tmp.WindowDraggingElement(this);
|
2011-01-20 07:38:26 -08:00
|
|
|
draghandle.mouseDownCheck = function () this._dragBindingAlive;
|
2010-06-25 13:06:36 -07:00
|
|
|
} catch (e) {}
|
|
|
|
}
|
2008-10-18 02:57:46 -07:00
|
|
|
</constructor>
|
|
|
|
</implementation>
|
|
|
|
</binding>
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
</bindings>
|