<?xml version="1.0"?>

<!--
   - The contents of this file are subject to the Netscape 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/NPL/
   -  
   - 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 Mozilla Communicator client code, released
   - March 31, 1998.
   - 
   - The Initial Developer of the Original Code is Netscape
   - Communications Corporation. Portions created by Netscape are
   - Copyright (C) 1998-1999 Netscape Communications Corporation. All
   - Rights Reserved.
   - 
   - Contributor(s): 
  -->

<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?> 
<?xml-stylesheet href="chrome://editor/skin/EditorDialog.css" type="text/css"?> 
<!DOCTYPE window SYSTEM "chrome://editor/locale/EditorSpellCheck.dtd">

<!-- dialog containing a control requiring initial setup -->
<window class="dialog" title="&windowTitle.label;"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
    onload = "Startup()"
    onclose = "onClose()"
    orient="vertical">

  <script type="application/x-javascript" src="chrome://editor/content/EdDialogCommon.js"/>
  <script type="application/x-javascript" src="chrome://editor/content/EdSpellCheck.js"/>
  <script type="application/x-javascript" src="chrome://global/content/strres.js" />

  <spring id="location" offsetY="50" persist="offsetX offsetY"/>
  <keyset id="keys">
    <key keycode="VK_ENTER"  oncommand="doDefault()"/>
    <key keycode="VK_RETURN" oncommand="doDefault()"/>
    <key keycode="VK_ESCAPE" oncommand="onClose()"/>
  </keyset>
  <broadcaster id="args" value=""/>

  <grid>
    <columns>
      <column class="spell-check"/>
      <column class="spell-check"/>
    </columns>
    <rows>
      <row valign="middle" autostretch="never">
        <text class="label" id="MisspelledWordLabel" value="&misspelledWord.label;"/>
        <text class="label bold" id="MisspelledWord" crop="right"/>
        <spring/>
      </row>
      <row valign="middle" autostretch="never">
        <text class="label" id="ReplaceWordLabel" value="&wordEditField.label;"/>
        <box valign="middle" autostretch="never" flex="1">
          <!-- flex doesn't seem to work on textbox? -->
          <textbox id="ReplaceWordInput" oninput="ChangeReplaceWord()" flex="1"/>
          <button class="dialog" id="CheckWord" oncommand="CheckWord()" label="&checkwordButton.label;"/>
        </box>
      </row>
    </rows>
  </grid>
  <text class="label" id="SuggestedListLabel" value="&suggestions.label;"/>
  <grid flex="1">
    <columns><column flex="1"/><column flex="1"/></columns>
    <rows>
      <row flex="1">
        <!-- BUG! setting class="MinWidth20em" on tree doesn't work (width=0) -->
        <tree rows="8" class="list" id="SuggestedList" onselect="SelectSuggestedWord()">
          <treecolgroup>
            <treecol flex="1"/>
          </treecolgroup>
        </tree>
        <box orient="vertical">
          <grid flex="1" autostretch="never">
            <columns><column class="spell-check" flex="1"/><column class="spell-check" flex="1"/></columns>
            <rows>
              <row>
                <button class="dialog" id="Ignore"    oncommand="Ignore()" label="&ignoreButton.label;"/>
                <button class="dialog" id="IgnoreAll" oncommand="IgnoreAll()" label="&ignoreAllButton.label;"/>
              </row>
              <row>
                <button class="dialog" id="Replace" oncommand="Replace()" label="&changeButton.label;"/>
                <button class="dialog" id="ReplaceAll" oncommand="ReplaceAll()" label="&changeAllButton.label;"/>
              </row>
            </rows> 
          </grid>
          <spring flex="1"/>
          <text class="label" value="&userDictionary.label;"/>
          <box flex="1" autostretch="never">
            <button class="dialog spell-check" id="AddToDictionary" oncommand="AddToDictionary()" label="&addToUserDictionaryButton.label;" />
            <button class="dialog spell-check" id="EditDictionary"  oncommand="EditDictionary()" label="&editUserDictionaryButton.label;"   />
          </box>
        </box>
      </row>
      <row>
        <text class="label" value ="&languagePopup.label;"/>
        <spring/>
      </row>
      <row>
        <menulist id="LanguageMenulist" oncommand="SelectLanguage()"/>
         <!-- contents are appended by JS -->
        <box flex="1">
          <button class="dialog spell-check" id="Recheck" label="&recheckButton.label;" oncommand="Recheck()"/>
          <button class="dialog spell-check" id="Close"   label="&closeButton.label;"   oncommand="onClose()"/>
        </box>
      </row>
    </rows>
  </grid>
</window>
