suite/debugQA/content/debugQATextEditorShell.xul
author Philip Chee <philip.chee@gmail.com>
Thu, 22 Dec 2016 13:41:51 +0100
changeset 27207 7f6a92e78b37d9f05e8a482aa6093c2aa6d57dcc
parent 26730 591634b0150581cdb65f6612ded8addf271a0593
permissions -rw-r--r--
Bug 1324121 - Port bug 1322609 (content-targetable) and bug 1322414 (content-primary) to suite. r=IanN a=IanN

<?xml version="1.0"?>

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xml-stylesheet href="chrome://editor/skin/editor.css" type="text/css"?>
<?xml-stylesheet href="chrome://editor/skin/editorPrimaryToolbar.css" type="text/css"?>
<?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/editingOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://debugQA/content/debugQAEditorOverlay.xul"?>

<!DOCTYPE window [
<!ENTITY % debugQAEditorOverlayDTD SYSTEM "chrome://debugqa/locale/debugQAEditorOverlay.dtd">
%debugQAEditorOverlayDTD;
<!ENTITY % editorDTD SYSTEM "chrome://editor/locale/editor.dtd">
%editorDTD;
<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
%editorOverlayDTD;
]>

<!-- NOTE: If we don't have "title" set, text editor doesn't work! -->
<window id="editorWindow"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="TextEditorOnLoad()"
        onunload="EditorShutdown()"
        onclose="return EditorCanClose()"
        onfocus="EditorOnFocus()"
        contenttitlesetting="true"
        title=""
        titlemodifier="&textEditorWindow.titlemodifier;"
        titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
        toggletoolbar="true"
        lightweightthemes="true"
        lightweightthemesfooter="status-bar"
        windowtype="composer:text"
        macanimationtype="document"
        drawtitle="true"
        width="640" height="480"
        screenX="10" screenY="10"
        persist="screenX screenY width height sizemode">

  <script type="application/javascript" src="chrome://editor/content/editor.js"/>
  <script type="application/javascript" src="chrome://editor/content/ComposerCommands.js"/>
  <script type="application/javascript"
          src="chrome://communicator/content/contentAreaClick.js"/>
  <script type="application/javascript"
          src="chrome://global/content/printUtils.js"/>
  <script type="application/javascript" src="chrome://global/content/nsDragAndDrop.js"/>

  <commandset id="editorCommands">
    <commandset id="commonEditorMenuItems"/>
    <commandset id="composerEditMenuItems"/>
    <commandset id="composerSaveMenuItems"/>
    <commandset id="composerMenuItems"/>
    <commandset id="tasksCommands"/>
  </commandset>

  <!-- broadcaster nodes are appended here from the overlays -->
  <broadcasterset id="editorBroadcasters">
    <broadcaster id="Editor:Throbber" busy="false"/>
    <broadcaster id="args"
                 value="chrome://debugqa/content/EditorInitPagePlain.html"/>
  </broadcasterset>

  <broadcasterset id="mainBroadcasterSet"/>

  <!-- keys are appended from the overlay -->
  <keyset id="editorKeys">
    <keyset id="tasksKeys"/>
    <key id="showHideSidebar"/>
  </keyset>

  <popupset id="contentAreaContextSet"/>

  <vbox id="titlebar"/>

  <toolbox id="EditorToolbox">
    <menubar id="main-menubar" class="chromeclass-menubar">
      <menu id="menu_File"/>
      <menu id="menu_Edit"/>

      <menu id="menu_View">
        <!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
        <menupopup id="menu_View_Popup">
          <menu id="menu_Toolbars">
            <menupopup id="view_toolbars_popup">
              <menuitem id="viewComposerToolbar"
                        type="checkbox"
                        label="&compositionToolbarCmd.label;"
                        accesskey="&compositionToolbarCmd.accesskey;"
                        command="cmd_viewCompToolbar"/>
              <menuitem id="menu_showTaskbar"/>
            </menupopup>
          </menu>
          <menuseparator id="viewSep1"/>
          <menu id="charsetMenu"
                onpopupshowing="EditorUpdateCharsetMenu(event.target);"
                oncommand="EditorSetCharacterSet(event);"/>
        </menupopup>
      </menu>

      <menu id="insertMenuPlainText"
            label="&insertMenu.label;"
            accesskey="&insertMenu.accesskey;">
        <menupopup id="insertMenuPlainTextPopup">
          <menuitem id="insertPlainTextChars"
                    accesskey="&insertCharsCmd.accesskey;"
                    command="cmd_insertChars"/>
        </menupopup>
      </menu>

      <!-- tasks and window menus filled from tasksOverlay -->
      <menu id="tasksMenu"/>
      <menu id="windowMenu"/>

      <!-- help menu filled from globalOverlay -->
      <menu id="menu_Help"/>

      <spacer flex="1"/>
    </menubar>

     <!-- toolbar filled out from editorOverlay -->
    <toolbar id="EditToolbar"
             class="chromeclass-toolbar toolbar-primary"
             persist="collapsed"
             grippytooltiptext="&compositionToolbar.tooltip;">
      <toolbarbutton id="newButton"/>
      <toolbarbutton id="openButton"/>
      <toolbarbutton id="saveButton"/>
      <toolbarbutton id="print-button"/>
      <toolbarseparator class="toolbarseparator-primary"/>
      <toolbarbutton id="spellingButton"/>
      <spacer flex="1"/>
    </toolbar>
  </toolbox>

  <menupopup id="popupNotificationMenu"/>

  <hbox id="sidebar-parent" flex="1">
    <!-- From sidebarOverlay.xul -->
    <vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
    <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
    <vbox id="appcontent" flex="1">
      <editor editortype="text"
              type="content"
              primary="true"
              id="content-frame"
              src="about:blank" flex="1"
              context="contentAreaContextMenu"/>
    </vbox> <!-- appcontent -->
  </hbox><!-- sidebar-parent -->

  <statusbar id="status-bar"
             class="chromeclass-status">
    <statusbarpanel id="component-bar"/>
    <statusbarpanel id="statusText"
                    label="&statusText.label;"
                    flex="1"
                    crop="right"/>
    <statusbarpanel id="statusbar-progresspanel"
                    class="statusbarpanel-progress"
                    collapsed="true">
      <progressmeter id="statusbar-icon"
                     class="progressmeter-statusbar"
                     mode="normal"
                     value="0">
        <observes element="Editor:Throbber" attribute="busy"/>
      </progressmeter>
    </statusbarpanel>
    <statusbarpanel id="offline-status" class="statusbarpanel-iconic"/>
  </statusbar>
</window>