5. Adding a document type specific tool bar


  <ribbon name="ribbon" replace="configSpecificRibbonItems" />1
  <toolBarItems name="configSpecificToolBarItems">2

  <toolBar name="configSpecificToolBar">3
    <toolBarItems name="configSpecificToolBarItems" />4

  <layout label="Document Editor" icon="docedit.png">
      <ribbon name="ribbon" />
      <toolBar name="configSpecificToolBar" />
      <group name="nodePathToolBar">
        <tool name="nodePathTool" stretch="1" />
        <toolBar name="selectToolBar" />

    <insert />6


This removes the configuration specific buttons (element ribbonItems called "configSpecificRibbonItems" found in DesktopApp.xxe_gui) from the main tool bar (element ribbon called "ribbon" found in DesktopApp.xxe_gui).

Attribute replace in an empty element means replace by nothing, which itself means remove. It's also possible to remove or replace a range of items using attributes replace and replaceEnd. More information about attributes replace and replaceEnd in Customizing a composite part without redefining it from scratch.


Declare a part allowing to add the configuration specific buttons to a tool bar by the means of a toolBarItems element called "configSpecificToolBarItems". This part is not declared in DesktopApp.xxe_gui[3], so we need to declare it here.


Declare a new tool bar called "configSpecificToolBar" by using a toolBar element.


This new toolBar is to contain just the set of configuration specific buttons.


Replace the stock topToolBars child in the layout element by a custom one. This child element can contain one or more horizontal ribbons or toolBars.


Without the use of insert, the above layout would have been understood as a redefinition from scratch of the standard layout of the XML editor. Such XML editor would contain just a few tool bars.

[3] This is a copy of toolBarItems element called "configSpecificToolBarItems" found in SingleDocApp.xxe_gui.