6. Adding a Characters menu

tutorial/tutorial6.xxe_gui:

  <action name="insertLeftAction" label="_L - &#x2190;">1
    <command name="insertString" parameter="&#x2190;" />
  </action>
  <action name="insertRightAction" label="_R - &#x2192;">
    <command name="insertString" parameter="&#x2192;" />
  </action>

  <action name="insertAlphaAction" label="_A - &#x03B1;">
    <command name="insertString" parameter="&#x03B1;" />
  </action>
  <action name="insertBetaAction" label="_B - &#x03B2;">
    <command name="insertString" parameter="&#x03B2;" />
  </action>
  <action name="insertGammaAction" label="_C - &#x03B3;">
    <command name="insertString" parameter="&#x03B3;" />
  </action>

  <menu name="arrowsMenu" label="_Arrows">
    <action name="insertLeftAction" />
    <action name="insertRightAction" />
  </menu>

  <menu name="greekMenu" label="_Greek">
    <action name="insertAlphaAction" />
    <action name="insertBetaAction" />
    <action name="insertGammaAction" />
  </menu>

  <menu name="charactersMenu" label="_Characters">2
    <menu name="arrowsMenu" />
    <menu name="greekMenu" />
  </menu>

  <menuBar name="menuBar" insert="after editMenu">3
    <menu name="charactersMenu" />
  </menuBar>

1

Define actions which insert the chosen special characters by wrapping an action around standard command "insertString" (see Section 49, “insertString” in XMLmind XML Editor - Commands).

2

Define the Characters menu and its two submenus: the Arrows menu and the Greek menu.

3

This inserts menu "charactersMenu" after menu "editMenu" in the standard menu bar (menuBar element called "menuBar" found in DesktopApp.xxe_gui). More information about attribute insert in Customizing a composite part without redefining it from scratch.