home *** CD-ROM | disk | FTP | other *** search
/ ftp.swcp.com / ftp.swcp.com.zip / ftp.swcp.com / mac / mozilla-macos9-1.3.1.sea.bin / Mozilla1.3.1 / Chrome / comm.jar / content / editor / editor.xul < prev    next >
Extensible Markup Language  |  2003-06-08  |  11KB  |  287 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/nsJSSupportsUtils.js"/>
  77.   <script type="application/x-javascript" src="chrome://global/content/nsJSComponentManager.js"/>
  78.   <script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
  79.   <script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
  80.  
  81.   <popupset id="editorContentContextSet"/>
  82.   <popup id="sidebarPopup"/>
  83.  
  84.   <commandset id="tasksCommands">
  85.     <commandset id="globalEditMenuItems"/>
  86.     <commandset id="selectEditMenuItems"/>
  87.     <commandset id="undoEditMenuItems"/>
  88.     <commandset id="clipboardEditMenuItems"/>
  89.     
  90.     <commandset id="commonEditorMenuItems"/>
  91.     <commandset id="composerMenuItems"/>
  92.     <commandset id="composerEditMenuItems"/>
  93.     <commandset id="composerSaveMenuItems"/>    
  94.     <commandset id="composerStyleMenuItems"/>
  95.     <commandset id="composerTableMenuItems"/>
  96.     <commandset id="composerListMenuItems"/>
  97.     <command id="toggleSidebar"/>
  98.   </commandset>
  99.  
  100.   <tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(this);"/>
  101.  
  102.   <broadcaster id="args" value="about:blank"/>
  103.   <broadcaster id="canPrint"/>
  104.   
  105.   <!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs
  106.   <broadcaster id="dialog.start" ready="false"/>
  107.   <observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('html')"/>
  108. -->
  109.   <broadcasterset id="broadcasterset">
  110.     <broadcaster id="Editor:Throbber" busy="false"/>
  111.     <broadcaster id="Communicator:WorkMode"/>
  112.   </broadcasterset>
  113.  
  114.   <!-- keys are appended from the overlay -->
  115.   <keyset id="editorKeys">
  116.     <keyset id="tasksKeys"/>
  117.     <key id="showHideSidebar"/>
  118.   </keyset>
  119.  
  120.   <toolbox class="toolbox-top" id="EditorToolbox">
  121.   <menubar id="main-menubar" class="chromeclass-menubar" persist="collapsed" grippytooltiptext="&menuBar.tooltip;">
  122.     <menu id="fileMenu"/>
  123.     <menu id="editMenu"/>
  124.  
  125.     <menu id="viewMenu" label="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
  126.     <!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
  127.     <menupopup id="menu_View_Popup">
  128.       <menu id="menu_Toolbars"/>
  129.       <menuseparator id="viewSep1"/>
  130.       <menuitem id="viewNormalMode" checked="true"/>
  131.       <menuitem id="viewAllTagsMode"/>
  132.       <menuitem id="viewSourceMode"/>
  133.       <menuitem id="viewPreviewMode"/>
  134.       <menuseparator  id="viewSep1"/>
  135.       <menu id = "composerCharsetMenu" />
  136.     </menupopup>
  137.     </menu>
  138.  
  139.     <menu id="insertMenu"/>
  140.  
  141.     <menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatmenu.accesskey;">
  142.       <menupopup id="formatMenuPopup">
  143.         <menuitem id="objectProperties"/>
  144.         <menuitem id="colorsAndBackground"/>
  145.         <menuitem id="pageProperties"/>
  146.       </menupopup>
  147.     </menu>
  148.  
  149.     <menu id="tableMenu"/>
  150.  
  151.     <!-- tasks menu filled from tasksOverlay -->
  152.     <menu id="tasksMenu">
  153.       <menupopup id="taskPopup">
  154.         <menuitem id="menu_validate" observes="cmd_validate"/>
  155.         <menuseparator id="sep_validate"/>
  156.       </menupopup>
  157.     </menu>
  158.  
  159.     <menu id="windowMenu"/>
  160.  
  161.     <!-- DEBUG only -->
  162.     <!-- Removing debug menu
  163.     <menu id="debugMenu" /> 
  164.     -->
  165.     <!-- end DEBUG only -->
  166.   
  167.     <!-- help menu filled from globalOverlay -->
  168.     <menu id="menu_Help"/>
  169.  
  170.     <spacer flex="1"/>
  171.   </menubar>
  172.  
  173.   <!-- toolbar filled out from editorOverlay -->
  174.   <!-- add  class="standard" for dark blue background (icons need rework first) -->
  175.   <toolbar class="chromeclass-toolbar toolbar-primary" id="EditToolbar" persist="collapsed" 
  176.            tbalign="stretch" grippytooltiptext="&compositionToolbar.tooltip;">
  177.     <toolbarbutton id="newButton"/>
  178.     <toolbarbutton id="openButton"/>
  179.     <toolbarbutton id="saveButton"/>
  180.     <toolbarbutton id="publishButton"/>
  181.     <toolbarbutton id="previewButton"/>
  182.     <toolbarbutton id="printButton" />
  183.     <toolbarbutton id="spellingButton"/>
  184.     <toolbarseparator class="toolbarseparator-primary"/>
  185.     <toolbarbutton id="imageButton"/>
  186.     <toolbarbutton id="tableButton"/>
  187.     <toolbarbutton id="linkButton"/>
  188.     <toolbarbutton id="namedAnchorButton" hidden="true"/>
  189.     <toolbarbutton id="hlineButton" hidden="true"/>
  190.     <spacer flex="1"/>
  191.     <hbox id="throbber-box" align="center">
  192.       <button id="navigator-throbber" oncommand="goClickThrobber('editor.throbber.url')" tooltiptext="&throbber.tooltip;">
  193.         <observes element="Editor:Throbber" attribute="busy"/>
  194.       </button>
  195.     </hbox> 
  196.   </toolbar>
  197.   <toolbar class="chromeclass-toolbar" id="FormatToolbar" persist="collapsed" tbalign="center" grippytooltiptext="&formatToolbar.tooltip;">
  198.     <!-- from editorOverlay -->
  199.     <menulist id="ParagraphSelect"/>
  200.     <stack id="ColorButtons"/>
  201.     <toolbarbutton id="HighlightColorButton"/>
  202.  
  203.     <toolbarseparator class="toolbarseparator-standard"/>
  204.  
  205.     <toolbarbutton id="DecreaseFontSizeButton"/>
  206.     <toolbarbutton id="IncreaseFontSizeButton"/>
  207.  
  208.     <toolbarseparator class="toolbarseparator-standard"/>
  209.  
  210.     <toolbarbutton id="boldButton"/>
  211.     <toolbarbutton id="italicButton"/>
  212.     <toolbarbutton id="underlineButton"/>
  213.  
  214.     <toolbarseparator class="toolbarseparator-standard"/>
  215.     
  216.     <toolbarbutton id="ulButton"/>
  217.     <toolbarbutton id="olButton"/>
  218.     <toolbarbutton id="outdentButton"/>
  219.     <toolbarbutton id="indentButton"/>
  220.  
  221.     <toolbarseparator class="toolbarseparator-standard"/>
  222.  
  223.     <toolbarbutton id="align-left-button"/>
  224.     <toolbarbutton id="align-center-button"/>
  225.     <toolbarbutton id="align-right-button"/>
  226.     <toolbarbutton id="align-justify-button"/>
  227.  
  228.     <!-- TODO: Change to a menulist? -->
  229.     <!-- menu>
  230.       <button id="AlignPopupButton"/>
  231.       <menupopup id="AlignmentPopup"/>
  232.     </menu -->
  233.  
  234.  
  235.     <spacer flex="1"/>
  236.   </toolbar>
  237. </toolbox>
  238.  
  239. <!-- sidebar/toolbar/content/status -->
  240. <hbox id="sidebar-parent" flex="1">
  241.   <!-- From sidebarOverlay.xul -->
  242.   <vbox id="sidebar-box" class="chromeclass-extrachrome" hidden="true"/>
  243.   <splitter id="sidebar-splitter" class="chromeclass-extrachrome" hidden="true"/>
  244.  
  245.   <vbox id="appcontent" flex="1">
  246.     <deck id="ContentWindowDeck" selectedIndex="0" flex="1">
  247.       <!-- KLUDGE:  Temporary fix for bug 34414:
  248.            The current editor tag doesn't have a view, 
  249.            which breaks deck frame-hiding mechanism 
  250.        -->
  251.       <stack>
  252.         <editor editortype="html" type="content-primary" id="content-frame"
  253.                 onkeypress="if (event.keyCode == KeyEvent.DOM_VK_TAB) event.preventDefault();"
  254.                 context="editorContentContext" flex="1" tooltip="aHTMLTooltip"/>
  255.       </stack>
  256.       <vbox>
  257.         <label id="doctype-text" crop="right"/>
  258.         <textbox class="source-editor plain" id="content-source" multiline="true" rows="1"
  259.                    flex="1" style="width:1em; height:1em;"/>
  260.       </vbox>
  261.     </deck>
  262.  
  263.     <hbox id="EditModeToolbar" align="center" hidden="false" persist="collapsed">
  264.       <tabs id="EditModeTabs" class="tabs-bottom" flex="1">
  265.         <tab id="NormalModeButton"/>
  266.         <tab id="TagModeButton"/>
  267.         <tab id="SourceModeButton"/>
  268.         <tab id="PreviewModeButton"/>
  269.     </tabs>
  270.     </hbox>
  271.  
  272.   </vbox> <!-- appcontent -->
  273. </hbox><!-- sidebar-parent -->
  274.  
  275.     <!-- Some of this is from globarOverlay.xul -->
  276.     <statusbar class="chromeclass-status" id="status-bar">
  277.       <statusbarpanel id="component-bar"/>
  278.       <statusbarpanel id="structToolbar" flex="1" pack="end">
  279.         <label id="structSpacer" value="" flex="1"/>
  280.       </statusbarpanel>
  281.       <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
  282.     </statusbar>
  283.     
  284.  
  285.  
  286. </window>
  287.