<?xml version="1.0" ?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css" ?>
<?xml-stylesheet href="chrome://scrapbook/skin/scrapbook.css" type="text/css" ?>

<?xul-overlay href="chrome://scrapbook/content/tree.xul"?>

<!DOCTYPE window [
	<!ENTITY % mainDTD SYSTEM "chrome://scrapbook/locale/scrapbook.dtd" >
	%mainDTD;
	<!ENTITY % propDTD SYSTEM "chrome://scrapbook/locale/property.dtd" >
	%propDTD;
	<!ENTITY % treeDTD SYSTEM "chrome://scrapbook/locale/tree.dtd" >
	%treeDTD;
]>

<window id="sbManageWindow"
        title="&sb.tools.manage; - ScrapBook"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:SB="http://amb.vis.ne.jp/mozilla/scrapbook-rdf#"
        width="720" height="540" persist="width height screenX screenY"
        onload="sbManageUI.init(); sbMainUI.init();"
        onunload="sbMainUI.done();"
        windowtype="scrapbook">

	<script type="application/x-javascript" src="chrome://scrapbook/content/manage.js" />
	<script type="application/x-javascript" src="chrome://scrapbook/content/scrapnote.js" />

	<keyset>
		<key key="a" modifiers="accel" oncommand="sbTreeUI.TREE.focus();sbTreeUI.TREE.view.selection.selectAll();" />
		<key key="w" modifiers="accel" oncommand="window.close();" />
		<key keycode="VK_ESCAPE" oncommand="window.close();" />
	</keyset>

	<popupset id="sbPopupSet" />

	<toolbox id="sbMainToolbox">
		<toolbar id="sbSearchToolbar" />
		<toolbar id="sbMainToolbar">
			<toolbarbutton id="sbToolbarNewFolder" type="menu">
				<menupopup>
					<menuitem class="menuitem-iconic sb-create" label="&sb.new.folder;..." oncommand="sbMainUI.createFolder();" />
					<menuitem class="menuitem-iconic sb-create" label="&sb.new.separator;" oncommand="sbMainUI.createSeparator();" />
					<menuitem class="menuitem-iconic sb-create" label="&sb.new.note;"      oncommand="sbMainUI.createNote();" />
				</menupopup>
			</toolbarbutton>
			<toolbarbutton id="sbToolbarToggle"   tooltiptext="&sb.toggle.all;" oncommand="sbTreeUI.toggleAllFolders();" />
			<toolbarbutton id="mbToolbarButton" />
			<toolbarseparator /><toolbarbutton id="sbToolbarMove"   label="&sb.move;..." oncommand="sbTreeUI.send();" />
			<toolbarseparator /><toolbarbutton id="sbToolbarRemove" label="&sb.remove;"  oncommand="sbTreeUI.remove();" />
			<spacer flex="1" />
			<toolbarseparator /><toolbarbutton id="sbToolbarCombine" label="&sb.tools.combine;" type="checkbox" autoCheck="false" group="module" moduleurl="chrome://scrapbook/content/combine.xul" oncommand="sbManageUI.toggleRightPane(this);" />
			<toolbarseparator /><toolbarbutton id="sbToolbarTrade"   label="&sb.tools.trade;"   type="checkbox" autoCheck="false" group="module" moduleurl="chrome://scrapbook/content/trade.xul"   oncommand="sbManageUI.toggleRightPane(this);" />
		</toolbar>
	</toolbox>

	<hbox flex="1">
		<vbox id="sbLeftPane" flex="2" persist="width">
			<vbox id="sbTreeOuter" flex="2" persist="height">
				<tree id="sbTree"
				      onclick="sbTreeUI.onClick(event, 1);"
				      ondblclick="sbTreeUI.onDblClick(event);"
				      onkeypress="sbTreeUI.onKeyPress(event);"
				      ondragstart="sbTreeUI.onDragStart(event);"
				      ondragover="sbTreeUI.onDragOver(event);"
				      contextmenu="sbPopup"
				      hidecolumnpicker="false"
				      enableColumnDrag="true"
				      seltype="multiple"
				      class="plain" flex="1">
					<treecols id="sbTreeCols">
						<treecol id="sbTreeColTitle" flex="6" label="&sb.prop.title;" hideheader="false"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#title"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColSource" flex="2" label="&sb.prop.url;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#source"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColType" flex="1" label="&sb.prop.type;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#type"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColIcon" flex="1" label="&sb.prop.icon;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#icon"
							hidden="true"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColChars" flex="1" label="&sb.prop.encode;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#chars"
							hidden="true"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColComment" flex="2" label="&sb.prop.comment;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#comment"
							hidden="true"
							persist="width hidden ordinal" />
						<splitter class="tree-splitter" />
						<treecol id="sbTreeColID" flex="1" label="&sb.prop.id.date;"
							class="sortDirectionIndicator" sortActive="true" sort="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#id"
							hidden="true"
							persist="width hidden ordinal" />
					</treecols>
					<template>
						<rule id="sbTreeRule">
							<treechildren flex="1">
								<treeitem uri="rdf:*">
									<treerow>
										<treecell id="sbTreeItem"
										          label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#title"
										          src="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#icon"
										          properties="Name title rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#type" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#source" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#type" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#icon" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#chars" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#comment" />
										<treecell label="rdf:http://amb.vis.ne.jp/mozilla/scrapbook-rdf#id" />
									</treerow>
								</treeitem>
							</treechildren>
						</rule>
					</template>
				</tree>
			</vbox>
		</vbox>
		<splitter id="sbPaneSplitter" hidden="true" />
		<browser id="sbRightPaneBrowser" type="chrome" onload="event.stopPropagation();" flex="5" hidden="true" persist="width" />
	</hbox>

	<statusbar id="status-bar" class="chromeclass-status">
		<statusbarpanel id="statusbar-display" flex="1" />
		<statusbarpanel id="statusbar-progresspanel" class="statusbarpanel-progress" collapsed="true">
			<progressmeter id="sbManageProgress" mode="determined" value="0" width="160" />
		</statusbarpanel>
	</statusbar>

</window>
