Contents
Index
Search

12. A specific menu

The menu element allows to specify a menu which is specific to a given document type.

Figure 2.2. The "Simple Section" menu
The "Simple Section" menu

Excerpts from rng_section_config/common.incl (same file for all variants):

<menu label="Se_ction">
  <menu label="C_olumn" name="tableColumnMenu">
    <item label="_Insert Before"
          icon="xxe-config:common/icons/insertColumnBefore.png"
          command="sect.tableEdit" parameter="insertColumnBefore"/>
    <item label="I_nsert After"
          icon="xxe-config:common/icons/insertColumnAfter.png"
          command="sect.tableEdit" parameter="insertColumnAfter"/>
  ...
  </menu>
  <separator />
  <item label="_Convert to HTML"
        icon="xxe-config:common/mime_types/html.png"
        command="sect.convertToHTML" />
</menu>

A menu element has item, menu and separator child elements, each menu item invoking a command. A menu element is required to have a label attribute. In the value of the label attribute, character underscore ('_') may be used to specify the mnemonic of a menu or an item.