Companion

external object Companion(source)

Functions

Link copied to clipboard
external fun buildFromTemplate(template: ReadonlyArray<Any>): Menu

Generally, the template is an array of options for constructing a MenuItem. The usage can be referenced above.

Link copied to clipboard
external fun getApplicationMenu(): Menu?

The application menu, if set, or null, if not set.

Link copied to clipboard
external fun sendActionToFirstResponder(action: String)

Sends the action to the first responder of application. This is used for emulating default macOS menu behaviors. Usually you would use the role property of a MenuItem.

Link copied to clipboard
external fun setApplicationMenu(menu: Menu?)

Sets menu as the application menu on macOS. On Windows and Linux, the menu will be set as each window's top menu.