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.
Constructor
Section titled “Constructor”new CheckMenuItem(rid: number, id: string)Static members
Section titled “Static members”new(opts: CheckMenuItemOptions): Promise<CheckMenuItem>Create a new check menu item.
Instance members
Section titled “Instance members”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: stringThe id of this item.
isChecked
Section titled “isChecked”isChecked(): Promise<boolean>Returns whether this check menu item is checked or not.
isEnabled
Section titled “isEnabled”isEnabled(): Promise<boolean>Returns whether this check menu item is enabled or not.
rid: numbersetAccelerator
Section titled “setAccelerator”setAccelerator(accelerator: string | null): Promise<void>Sets the accelerator for this check menu item.
setChecked
Section titled “setChecked”setChecked(checked: boolean): Promise<void>Sets whether this check menu item is checked or not.
setEnabled
Section titled “setEnabled”setEnabled(enabled: boolean): Promise<void>Sets whether this check menu item is enabled or not.
setText
Section titled “setText”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.