4. layout

  label = non empty token
  icon = anyURI
  width = positive int
  height = positive int
  Content (in any order): [ insert ]?
                          [ menuBar ]? 
                          [ topToolBars ]? [ bottomToolBars ]? 
                          [ leftToolBars ]? [ rightToolBars ]?
                          [ leftPanes ]? [ rightPanes ]? 
                          [ preferencesSheets ]?
                          [ hidden ]?

Specifies the layout of visible parts: actions, tools, panes, toolBars, statusBars. Also specifies which hidden parts (given the visible parts which have been chosen) are needed to get a functioning XML Editor.


A GUI specification file may contain declarations for dozens of parts, but only the parts which are referenced directly or indirectly[5] by the layout element are created and activated during the startup of the XML editor.

Declaring a large number of parts in a GUI specification file, even if most of these parts are not actually used by the GUI specified by layout, makes it quick and easy to built alternate GUIs. Simply include the file containing all these predeclared parts and define a custom layout making use of some of them.

Example (this is the default layout):

<layout width="900" height="700">
  <menuBar name="menuBar" />

    <toolBar name="toolBar" />
    <group name="nodePathToolBar">
      <tool name="nodePathTool" stretch="1" />
      <toolBar name="selectToolBar" />

    <statusBar name="statusBar" />

  <rightPanes width="0.33" topHeight="0.33">
    <pane name="editPane" selected="true" />
    <pane name="editAttributePane" position="bottom" selected="true" />
    <pane name="textSearchReplacePane" position="bottom" />
    <pane name="checkSpellingPane" position="bottom" />
    <pane name="insertCharacterPane" position="bottom" />
    <pane name="checkValidityPane" position="bottom" />

  <preferencesSheets name="preferencesSheets" />

    <command name="XXE.new" />
    <command name="XXE.open" />
    <command name="XXE.save" />
    <command name="XXE.saveAs" />
    <command name="XXE.saveAll" />
    <command name="XXE.editInclusion" />
    <command name="XXE.close" />

    <!-- These are required to be able to use editPane -->
    <command name="replace" />
    <command name="insert" />
    <command name="convert" />
    <command name="wrap" />

    <part name="editOptionsPart" />
    <part name="viewOptionsPart" />
    <part name="spellOptionsPart" />
    <part name="helperApplicationsOptionsPart" />

    <part name="autoSavePart" />

    <!-- Required by setStyleSheetMenuItems -->
    <action name="setStyleSheetAction" />
    <!-- Required by installAddonsAction -->
    <action name="upgradeAddonsAction" />

[5] Example: layout references a statusBar which references an action.