Submenu
Defined in: menu/submenu.ts:53
A type that is a submenu inside a Menu or Submenu.
MenuItemBase
get id():
string
Defined in: menu/base.ts:128
The id of this item.
string
MenuItemBase.id
get rid():
number
Defined in: core.ts:309
number
MenuItemBase.rid
append<
T>(items):Promise<void>
Defined in: menu/submenu.ts:99
Add a menu item to the end of this submenu.
T extends CheckMenuItemOptions | MenuItemOptions | CheckMenuItem | SubmenuOptions | PredefinedMenuItemOptions | IconMenuItemOptions | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem
T | T[]
Promise<void>
close():
Promise<void>
Defined in: core.ts:321
Destroys and cleans up this resource from memory. You should not call any method on this object anymore and should drop any reference to it.
Promise<void>
MenuItemBase.close
get(
id):Promise<null|CheckMenuItem|IconMenuItem|PredefinedMenuItem|Submenu|MenuItem>
Defined in: menu/submenu.ts:222
Retrieves the menu item matching the given identifier.
string
Promise<null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem>
insert<
T>(items,position):Promise<void>
Defined in: menu/submenu.ts:157
Add a menu item to the specified position in this submenu.
T extends CheckMenuItemOptions | MenuItemOptions | CheckMenuItem | SubmenuOptions | PredefinedMenuItemOptions | IconMenuItemOptions | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem
T | T[]
number
Promise<void>
isEnabled():
Promise<boolean>
Defined in: menu/submenu.ts:79
Returns whether this submenu is enabled or not.
Promise<boolean>
items():
Promise<(CheckMenuItem|IconMenuItem|PredefinedMenuItem|Submenu|MenuItem)[]>
Defined in: menu/submenu.ts:210
Returns a list of menu items that has been added to this submenu.
Promise<(CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem)[]>
popup(
at?,window?):Promise<void>
Defined in: menu/submenu.ts:244
Popup this submenu as a context menu on the specified window.
If the position, is provided, it is relative to the window’s top-left corner.
LogicalPosition | PhysicalPosition
Promise<void>
prepend<
T>(items):Promise<void>
Defined in: menu/submenu.ts:128
Add a menu item to the beginning of this submenu.
T extends CheckMenuItemOptions | MenuItemOptions | CheckMenuItem | SubmenuOptions | PredefinedMenuItemOptions | IconMenuItemOptions | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem
T | T[]
Promise<void>
remove(
item):Promise<void>
Defined in: menu/submenu.ts:181
Remove a menu item from this submenu.
CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem
Promise<void>
removeAt(
position):Promise<null|CheckMenuItem|IconMenuItem|PredefinedMenuItem|Submenu|MenuItem>
Defined in: menu/submenu.ts:192
Remove a menu item from this submenu at the specified position.
number
Promise<null | CheckMenuItem | IconMenuItem | PredefinedMenuItem | Submenu | MenuItem>
setAsHelpMenuForNSApp():
Promise<void>
Defined in: menu/submenu.ts:284
Set this submenu as the Help menu for the application on macOS.
This will cause macOS to automatically add a search box to the menu.
If no menu is set as the Help menu, macOS will automatically use any menu which has a title matching the localized word “Help”.
- Windows / Linux: Unsupported.
Promise<void>
setAsWindowsMenuForNSApp():
Promise<void>
Defined in: menu/submenu.ts:266
Set this submenu as the Window menu for the application on macOS.
This will cause macOS to automatically add window-switching items and certain other items to the menu.
- Windows / Linux: Unsupported.
Promise<void>
setEnabled(
enabled):Promise<void>
Defined in: menu/submenu.ts:84
Sets whether this submenu is enabled or not.
boolean
Promise<void>
setText(
text):Promise<void>
Defined in: menu/submenu.ts:70
Sets the text for this submenu.
string
Promise<void>
text():
Promise<string>
Defined in: menu/submenu.ts:65
Returns the text of this submenu.
Promise<string>
staticnew(opts):Promise<Submenu>
Defined in: menu/submenu.ts:60
Create a new submenu.
Promise<Submenu>
© 2025 Tauri Contributors. CC-BY / MIT