2.3. Custom tool bar
Prev | 2. Customization items | Next

### 2.3. Custom tool bar

This customization adds two buttons to the stock DocBook tool bar. See configuration element toolBar.

          .
      definition of macro-command docb.openInDefaultViewer
          .
          .

      <command name="docb.editDocument">
        <macro trace="false">
          <sequence>
            <get context="$implicitElement/@url" expression="resolve-uri(.)" />
            <command name="XXE.edit" parameter="%_" />
          </sequence>
        </macro>
      </command>

      <toolBar>
        <insert />
        <separator />
         <button toolTip="Open in Default Viewer [F2 o]"
                icon="icons/openInDefaultViewer.gif">
          <command name="docb.openInDefaultViewer" />
        </button>
        <button toolTip="Edit Document [F2 e]"
                icon="icons/editDocument.gif">
          <command name="docb.editDocument" />
        </button>
      </toolBar>

Note the `insert` attribute of the `toolBar` element which is used to insert all the tool bar buttons specified in the stock DocBook configuration before the new Open in Default Viewer button.

Prev | Up | Next
2.2. Custom bindings | Home | 2.4. Custom menu