<?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) 1999 Netscape Communications Corporation. All
   - Rights Reserved.
   - 
   - Contributor(s):
   -    Ben Goodger
   -    Michael Lowe
   -    Sammy Ford
  -->

<?xml-stylesheet href="chrome://editor/skin/" type="text/css"?> 
<?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://sidebar/content/sidebarOverlay.xul"?>

<!DOCTYPE window SYSTEM "chrome://editor/locale/editor.dtd"> 

<window id="main-window" xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="EditorOnLoad()"
        onunload="EditorShutdown()"
        onclose="return EditorCanClose()"
        titlemodifier="&editorWindow.titlemodifier;"
        titlemenuseparator="&editorWindow.titlemodifiermenuseparator;"
        windowtype="composer:html"
        align="vertical"
        width="640" height="480">

  <html:script language="JavaScript" src="chrome://editor/content/EditorCommands.js"/>

  <!-- Use this when we abandon the default startup page -->
  <!-- broadcaster id="args" value="about:blank"/ -->
  <broadcaster id="args" value="chrome://editor/content/EditorInitPage.html"/>
  <broadcaster id="canPrint"/>
  
  <!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
  <broadcaster id="dialog.start" ready="false"/>
  <observes element="dialog.start" attribute="ready" onbroadcast="EditorStartup('html')"/>
  
  <!-- broadcaster nodes are appended here from the overlays -->
  <broadcasterset id="broadcasterset">
    <broadcaster id="Editor:Throbber" busy="false"/>
	</broadcasterset>

  <popupset>
    <popup id="TextColorPopup"/>
    <popup id="BackColorPopup"/>
  </popupset>
	
	<!-- keys are appended from the overlay -->
  <keyset id="defaultKeySet"/>

  <menubar id="main-menubar" chromeclass="menubar">
    <menu id="fileMenu"/>
    <menu id="editMenu"/>

    <menu value="&viewMenu.label;" accesskey="&viewmenu.accesskey;">
    <!-- id pulls in "Show Sidebar" item from sidebarOverlay -->
    <menupopup id="menu_View_Popup">
      <menu id="viewToolbar"/>

      <!-- menuseparator /> Put this back when it works.
      <menuitem id="viewSourceMenuitem"/ -->
      <menuseparator />
      <menu id="charsetMenu"/>
      <menu id="charsetMenu1"/>
      <menu id="charsetMenu2"/>
      <menu id="charsetMenu3"/>
      <menu id="charsetMenu4"/>
      <menu id="charsetMenu5"/>
    </menupopup>
    </menu>
 
    <menu id="insertMenu"/>

    <menu id="formatMenu" value="&formatMenu.label;" accesskey="&formatmenu.accesskey;">
      <menupopup id="formatMenuPopup">
        <!-- Property items that are only in web composer -->
        <menuitem id="pageProperties"/>
      </menupopup>
    </menu>

    <menu id="tableMenu"/>

    <!-- tasks menu filled from tasksOverlay -->
    <menu id="tasksMenu" accesskey="t"/>

    <!-- DEBUG only -->
    <menu id="debugMenu" />
    <!-- end DEBUG only -->
  
    <!-- help menu filled from globalOverlay -->
    <menu id="menu_Help" accesskey="h"/>

    <spring flex="100%"/>
  </menubar>

<toolbox id="EditorToolbox">
  <!-- toolbar filled out from editorOverlay -->
  <!-- add  class="standard" for dark blue background (icons need rework first) -->
  <toolbar id="EditToolbar" class="standard" persist="collapsed">
    <titledbutton id="newButton"/>
    <titledbutton id="openButton"/>
    <titledbutton id="saveButton"/>
    <toolbarseparator/>
    <titledbutton id="printButton"/>
    <titledbutton id="findButton"/>
    <titledbutton id="spellingButton"/>
    <toolbarseparator/>
    <titledbutton id="imageButton"/>
    <titledbutton id="hlineButton"/>
    <titledbutton id="tableButton"/>
    <titledbutton id="linkButton"/>
    <titledbutton id="namedAnchorButton"/>
    <spring flex="100%"/>

		<box id="toolbar_throbber_box" align="vertical">
			<titledbutton id="Throbber" onclick="window.open('http://www.mozilla.org/editor');">
				<observes element="Editor:Throbber" attribute="busy"/>
			</titledbutton>
		</box>
  </toolbar>
    
  <toolbar id="FormatToolbar" persist="collapsed">
    <html:div>
      <!-- items are filled out from editorOverlay -->
      <html:select id="ParagraphSelect"/>
      <html:select id="FontFaceSelect"/>
    </html:div>

    <html:div id="ColorButtons"/>
  
    <titledbutton id="DecreaseFontSizeButton"/>
    <titledbutton id="IncreaseFontSizeButton"/>
    <titledbutton id="boldButton"/>
    <titledbutton id="italicButton"/>
    <titledbutton id="underlineButton"/>
    <titledbutton id="ulButton"/>
    <titledbutton id="olButton"/>
    <titledbutton id="outdentButton"/>
    <titledbutton id="indentButton"/>

    <menu>
      <titledbutton id="AlignPopupButton"/>
      <menupopup id="AlignmentPopup"/>
    </menu>
    <spring flex="100%"/>
  </toolbar>
</toolbox>

<!-- sidebar/toolbar/content/status -->
<box id="sidebar-parent" align="horizontal" flex="100%">
  <!-- toolbar/content/status -->

  <box id="sidebar-box" chromeclass="extrachrome"/>
  <splitter id="sidebar-splitter" chromeclass="extrachrome"/>
  
  <box id="appcontent" align="vertical" flex="100%">
    <editor type="content-primary" id="content-frame" src="about:blank" flex="100%"/>

    <box align="horizontal" id="DisplayModeBar">
      <spring class="spacer5"/>
      <box align="vertical">
        <spring style="height: 1px;"/>
        <html:div>&displayMode.label;</html:div>
      </box>
      <spring class="spacer3"/>
      <titledbutton id="EditModeButton"    class="DisplayModeButton" selected="1" value="&editModeButton.label;"    onclick="EditorSetDisplayStyle(0)"/>
      <titledbutton id="BrowserModeButton" class="DisplayModeButton" selected="0" value="&browserModeButton.label;" onclick="EditorSetDisplayStyle(1)"/>
      <html:div class="VerticalSeparator"/>
      <spring flex="100%"/>
<!--
Use this when implemented...
      <html:div>View Mode:</html:div>
      <spring class="spacer3"/>
      <titledbutton id="HTMLModeButton"    class="DisplayModeButton" selected="0" value="HTML Source"  onclick="EditorSetDisplayStyle(1)"/>
      <titledbutton id="TagModeButton"     class="DisplayModeButton" selected="0" value="Tag Tree"     onclick="EditorSetDisplayStyle(1)"/>
      <titledbutton id="PreviewModeButton" class="DisplayModeButton" selected="0" value="Full Preview" onclick="EditorSetDisplayStyle(0)"/>
-->
    </box>

    <!-- status bar, from editorOverlay.xul -->
    <box id="status-bar" />
  </box> <!-- appcontent -->
</box><!-- sidebar-parent -->
<toolbar id="taskbar" chromeclass="extrachrome" />
</window>
