<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
/*
 * Copyright (c) OutWit Technologies 2007-2017.
 * All rights reserved.
 */
-->
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?><!-- This arrive after the resource in folder-->
<?xml-stylesheet href="chrome://outwit-kernel/skin/main.css" type="text/css"?>
<?xml-stylesheet href="chrome://outwit-modules-docs/skin/main.css" type="text/css"?>

<?xul-overlay href="chrome://outwit-kernel/content/kernelOverlay/scripts.xul"?>

<?xul-overlay href="chrome://outwit-kernel/content/widgets/page/page.xul"?>
<?xul-overlay href="chrome://outwit-kernel/content/widgets/page/commands.xul"?>
<?xul-overlay href="chrome://outwit-kernel/content/widgets/page/toolbar.xul"?>

<?xul-overlay href="chrome://outwit-kernel/content/kernelOverlay/commandsetOverlay.xul"?>
<?xul-overlay href="menu/menuOverlay.xul"?>
<?xul-overlay href="chrome://outwit-kernel/content/widgets/menu/windowMenuOverlay.xul"?>

<?xul-overlay href="menu/popupMenuOverlay.xul"?>
<?xul-overlay href="menu/toolbarOverlay.xul"?>
<?xul-overlay href="menu/optionsOverlay.xul"?>
<?xul-overlay href="menu/catchOptionsOverlay.xul"?>
<?xul-overlay href="menu/commandOverlay.xul"?>


<!DOCTYPE window [
<!ENTITY % browserDTD SYSTEM "chrome://outwit-kernel/locale/browser.dtd" >
  %browserDTD;
  <!ENTITY % owDTD SYSTEM "chrome://outwit-modules-docs/locale/main.dtd">
  %owDTD;
  <!ENTITY % findBarDTD SYSTEM "chrome://global/locale/findbar.dtd" >
  %findBarDTD;
  <!ENTITY % menuDTD SYSTEM "chrome://outwit-modules-docs/locale/menu.dtd">
  %menuDTD;
  <!ENTITY % catchDTD SYSTEM "chrome://outwit-modules-docs/locale/mediacatch.dtd">
  %catchDTD;
  ]>


  <window
    id="outfitDocs"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    title="&window.title;"
    windowtype="outwit-docs:main"
    onload="outwitDocs.onLoad(event);"
    persist="screenX screenY width height sizemode"
    >

    <script type="text/javascript" src="chrome://outwit-kernel/content/api.js" />
    <script type="text/javascript" src="chrome://outwit-kernel/content/bootstrap.js" />

    <!-- Include from the browser -->
    <script type="application/javascript" src="chrome://global/content/nsTransferable.js"/>
    <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/> <!--nsDragAndDrop.js -->
    <script type="application/javascript" src="chrome://global/content/editMenuOverlay.js"/>
    <script type="application/javascript" src="chrome://mozapps/content/downloads/helperApps.js"/>

    <!-- Our main functions -->
    <script src="main.js"     type="application/javascript" />

    <!-- Useful scripts -->
    <script type="application/javascript" src="js/ZoomManager.js"/>
    <script type="application/javascript" src="js/historyHandler.js"/>
    <script type="application/javascript" src="js/urlAnalyser.js"/>
    <script type="application/javascript" src="js/searchTreeCtrl.js"/>
    <script type="application/javascript" src="js/CategoryManager.js"/>
    <script type="application/javascript" src="js/autocatchRule.js"/>
    <!--script type="application/javascript" src="js/listener.js"/-->
    <script type="application/javascript" src="js/dragDrop.js" />

    <!-- Lot of controller for our ui -->
    <script src="menu/menuCtrl.js" type="application/javascript" />
    <script src="menu/popupMenuCtrl.js" type="application/javascript" />
    <script src="menu/optionsCtrl.js" type="application/javascript" />

    <!-- Include for the directory -->
    <script src="chrome://outwit-kernel/content/widgets/directory/icons/dragdrop.js" type="application/javascript" />
    <script src="chrome://outwit-kernel/content/widgets/directory/SortService.js" type="application/javascript" />

    <popupset id="mainPopupSet">
      <tooltip id="aTooltip" onpopupshowing="" /> 
    </popupset>

    <keyset>
      <!-- close docs and not firefox -->
      <key
        id="key-close"
        key="&closeCmd.key;"
        command="cmd_closeWindow"
        modifiers="accel" />

      <key
        id="key-escape"
        keycode="VK_ESCAPE"
        oncommand="menuCtrl.nav.stop()"
        />

      <key
        id="key-fullscreen"
        key="F"
        modifiers="shift,accel"
        oncommand="optionsCtrl.fullScreen = !optionsCtrl.fullScreen"/>
      <key
        id="key-next"
        key="N"
        modifiers="accel"
        command="widgetPage:Next"
        />

      <key
        id="key-emptyDocsCatch"
        key="x"
        modifiers="accel shift"
        oncommand="menuCtrl.catch.clear()"
        />

      <key
        id="key-fullZoomEnlarge"
        key="+"
        modifiers="accel"
        command="cmd_fullZoomEnlarge"
        />
      <key
        id="key-fullZoomReduce"
        key="-"
        modifiers="accel"
        command="cmd_fullZoomReduce"
        />
      <key
        id="key-fullZoomReset"
        key="0"
        modifiers="accel"
        command="cmd_fullZoomReset"
        />

      <key
        id="key-bug"
        key="B"
        modifiers="alt,shift,accel"
        url="&menu.feedback.bugsurl;"
        oncommand="menuCtrl.browser.open(this.getAttribute('url') + '&#38;version=' + ow.version)"
        />
    </keyset>

    <commandset id="owBaseCommandSet" />
    <commandset id="owDocsCommandSet" />

    <stringbundle id="bundle_browser" src="chrome://outwit-kernel/locale/browser.properties"/>

    <popupset id="owDocsPopups" />

    <vbox flex="1">
      <vbox id="owDocsMainBox" flex="1">
        <toolbox id="owDocsMenuBar"/>
        <toolbox id="owToolbox" mode="icons" />

        <deck id="mainDeck" flex="1">
          <hbox flex="1">
            <vbox id="sidebarBox">
              <vbox flex="1">
                <hbox id="searchTreeHeader" class="boxHeader">
                  <label id="searchTreeHeaderLabel"
                    value="&searchResults;" flex="1"
                    onclick="document.getElementById('searchTree').focus()"/>
                  <toolbarbutton class="tab-close-button" style="display:-moz-box" oncommand="toggleSidebarBox()"/> 
                </hbox>
                <tree
                  id="searchTree"
                  flex="1"
                  hidecolumnpicker="true"
                  seltype="multiple"
                  onselect="searchTreeCtrl.display()"
                  onkeypress="searchTreeCtrl.handleKey(event)"
                  context="owDocsSearchContextMenu">
                  <treecols>
                    <treecol id="icon" width="24" hideheader="true"/>  
                    <treecol id="category" flex="1" hideheader="true" crop="center"/>  
                  </treecols>
                  <treechildren id="searchTreeChildren" />
                </tree>
              </vbox>
              <splitter resizeafter="flex"/>
              <vbox flex="2">
                <hbox
                  id="catchHeader" class="boxHeader"
                  onclick="gCatch.focus()">
                  <label value="&catchResults;" />
                  <label class="boxHeaderSmallLabel" value="(" />
                  <label id="catchHeaderLengthLabel" class="boxHeaderSmallLabel" value="0" />
                  <label class="boxHeaderSmallLabel" value=")" />
                </hbox>
                <mediacatch
                  id="gCatch"
                  orient="vertical"
                  flex="2"
                  background-image="chrome://outwit-modules-docs/skin/dir.png"
                  background-label1="&catch.background.label1;"
                  background-label2="&catch.background.label2;"
                  scrollbar="none"
                  seltype="multiple"
                  style="height:200px;min-height:100px"
                  contextmenu="owDocsContextMenu"
                  onmouseover="if(!this.childNodes.length) gNotification.showHelp('catchBackground')"
                  onmouseout="gNotification.hide()"
                  onDOMMouseScroll="gCatch.scrollByPixels(event.detail*100)"
                  ondragover="nsDragAndDrop.dragOver(event,dragObserver)"
                  ondragdrop="nsDragAndDrop.drop(event,dragObserver)"
                  />
                <hbox id="catchOptionsOverlay" persist="collapsed"/>
              </vbox>
            </vbox>
            <splitter id="left-splitter" collapse="before" persist="state" />
            <vbox flex="1">
              <notificationbox id="notificationBox" />
              <folder id="gFolder" flex="1" contextmenu="owDocsContextMenu" tooltipmenu="aTooltip"/>
              <hbox id="optionsOverlay" persist="collapsed"/>
            </vbox>
          </hbox>
          <hbox flex="1">
            <outwitPage id="outwitPage" flex="1" />
          </hbox>

        </deck>

      </vbox>
      <statusbar>
        <statusbarpanel id="statusBarPanelLeft">
          <label id="statusBox" value="" />
        </statusbarpanel> 
        <statusbarpanel
          id="statusBarPanelRight"
          flex="1">
          <label id="statusBoxUrl" crop="center" value="" flex="1" />
          <label id="statusBoxHelp" value="" flex="1" />
        </statusbarpanel>
        <statusbarpanel
          id="statusDownloadMonitor"
          onclick="BrowserDownloadsUI()"
          collapsed="true">
          <image id="statusDlImage" />
          <label id="statusDlCurrentTitle" value="&status.downloads.current;" />
          <label id="statusDlCurrent" value="0" />
          <label id="statusDlQueuedTitle" value="&status.downloads.queued;" />
          <label id="statusDlQueued" value="0" />
        </statusbarpanel>
      </statusbar>
    </vbox>
  </window>
