MenuBarScope



Receiver scope which is used by JMenuBar.setContent and FrameWindowScope.MenuBar.

Summary

Public functions

Unit
@Composable
Menu(
    text: String,
    mnemonic: Char?,
    enabled: Boolean,
    content: @Composable MenuScope.() -> Unit
)

Adds menu to the menu bar

android

Public functions

@Composable
fun Menu(
    text: String,
    mnemonic: Char? = null,
    enabled: Boolean = true,
    content: @Composable MenuScope.() -> Unit
): Unit

Adds menu to the menu bar

Parameters
text: String

text of the menu that will be shown on the menu bar

mnemonic: Char? = null

character that corresponds to some key on the keyboard. When this key and Alt modifier will be pressed - menu will be open. If the character is found within the item's text, the first occurrence of it will be underlined.

enabled: Boolean = true

is this menu item can be chosen

content: @Composable MenuScope.() -> Unit

content of the menu (sub menus, items, separators, etc)