<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2009 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
-->


<?xul-overlay href="chrome://zotero/content/zoteroPane.xul"?>
<?xul-overlay href="chrome://zotero/content/itemPane.xul"?>

<!DOCTYPE overlay [
	<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
]>

<overlay id="zotero"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	
	<script src="overlay.js"/>
	
	<popup id="contentAreaContextMenu"/>
	
	<toolbar id="zotero-toolbar" nowindowdrag="true"/>
	
	<vbox id="appcontent">
		<!-- onmouseup shouldn't be necessary but seems to help prevent tag selector from sometimes going off the screen -->
		<splitter id="zotero-splitter" resizebefore="closest" resizeafter="closest" hidden="true"
			onmouseup="ZoteroPane.updateTagSelectorSize()"/>
		
		<stack id="zotero-pane-stack" persist="savedHeight" savedHeight="300" hidden="true"/>
		
		<zoteroguidancepanel id="zotero-toolbar-button-guidance" about="toolbarButton" for="zotero-toolbar-main-button"
			position="bottomcenter topleft" delay="2000" foregroundonly="true"/>
		<zoteroguidancepanel id="zotero-status-image-guidance" about="saveIcon" for="zotero-toolbar-save-button" x="17"/>
		
		<!-- Annotation Toolbar -->
		<toolbar id="zotero-annotate-tb" crop="end" insertbefore="content" hidden="true">
			<toolbarbutton id="zotero-annotate-tb-add" tooltiptext="&zotero.annotate.toolbar.add.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
			<toolbarbutton id="zotero-annotate-tb-collapse" tooltiptext="&zotero.annotate.toolbar.collapse.label;" oncommand="Zotero_Browser.toggleCollapsed();"/>
			<toolbarseparator/>
			<toolbarbutton id="zotero-annotate-tb-highlight" tooltiptext="&zotero.annotate.toolbar.highlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
			<toolbarbutton id="zotero-annotate-tb-unhighlight" tooltiptext="&zotero.annotate.toolbar.unhighlight.label;" oncommand="Zotero_Browser.toggleMode(this.id);"/>
		</toolbar>
	</vbox>
	
	
	<menupopup id="menu_ToolsPopup">
		<menuseparator id="zoteroSeparator" insertbefore="devToolsSeparator"/>
		<menuitem id="tools-zotero" insertbefore="devToolsSeparator"
			oncommand="ZoteroOverlay.toggleDisplay();" label="Zotero"
			key="key_openZotero"/>
	</menupopup>
	
	<keyset id="mainKeyset">
		<!--
			The key can be changed by the pref extensions.zotero.keys.openZotero,
			but if the values are changed here, the pref won't override them.
		-->
		<key id="key_openZotero"
			 key="Z" 
			 oncommand="ZoteroOverlay.toggleDisplay();"
			 modifiers="accel shift" />
		 <key id="key_saveToZotero"
			 key="S"
			 oncommand="Zotero_Browser.scrapeThisPage();"
			 modifiers="accel shift" />
	</keyset>
</overlay>
