Skip to content

CheckMenuItem

Module @netwiv/api/menu · Kind Class

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

A check menu item inside a {@linkcode Menu } or {@linkcode Submenu } and usually contains a text and a check mark or a similar toggle that corresponds to a checked and unchecked states.

new CheckMenuItem(rid: number, id: string)
new(opts: CheckMenuItemOptions): Promise<CheckMenuItem>

Create a new check 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.

isChecked(): Promise<boolean>

Returns whether this check menu item is checked or not.

isEnabled(): Promise<boolean>

Returns whether this check menu item is enabled or not.

rid: number
setAccelerator(accelerator: string | null): Promise<void>

Sets the accelerator for this check menu item.

setChecked(checked: boolean): Promise<void>

Sets whether this check menu item is checked or not.

setEnabled(enabled: boolean): Promise<void>

Sets whether this check menu item is enabled or not.

setText(text: string): Promise<void>

Sets the text for this check menu item.

text(): Promise<string>

Returns the text of this check 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.