interface.xml

Summary

This file describes the Mozile editor widget and toolbar widget in Mozilla's XBL and XUL languages.

Version: 0.7.0

Author: James A. Overton


<?xml version="1.0" encoding="UTF-8"?>
<!--

/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is James A. Overton's code (james@overton.ca).
 *
 * The Initial Developer of the Original Code is James A. Overton.
 * Portions created by the Initial Developer are Copyright (C) 2005
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */


/** Mozile Widgets eXtensible Binding Language
 * @fileoverview This file describes the Mozile editor widget and toolbar widget in Mozilla's XBL and XUL languages. 
 * 
 * @link http://mozile.mozdev.org 
 * @author James A. Overton <james@overton.ca>
 * @version 0.7.0
 */

-->


<bindings id="document"
	xmlns="http://www.mozilla.org/xbl"
	xmlns:xbl="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">

	<binding id="toolbar">
		<content>
			<!-- Children element has to go at the top, or else the page gets rearranged -->
			<children/>
			
			<!-- Mozile Toolbar -->
			<xul:hbox id="mozileToolbar" collapsed="true" flex="1"/>
			
			<!-- <xul:vbox id="mozilePseudoDialog" collapsed="false">
				<xul:vbox/>
			</xul:vbox> -->
			
			<!-- Mozile About Interface -->	
			<xul:vbox id="mozileAboutInterface">
				<xul:vbox>
					<xul:hbox class="header">
						<xul:label value="Mozile" />
						<xul:spacer flex="1"/>
						<xul:label id="version" value="version?" />
					</xul:hbox>
				
					<xul:description id="teaser">the WYSIWYG inline editor for Mozilla</xul:description>
			
					<xul:hbox id="hboxMozdevURI">
							<xul:description>Brought to you by:</xul:description>
							<xul:description id="mozdevURI" class="link" value="http://mozile.mozdev.org" onclick="window.open(this.value)" />
					</xul:hbox>
			
					<xul:grid>
						<xul:columns>
							<xul:column/>
							<xul:column/>
						</xul:columns>
						<xul:rows>
							<xul:row>
										<xul:description id="creditsTitle">Credits:</xul:description>
											<xul:description id="credits">Conor Dowling, James A. Overton, Christian Stocker, 
											Paul Everitt, Max d'Ayala, David Palm, Richard Prescott, Lars Kiilerich, Kingsley Kerse, 
											Andreas Schamberger and others...</xul:description>
							</xul:row>
							<xul:row>
								<xul:description class="left">Licensed Under:</xul:description>
								<xul:description crop="center">MPL 1.1 / GPL 2.0 / LGPL 2.1</xul:description>
							</xul:row>
							<xul:row>
								<xul:description class="left">Full Terms at:</xul:description>
											<xul:description class="link" value="http://mozile.mozdev.org/license.html" onclick="window.open(this.value)" />
									</xul:row>
							</xul:rows>
					</xul:grid>
					<xul:hbox pack="end">
						<xul:button label="OK" oncommand="mozile.hideAboutInterface()"/>
					</xul:hbox>
				</xul:vbox>
			</xul:vbox>
			
			
			<!-- Save As Interface -->
			<xul:vbox id="mozileSaveInterface" collapsed="true" align="center">
				<xul:hbox class="header">
					<xul:label value="Mozile Saving" />
					<xul:spacer flex="1"/>
				</xul:hbox>
						
				<xul:groupbox id="mozilePresets">
					<xul:caption label="Presets"/>
					<xul:menulist id="mozileSavePresetList" value="page" flex="1">
						<xul:menupopup>
							<xul:menuitem label="Page Default" value="page" oncommand="mozileRestoreDefault()"/>
							<xul:menuitem id="mozileCustomPresetItem" label="Custom" value="custom" oncommand="mozileRestoreCustom()" disabled="true"/>
						</xul:menupopup>
					</xul:menulist>
				</xul:groupbox>
				
				<xul:groupbox>
					<xul:caption label="Settings"/>
					<xul:hbox align="center">
						<xul:label class="wide" value="Save Content:"/>
						<xul:menulist id="mozileSaveContentList" oncommand="mozileSaveChanged()" flex="1">
							<xul:menupopup>
								<xul:menuitem label="Entire Document" value="document" id="mozileSaveItemPage" oncommand="mozileSaveChanged()"/>
								<xul:menuitem label="Current Editable Area" value="current" id="mozileSaveItemCurrent" oncommand="mozileSaveChanged()"/>
								<!-- <xul:menuitem label="All Editable Areas" value="allEditable" id="mozileSaveItemAllEditable" disabled="false"/> -->
							</xul:menupopup>
						</xul:menulist>
					</xul:hbox>
					
					<xul:hbox align="center">
						<xul:label class="wide" value="Save Format:"/>
						<xul:menulist id="mozileSaveFormatList" oncommand="mozileSaveChanged()" flex="1" value="XHTML">
							<xul:menupopup>
							<xul:menuitem label="HTML" value="HTML" id="mozileSaveItemHTML" oncommand="mozileSaveChanged()"/>
							<xul:menuitem label="XHTML" value="XHTML" id="mozileSaveItemXHTML"  oncommand="mozileSaveChanged()"/>
							<xul:menuitem label="XML" value="XML" id="mozileSaveItemXML" oncommand="mozileSaveChanged()"/>
							</xul:menupopup>
						</xul:menulist>
					</xul:hbox>
			
					<xul:hbox align="center">
						<xul:label class="wide" value="Save Method:"/>
						<xul:menulist id="mozileSaveMethodList" oncommand="mozileSaveChanged()" flex="1">
							<xul:menupopup/>
						</xul:menulist>
					</xul:hbox>
					
					<!-- <xul:hbox id="mozileSaveFileBox" align="center" collapsed="true">
						<xul:label class="wide" value="Save to File:" control="mozileSaveToFile"/>
						<xul:textbox id="mozileSaveToFile" oninput="mozileSaveChanged()" flex="1" />
					</xul:hbox> -->
					
					<xul:hbox id="mozileSaveURLBox" align="center" collapsed="true">
						<xul:label class="wide" value="Save to URL:" control="mozileSaveToURL"/>
						<xul:textbox id="mozileSaveToURL" oninput="mozileSaveChanged()" flex="1" />
						<!--  type="autocomplete" autocompletesearch="history" -->
					</xul:hbox>
			
				</xul:groupbox>
				
				<xul:hbox pack="end" align="center">
					<xul:button label="Cancel" oncommand="mozile.hideSaveInterface()"/>
					<xul:button label="Save" oncommand="mozileSaveDone()" />
				</xul:hbox>
			</xul:vbox>
			
			<!-- Mozile Source View Interface -->
			<xul:vbox id="mozileSourceInterface" pack="center" align="center">
				<xul:vbox>
					<xul:textbox flex="1" id="sourceText" multiline="true" readonly="true" value=""/>
					<xul:hbox pack="end">
					 <!--<xul:button label="Save" oncommand="saveSourceText();"/>-->
						<xul:menulist>
							<xul:menupopup>
									<xul:menuitem label="Document as XML" oncommand="document.getAnonymousElementByAttribute(mozile.sourceInterface.parentNode,'id','sourceText').value=mozile.documentToXML()"/>
									<xul:menuitem label="Document as HTML" oncommand="document.getAnonymousElementByAttribute(mozile.sourceInterface.parentNode,'id','sourceText').value=mozile.documentToHTML()"/>
									<xul:menuitem label="Editor as XML" oncommand="document.getAnonymousElementByAttribute(mozile.sourceInterface.parentNode,'id','sourceText').value=mozile.editorToXML()"/>
									<xul:menuitem label="Editor as HTML" oncommand="document.getAnonymousElementByAttribute(mozile.sourceInterface.parentNode,'id','sourceText').value=mozile.editorToHTML()"/>
							</xul:menupopup>
						</xul:menulist>
				
						<xul:button label="Email" oncommand="document.location='mailto:?body='+escape(document.getAnonymousElementByAttribute(mozile.sourceInterface.parentNode,'id','sourceText').value)"/>
						<xul:button label="OK" oncommand="mozile.hideSourceInterface()"/>
					</xul:hbox>
				</xul:vbox>
			</xul:vbox>
			
			
			<!-- Mozile Message Interface -->
			<xul:vbox id="mozileMessageInterface">
					<xul:vbox>
					<xul:hbox class="header">
						<xul:label value="Mozile Messages" />
					</xul:hbox>
				
					<xul:vbox id="bugs" onclick="this.focus()" flex="1"/>
					
					<xul:hbox class="filters" align="center">
						<xul:textbox id="filterText" flex="1"/>
						<xul:button label="Search" oncommand="mozileDebugFilter()"/>
						<xul:menulist id="filterLevel" oncommand="mozileDebugFilter()">
										<xul:menupopup>
												<xul:menuitem label="Status Messages" value="status" oncommand="mozileDebugFilter()"/>
												<xul:menuitem label="Critical Messages" value="3" oncommand="mozileDebugFilter()"/>
												<xul:menuitem label="Serious Messages" value="2" oncommand="mozileDebugFilter()"/>
												<xul:menuitem label="Significant Messages" value="1" oncommand="mozileDebugFilter()"/>
												<xul:menuitem label="All Messages" value="0"  oncommand="mozileDebugFilter()"/>
										</xul:menupopup>
						</xul:menulist>
					</xul:hbox>
					<xul:hbox pack="start" align="center">
						<xul:label id="messageCount" value="Showing 0 Messages"/>
						<xul:spacer flex="1"/>
						<xul:button label="Reset" oncommand="mozileDebugReset()"/>
						<xul:button label="Clear" oncommand="mozileDebugClear()"/>
						<xul:button label="Close" oncommand="mozile.hideMessageInterface()"/>
					</xul:hbox>
				</xul:vbox>
			</xul:vbox>
			
			<!-- Mozile Status Bar -->
			<xul:hbox id="mozileStatusbar" collapsed="true">
				<xul:label value="Done" flex="1"/>
				<xul:progressmeter id="mozileProgressmeter" value="50" mode="determined" collapsed="true"/>
				<xul:button id="mozileMoreButton" label="More" collapsed="true"/>
				<!-- <xul:button id="mozilePastButton" label="Past" oncommand="mozile.executeCommand('Mozile-Debug',event)"/>
				Stupid bug fix for FF1.5.1 : -->
				<xul:button id="mozilePastButton" label="Past" onmousedown="mozile.executeCommand('Mozile-Debug',event)"/>
				<!--<xul:button id="mozileCloseButton" label="Close"/>-->
			</xul:hbox>
		</content>
		<implementation>
			<constructor>
				// Tell the mozile object where the various interface elements are.
				mozile.toolbar = document.getAnonymousElementByAttribute(this, "id", "mozileToolbar");
				mozile.aboutInterface = document.getAnonymousElementByAttribute(this, "id", "mozileAboutInterface");
				mozile.saveInterface = document.getAnonymousElementByAttribute(this, "id", "mozileSaveInterface");
				mozile.sourceInterface = document.getAnonymousElementByAttribute(this, "id", "mozileSourceInterface");
				mozile.messageInterface = document.getAnonymousElementByAttribute(this, "id", "mozileMessageInterface");
				mozile.statusbar = document.getAnonymousElementByAttribute(this, "id", "mozileStatusbar");
			</constructor>
		</implementation>
		<handlers>
			<handler event="command">
				//alert("Command: "+event.originalTarget.nodeName);
				var command = event.originalTarget.getAttribute("oncommand");
				if(!command || command=="") {
					var id = event.originalTarget.getAttribute("id");
					mozile.executeCommand(id, event);
				}
				eval(command);
				//event.originalTarget.doCommand();
			</handler>
			<handler event="mousedown">
				//alert("Mouse Down: "+event.originalTarget.nodeName);
				var command = event.originalTarget.getAttribute("onmousedown");
				if(command &amp;&amp; command != "") {
					eval(command);
				}
			</handler>
		</handlers>
	</binding>	

</bindings>


Documentation generated by JSDoc on Thu Feb 2 14:36:27 2006