Just like the MENU tag, the SUBMENU block encapsulates any number of menu items, separators and popup sub-menus. These are defined by the OPTION, SEPARATOR and SUBMENU tags.
In this example a toolbar with a single button is created. When clicked, the Menu() functions displays a popup menu with the id mymenu. The popup menu to be displayed is defined in the menudefinitions block. It includes a single popup menu with two menu items.