Skip to content

PredefinedMenuItem

Module @netwiv/api/menu · Kind Class

import { PredefinedMenuItem } from '@netwiv/api/menu';

A predefined (native) menu item which has a predefined behavior by the OS or by tauri.

new PredefinedMenuItem(rid: number, id: string)
new(opts?: PredefinedMenuItemOptions | undefined): Promise<PredefinedMenuItem>

Create a new predefined menu item.

close(): Promise<void>

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.

id: string

The id of this item.

rid: number
setText(text: string): Promise<void>

Sets the text for this predefined menu item.

text(): Promise<string>

Returns the text of this predefined menu item.


Descriptions come from the pinned @tauri-apps/api@2.11.1 declarations (MIT OR Apache-2.0); imports are shown with @netwiv/api paths.