<?xml version="1.0"?>
<!-- vim: set shiftwidth=2 tabstop=8 expandtab :
   -
   -
   - ***** 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 The JavaScript Debugger.
   -
   - The Initial Developer of the Original Code is
   - Netscape Communications Corporation.
   - Portions created by the Initial Developer are Copyright (C) 1998
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Robert Ginda, <rginda@netscape.com>, original author
   -   L. David Baron, <dbaron@dbaron.org>, modified for Layout Debugger
   -
   - 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 ***** -->

<!DOCTYPE window [
  <!ENTITY % layoutdebugDTD
           SYSTEM "chrome://layoutdebug/locale/layoutdebug.dtd">
  %layoutdebugDTD;

  <!ENTITY W3C_RDFNS "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <!ENTITY NC_RDFNS "http://home.netscape.com/NC-rdf#">
  <!ENTITY LDB_RDFNS "http://mozilla.org/newlayout/LDB-rdf#">
]>

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

<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>

<!--

  NOTE:  Because this window is used for layout regression tests, the
  persist attribute should never be used on anything.  Otherwise there
  is a risk of running baseline and verify runs under different
  conditions.

-->

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:rdf="&W3C_RDFNS;"
        id="main-window"
        align="stretch"
        title="&ldb.MainWindow.title;"
        titlemodifier="&ldb.MainWindow.title;"
        contenttitlesetting="true"
        titlemenuseparator=" - "
        windowtype="mozapp:layoutdebug"
        onload="OnLDBLoad();"
        onunload="OnLDBUnload();"
        width="610" height="450"
        screenX="4" screenY="4"
        >

  <script src="chrome://layoutdebug/content/layoutdebug.js"/>

  <commandset id="tasksCommands">
    <command id="cmd_close" oncommand="window.close();"/>
    <command id="cmd_quit"/>
  </commandset>

  <keyset id="tasksKeys">
    <key id="openFileKb" key="&ldb.Open.commandkey;" oncommand="openFile()"  modifiers="accel"/>
    <key id="key_close"/>
    <key id="key_quit"/>
  </keyset>

  <vbox flex="1">

    <toolbox>
      <menubar id="main-menubar" grippyhidden="true">
        <menu id="menu_file" label="File" accesskey="F">
          <menupopup id="menu_FilePopup">
            <menuitem id="menu_open" label="&ldb.Open.label;" accesskey="&ldb.Open.accesskey;" key="openFileKb" oncommand="openFile()"/>
            <menuitem id="menu_close" label="Close" accesskey="C" oncommand="window.close();"/>
          </menupopup>
        </menu>
        <menu label="&ldb.RegressionTestMenu.label;"
              accesskey="&ldb.RegressionTestMenu.accesskey;">
          <menupopup>
            <menuitem type="checkbox" id="menu_RTestPrintMode" label="&ldb.RegressionPrintMode.label;" accesskey="&ldb.RegressionPrintMode.accesskey;"/>
            <menu label="&ldb.RunBaselineMenu.label;"
                  accesskey="&ldb.RunBaselineMenu.accesskey;"
                  id="menu_RTest_baseline"
                  datasources="rdf:null"
                  containment="&NC_RDFNS;child"
                  ref="&LDB_RDFNS;Root">
              <template>
                <menupopup>
                  <menuitem uri="rdf:*"
                            label="rdf:&NC_RDFNS;name"
                            name="rdf:&NC_RDFNS;name"
                            oncommand="RunRTest(this.getAttribute('name'), true, document.getElementById('menu_RTestPrintMode').getAttribute('checked'));" />
                </menupopup>
              </template>
            </menu>
            <menu label="&ldb.RunVerifyMenu.label;"
                  accesskey="&ldb.RunVerifyMenu.accesskey;"
                  id="menu_RTest_verify"
                  datasources="rdf:null"
                  containment="&NC_RDFNS;child"
                  ref="&LDB_RDFNS;Root">
              <template>
                <menupopup>
                  <menuitem uri="rdf:*"
                            label="rdf:&NC_RDFNS;name"
                            name="rdf:&NC_RDFNS;name"
                            oncommand="RunRTest(this.getAttribute('name'), false, document.getElementById('menu_RTestPrintMode').getAttribute('checked'));" />
                </menupopup>
              </template>
            </menu>
            <menuseparator />
            <menuitem id="menu_AddNewList" label="&ldb.AddNewList.label;" accesskey="&ldb.AddNewList.accesskey;" oncommand="gRTestIndexList.add();" />
            <menu label="&ldb.RemoveListMenu.label;"
                  accesskey="&ldb.RemoveListMenu.accesskey;"
                  id="menu_RTest_remove"
                  datasources="rdf:null"
                  containment="&NC_RDFNS;child"
                  ref="&LDB_RDFNS;Root">
              <template>
                <menupopup>
                  <menuitem uri="rdf:*"
                            label="rdf:&NC_RDFNS;name"
                            name="rdf:&NC_RDFNS;name"
                            oncommand="gRTestIndexList.remove(this.getAttribute('name'));" />
                </menupopup>
              </template>
            </menu>
          </menupopup>
        </menu>
        <menu label="&ldb.ToggleMenu.label;"
              accesskey="&ldb.ToggleMenu.accesskey;">
          <menupopup>
            <menuitem type="checkbox" id="menu_visualDebugging" label="&ldb.visualDebugging.label;" accesskey="&ldb.visualDebugging.accesskey;" oncommand="toggle(this);" />
            <menuitem type="checkbox" id="menu_visualEventDebugging" label="&ldb.visualEventDebugging.label;" accesskey="&ldb.visualEventDebugging.accesskey;" oncommand="toggle(this);" />
            <menuseparator />
            <menuitem type="checkbox" id="menu_paintFlashing" label="&ldb.paintFlashing.label;" accesskey="&ldb.paintFlashing.accesskey;" oncommand="toggle(this);" />
            <menuitem type="checkbox" id="menu_paintDumping" label="&ldb.paintDumping.label;" accesskey="&ldb.paintDumping.accesskey;" oncommand="toggle(this);" />
            <menuitem type="checkbox" id="menu_invalidateDumping" label="&ldb.invalidateDumping.label;" accesskey="&ldb.invalidateDumping.accesskey;" oncommand="toggle(this);" />
            <menuseparator />
            <menuitem type="checkbox" id="menu_eventDumping" label="&ldb.eventDumping.label;" accesskey="&ldb.eventDumping.accesskey;" oncommand="toggle(this);" />
            <menuitem type="checkbox" id="menu_motionEventDumping" label="&ldb.motionEventDumping.label;" accesskey="&ldb.motionEventDumping.accesskey;" oncommand="toggle(this);" />
            <menuitem type="checkbox" id="menu_crossingEventDumping" label="&ldb.crossingEventDumping.label;" accesskey="&ldb.crossingEventDumping.accesskey;" oncommand="toggle(this);" />
            <menuseparator />
            <menuitem type="checkbox" id="menu_reflowCounts" label="&ldb.reflowCounts.label;" accesskey="&ldb.reflowCounts.accesskey;" oncommand="toggle(this);" />
          </menupopup>
        </menu>
        <menu label="&ldb.DumpMenu.label;"
              accesskey="&ldb.DumpMenu.accesskey;">
          <menupopup>
            <menuitem id="menu_dumpWebShells" label="&ldb.dumpWebShells.label;" accesskey="&ldb.dumpWebShells.accesskey;" oncommand="gDebugger.dumpWebShells();" />
            <menuitem id="menu_dumpContent" label="&ldb.dumpContent.label;" accesskey="&ldb.dumpContent.accesskey;" oncommand="gDebugger.dumpContent();" />
            <menuitem id="menu_dumpFrames" label="&ldb.dumpFrames.label;" accesskey="&ldb.dumpFrames.accesskey;" oncommand="gDebugger.dumpFrames();" />
            <menuitem id="menu_dumpViews" label="&ldb.dumpViews.label;" accesskey="&ldb.dumpViews.accesskey;" oncommand="gDebugger.dumpViews();" />
            <menuseparator />
            <menuitem id="menu_dumpStyleSheets" label="&ldb.dumpStyleSheets.label;" accesskey="&ldb.dumpStyleSheets.accesskey;" oncommand="gDebugger.dumpStyleSheets();" />
            <menuitem id="menu_dumpStyleContexts" label="&ldb.dumpStyleContexts.label;" accesskey="&ldb.dumpStyleContexts.accesskey;" oncommand="gDebugger.dumpStyleContexts();" />
            <menuseparator />
            <menuitem id="menu_dumpReflowStats" label="&ldb.dumpReflowStats.label;" accesskey="&ldb.dumpReflowStats.accesskey;" oncommand="gDebugger.dumpReflowStats();" />
          </menupopup>
        </menu>
        <menu id="tasksMenu"/>
        <menu id="windowMenu"/>
        <menu id="menu_Help"/>
      </menubar>

      <toolbar grippyhidden="true">
        <toolbarbutton id="back-button" class="toolbarbutton-1"
                       label="&ldb.BackButton.label;"
                       oncommand="gBrowser.goBack();" />
        <toolbarbutton id="forward-button" class="toolbarbutton-1"
                       label="&ldb.ForwardButton.label;"
                       oncommand="gBrowser.goForward();" />
        <toolbarbutton id="reload-button" class="toolbarbutton-1"
                       label="&ldb.ReloadButton.label;"
                       oncommand="gBrowser.reload();" />
        <toolbarbutton id="stop-button" class="toolbarbutton-1"
                       label="&ldb.StopButton.label;"
                       oncommand="gBrowser.stop();" />

        <textbox id="urlbar" flex="1"
                 onkeypress="if (event.keyCode == 13)
                               gBrowser.loadURI(this.value);" />
      </toolbar>
    </toolbox>

    <browser flex="1" id="browser" type="content-primary"
             homepage="about:blank" />

    <hbox>
      <description id="status-text" value="" />
    </hbox>
  </vbox>
</window>
