home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Complet / thunderbird / chrome / mail.jar / content / editor / editor.xul < prev    next >
Encoding:
Extensible Markup Language  |  2003-10-24  |  11.6 KB  |  296 lines

  1. <?xml version="1.0"?> 
  2.  
  3. <!--
  4.    - The contents of this file are subject to the Netscape Public
  5.    - License Version 1.1 (the "License"); you may not use this file
  6.    - except in compliance with the License. You may obtain a copy of
  7.    - the License at http://www.mozilla.org/NPL/
  8.    -  
  9.    - Software distributed under the License is distributed on an "AS
  10.    - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  11.    - implied. See the License for the specific language governing
  12.    - rights and limitations under the License.
  13.    -  
  14.    - The Original Code is Mozilla Communicator client code, released
  15.    - March 31, 1998.
  16.    - 
  17.    - The Initial Developer of the Original Code is Netscape
  18.    - Communications Corporation. Portions created by Netscape are
  19.    - Copyright (C) 1999-2000 Netscape Communications Corporation. All
  20.    - Rights Reserved.
  21.    - 
  22.    - Contributor(s):
  23.    -    Ben Goodger
  24.    -    Michael Lowe
  25.    -    Sammy Ford
  26.   -->
  27.  
  28. <?xml-stylesheet href="chrome://editor/skin/" type="text/css"?> 
  29.  
  30. <?xml-stylesheet href="chrome://editor/skin/editorPrimaryToolbar.css" type="text/css"?> 
  31. <?xml-stylesheet href="chrome://editor/skin/editorFormatToolbar.css" type="text/css"?> 
  32. <?xml-stylesheet href="chrome://editor/skin/editorModeToolbar.css" type="text/css"?> 
  33. <?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>
  34. <?xul-overlay href="chrome://editor/content/composerOverlay.xul"?>
  35. <?xul-overlay href="chrome://editor/content/EditorContextMenuOverlay.xul"?>
  36. <?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
  37. <?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
  38. <?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
  39. <?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
  40. <?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
  41. <?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
  42. <?xul-overlay href="chrome://communicator/content/communicatorOverlay.xul"?>
  43.  
  44. <!DOCTYPE window [
  45. <!ENTITY % editorDTD SYSTEM "chrome://editor/locale/editor.dtd" >
  46. %editorDTD;
  47. <!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd" >
  48. %editorOverlayDTD;
  49. <!ENTITY % brandDTD SYSTEM "chrome://global/locale/brand.dtd" >
  50. %brandDTD;
  51. ]> 
  52.  
  53. <window id="editorWindow"
  54.         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  55.         onload="EditorOnLoad()"
  56.         onunload="EditorShutdown()"
  57.         onclose="return EditorCanClose()"
  58.         onfocus="EditorOnFocus()"
  59.         contenttitlesetting="true"
  60.         titlemodifier="&editorWindow.titlemodifier;"
  61.         titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
  62.         windowtype="composer:html"
  63.         width="640" height="480"
  64.         screenX="10" screenY="10"
  65.         persist="screenX screenY width height sizemode">
  66.  
  67.   <script type="application/x-javascript" src="chrome://editor/content/editor.js"/>
  68.   <script type="application/x-javascript" src="chrome://editor/content/EditorCommandsDebug.js"/>
  69.   <script type="application/x-javascript" src="chrome://editor/content/EditorContextMenu.js"/>
  70.   <script type="application/x-javascript" src="chrome://editor/content/StructBarContextMenu.js"/>
  71.   <script type="application/x-javascript" src="chrome://editor/content/editorApplicationOverlay.js"/>
  72.   <script type="application/x-javascript" src="chrome://editor/content/publishprefs.js"/>
  73.   <script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
  74.   <script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
  75.   <script type="application/x-javascript" src="chrome://communicator/content/printing.js"/>
  76.   <script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
  77.   <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
  78.  
  79.   <popupset id="editorContentContextSet"/>
  80.   <popup id="sidebarPopup"/>
  81.  
  82.   <commandset id="tasksCommands">
  83.     <commandset id="globalEditMenuItems"/>
  84.     <commandset id="selectEditMenuItems"/>
  85.     <commandset id="undoEditMenuItems"/>
  86.     <commandset id="clipboardEditMenuItems"/>
  87.     
  88.     <commandset id="commonEditorMenuItems"/>
  89.     <commandset id="composerMenuItems"/>
  90.     <commandset id="composerEditMenuItems"/>
  91.     <commandset id="composerSaveMenuItems"/>    
  92.     <commandset id="composerStyleMenuItems"/>
  93.     <commandset id="composerTableMenuItems"/>
  94.     <commandset id="composerListMenuItems"/>
  95.     <command id="toggleSidebar"/>
  96.   </commandset>
  97.  
  98.   <tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(this);"/>
  99.  
  100.   <broadcaster id="args" value="about:blank"/>
  101.   <broadcaster id="canPrint"/>
  102.   
  103.   <!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs
  104.   <broadcaster id="dialog.start" ready="false"/>
  105.   <observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('html')"/>
  106. -->
  107.   <broadcasterset id="broadcasterset">
  108.     <broadcaster id="Editor:Throbber" busy="false"/>
  109.     <broadcaster id="Communicator:WorkMode"/>
  110.   </broadcasterset>
  111.  
  112.   <!-- keys are appended from the overlay -->
  113.   <keyset id="editorKeys">
  114.     <keyset id="tasksKeys"/>
  115.     <key id="showHideSidebar"/>
  116.     <!-- eat these tab events here to stop focus from moving -->
  117.     <key keycode="VK_TAB" oncommand="return true;"/>
  118.     <key keycode="VK_TAB" modifiers="shift" oncommand="return true;"/>
  119.     <key keycode="VK_TAB" modifiers="control" oncommand="return true;"/>
  120.     <key keycode="VK_TAB" modifiers="control,shift" oncommand="return true;"/>
  121.   </keyset>
  122.  
  123.   <toolbox class="toolbox-top" id="EditorToolbox">
  124.   <menubar id="main-menubar" class="chromeclass-menubar" persist="collapsed" grippytooltiptext="&menuBar.tooltip;">
  125.     <menu id="fileMenu"/>
  126.     <menu id="editMenu"/>
  127.  
  128.     <menu id="viewMenu" label="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
  129.     <!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
  130.     <menupopup id="menu_View_Popup">
  131.       <menu id="menu_Toolbars"/>
  132.       <menuseparator id="viewSep1"/>
  133.       <menuitem id="viewNormalMode" checked="true"/>
  134.       <menuitem id="viewAllTagsMode"/>
  135.       <menuitem id="viewSourceMode"/>
  136.       <menuitem id="viewPreviewMode"/>
  137.       <menuseparator  id="viewSep1"/>
  138.       <menu id = "composerCharsetMenu" />
  139.     </menupopup>
  140.     </menu>
  141.  
  142.     <menu id="insertMenu"/>
  143.  
  144.     <menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatmenu.accesskey;">
  145.       <menupopup id="formatMenuPopup">
  146.         <menuitem id="snapToGrid"/>
  147.         <menuseparator/>
  148.         <menuitem id="objectProperties"/>
  149.         <menuitem id="colorsAndBackground"/>
  150.         <menuitem id="pageProperties"/>
  151.       </menupopup>
  152.     </menu>
  153.  
  154.     <menu id="tableMenu"/>
  155.  
  156.     <!-- tasks menu filled from tasksOverlay -->
  157.     <menu id="tasksMenu">
  158.       <menupopup id="taskPopup">
  159.         <menuitem id="menu_validate" observes="cmd_validate"/>
  160.         <menuseparator id="sep_validate"/>
  161.       </menupopup>
  162.     </menu>
  163.  
  164.     <menu id="windowMenu"/>
  165.  
  166.     <!-- DEBUG only -->
  167.     <menu id="debugMenu" /> 
  168.     <!-- end DEBUG only -->
  169.   
  170.     <!-- help menu filled from globalOverlay -->
  171.     <menu id="menu_Help"/>
  172.  
  173.     <spacer flex="1"/>
  174.   </menubar>
  175.  
  176.   <!-- toolbar filled out from editorOverlay -->
  177.   <!-- add  class="standard" for dark blue background (icons need rework first) -->
  178.   <toolbar class="chromeclass-toolbar toolbar-primary" id="EditToolbar" persist="collapsed" 
  179.            tbalign="stretch" grippytooltiptext="&compositionToolbar.tooltip;">
  180.     <toolbarbutton id="newButton"/>
  181.     <toolbarbutton id="openButton"/>
  182.     <toolbarbutton id="saveButton"/>
  183.     <toolbarbutton id="publishButton"/>
  184.     <toolbarbutton id="previewButton"/>
  185.     <toolbarbutton id="cutButton"/>
  186.     <toolbarbutton id="copyButton"/>
  187.     <toolbarbutton id="pasteButton"/>
  188.     <toolbarbutton id="printButton"/>
  189.     <toolbarbutton id="findButton"/>
  190.     <toolbarseparator class="toolbarseparator-primary"/>
  191.     <toolbarbutton id="linkButton"/>
  192.     <toolbarbutton id="namedAnchorButton"/>
  193.     <toolbarbutton id="imageButton"/>
  194.     <toolbarbutton id="hlineButton"/>
  195.     <toolbarbutton id="tableButton"/>
  196.     <toolbarbutton id="spellingButton"/>
  197.     <spacer flex="1"/>
  198.     <hbox id="throbber-box" align="center">
  199.       <button id="navigator-throbber" oncommand="goClickThrobber('editor.throbber.url')" tooltiptext="&throbber.tooltip;">
  200.         <observes element="Editor:Throbber" attribute="busy"/>
  201.       </button>
  202.     </hbox> 
  203.   </toolbar>
  204.   <toolbar class="chromeclass-toolbar" id="FormatToolbar" persist="collapsed" tbalign="center" grippytooltiptext="&formatToolbar.tooltip;">
  205.     <!-- from editorOverlay -->
  206.     <menulist id="ParagraphSelect"/>
  207.     <stack id="ColorButtons"/>
  208.     <toolbarbutton id="HighlightColorButton"/>
  209.  
  210.     <toolbarseparator class="toolbarseparator-standard"/>
  211.  
  212.     <toolbarbutton id="DecreaseFontSizeButton"/>
  213.     <toolbarbutton id="IncreaseFontSizeButton"/>
  214.  
  215.     <toolbarseparator class="toolbarseparator-standard"/>
  216.  
  217.     <toolbarbutton id="boldButton"/>
  218.     <toolbarbutton id="italicButton"/>
  219.     <toolbarbutton id="underlineButton"/>
  220.  
  221.     <toolbarseparator class="toolbarseparator-standard"/>
  222.     
  223.     <toolbarbutton id="ulButton"/>
  224.     <toolbarbutton id="olButton"/>
  225.     <toolbarbutton id="outdentButton"/>
  226.     <toolbarbutton id="indentButton"/>
  227.  
  228.     <toolbarseparator class="toolbarseparator-standard"/>
  229.  
  230.     <toolbarbutton id="align-left-button"/>
  231.     <toolbarbutton id="align-center-button"/>
  232.     <toolbarbutton id="align-right-button"/>
  233.     <toolbarbutton id="align-justify-button"/>
  234.  
  235.     <toolbarbutton id="absolutePositionButton"/>
  236.     <toolbarbutton id="decreaseZIndexButton"/>
  237.     <toolbarbutton id="increaseZIndexButton"/>
  238.  
  239.     <!-- TODO: Change to a menulist? -->
  240.     <!-- menu>
  241.       <button id="AlignPopupButton"/>
  242.       <menupopup id="AlignmentPopup"/>
  243.     </menu -->
  244.  
  245.  
  246.     <spacer flex="1"/>
  247.   </toolbar>
  248. </toolbox>
  249.  
  250. <!-- sidebar/toolbar/content/status -->
  251. <hbox id="sidebar-parent" flex="1">
  252.   <!-- From sidebarOverlay.xul -->
  253.   <vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
  254.   <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
  255.  
  256.   <vbox id="appcontent" flex="1">
  257.     <deck id="ContentWindowDeck" selectedIndex="0" flex="1">
  258.       <!-- KLUDGE:  Temporary fix for bug 34414:
  259.            The current editor tag doesn't have a view, 
  260.            which breaks deck frame-hiding mechanism 
  261.        -->
  262.       <stack>
  263.         <editor editortype="html" type="content-primary" id="content-frame"
  264.                 context="editorContentContext" flex="1" tooltip="aHTMLTooltip"/>
  265.       </stack>
  266.       <vbox>
  267.         <label id="doctype-text" crop="right"/>
  268.         <editor type="content" id="content-source" context="editorSourceContext" flex="1"/>
  269.       </vbox>
  270.     </deck>
  271.  
  272.     <hbox id="EditModeToolbar" align="center" hidden="false" persist="collapsed">
  273.       <tabs id="EditModeTabs" class="tabs-bottom" flex="1">
  274.         <tab id="NormalModeButton"/>
  275.         <tab id="TagModeButton"/>
  276.         <tab id="SourceModeButton"/>
  277.         <tab id="PreviewModeButton"/>
  278.     </tabs>
  279.     </hbox>
  280.  
  281.   </vbox> <!-- appcontent -->
  282. </hbox><!-- sidebar-parent -->
  283.  
  284.     <!-- Some of this is from globarOverlay.xul -->
  285.     <statusbar class="chromeclass-status" id="status-bar">
  286.       <statusbarpanel id="component-bar"/>
  287.       <statusbarpanel id="structToolbar" flex="1" pack="end">
  288.         <label id="structSpacer" value="" flex="1"/>
  289.       </statusbarpanel>
  290.       <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
  291.     </statusbar>
  292.     
  293.  
  294.  
  295. </window>
  296.