The Menu class allows the creation and control of context menus and application-level menus.
Create a new menu. A menu is populated with MenuActions
One or more MenuActions or Menus to be displayed in the menu. Menu arguments will create sub-menus.
Show the menu if it is not already shown. Note that unlike most Views, Menus are not destroyed when they are closed - front can be used to re-generate a single menu again and again.
A Point at which to show the menu. Default to the current mouse cursor position.
The action that should appear at the specified point coordinates. Should be an action contained in the menu.
The title of the menu.
If true, menu is / will be torn off from its parent and become a free-floating menu.
Create an identical copy of the menu. The new menu will not be shown until
.front is called.
Menus broadcast several kinds of events that can be registered for with the standard Object: -addDependant calls. Events broadcast by menu:
\triggered(with the MenuAction that was triggered)
\hovered(with action that was hovered over)
One or more MenuActions can be attached to any View object. The shortcut key combinations for these actions will become available, and the actions will appear in the context menu for that view.
A more complex menu.