<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 ]? </layout>
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="850" height="650"> <menuBar name="menuBar" /> <topToolBars> <toolBar name="toolBar" /> <group> <toolBar name="documentReferenceToolBar" /> <tool name="nodePathTool" stretch="1" /> <toolBar name="selectToolBar" /> </group> </topToolBars> <bottomToolBars> <statusBar name="statusBar" /> </bottomToolBars> <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" /> </rightPanes> <preferencesSheets name="preferencesSheets" /> <hidden> <!-- 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="spellOptionsPart" /> <part name="spreadsheetOptionsPart" /> <part name="webDAVOptionsPart" /> <part name="autoSavePart" /> <!-- Required by setStyleSheetMenuItems --> <action name="setStyleSheetAction" /> </hidden> </layout>