setApplicationMenu

external fun setApplicationMenu(menu: Menu?)(source)

Sets the menu bar that is shown while the shim is the active app. This is the shim's equivalent of Menu.setApplicationMenu(). Passing null restores the shim's minimal default menu.

The click handlers of the menu's items and the menu's menu-will-show event run in your app's main process. Items with a role act on the shim instead of your app: for example, the quit role quits the shim. The default labels of the about, hide and quit roles use the shim's name.

The shim displays the menu's items as they were when this method was called. Later changes to an item's label, enabled, checked or visible properties are applied when the shim becomes the active app, when one of its menus is opened, and after an item is clicked.