5. menu

  name = NMTOKEN
  label = non empty token
  helpId = NMTOKEN
  insert = non empty token
  replace = non empty token
  replaceEnd = non empty token
  Content: [ insert | action | menu | separator | menuItems ]*

<insert />

  name = NMTOKEN

  name = NMTOKEN

<separator />

  name = NMTOKEN

Specifies a menu. A menu contains references to action, menu and menuItems elements declared elsewhere in the GUI specification.

Unless the referenced menuItems element has a count attribute, the reference to the menuItems element, if any, must be the last reference contained in the menu element.

The insert child element, the insert, replace, replaceEnd attributes may be used to customize to the previous definition of a menu. More information in Customizing a composite part without redefining it from scratch.



Required. Unique name identifying the menu in this GUI specification.


Required unless this declaration is an extension of the previous one (that is, <insert/> is used). Label of the menu.


Online help ID of the menu.

Example, an ordinary menu:

  <menu name="helpMenu" label="_Help" 
    <action name="helpAction" />
    <action name="contextualHelpAction" />
    <separator />
    <action name="showContentModelAction" />
    <separator />
    <action name="listBindingsAction" />
    <action name="listPluginsAction" />
    <separator />
    <action name="aboutAction" />

Example, a menu where all items are dynamic:

  <menu name="configSpecificMenu" label="XML" 
    <menuItems name="configSpecificMenuItems" />

Example, a menu which has two static items followed by dynamic items:

  <menu name="viewMenu" label="_View" 
    <action name="addViewAction" />
    <action name="closeViewAction" />
    <menuItems name="setStyleSheetMenuItems" />