| import { IconMenuItemOptions, PredefinedMenuItemOptions, CheckMenuItemOptions } from '../menu'; |
| import { MenuItem, type MenuItemOptions } from './menuItem'; |
| import { CheckMenuItem } from './checkMenuItem'; |
| import { IconMenuItem } from './iconMenuItem'; |
| import { PredefinedMenuItem } from './predefinedMenuItem'; |
| import { type LogicalPosition, PhysicalPosition, type Window } from '../window'; |
| import { type ItemKind, MenuItemBase } from './base'; |
| import { type MenuOptions } from './menu'; |
| import { MenuIcon } from '../image'; |
| |
| export declare function itemFromKind([rid, id, kind]: [number, string, ItemKind]): Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem; |
| export type SubmenuOptions = (Omit<MenuItemOptions, 'accelerator' | 'action'> & MenuOptions) & { |
| |
| |
| |
| |
| icon?: MenuIcon; |
| }; |
| |
| export declare class Submenu extends MenuItemBase { |
| |
| protected constructor(rid: number, id: string); |
| |
| static new(opts: SubmenuOptions): Promise<Submenu>; |
| |
| text(): Promise<string>; |
| |
| setText(text: string): Promise<void>; |
| |
| isEnabled(): Promise<boolean>; |
| |
| setEnabled(enabled: boolean): Promise<void>; |
| |
| |
| |
| |
| |
| |
| |
| append<T extends Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions>(items: T | T[]): Promise<void>; |
| |
| |
| |
| |
| |
| |
| |
| prepend<T extends Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions>(items: T | T[]): Promise<void>; |
| |
| |
| |
| |
| |
| |
| |
| insert<T extends Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | MenuItemOptions | SubmenuOptions | IconMenuItemOptions | PredefinedMenuItemOptions | CheckMenuItemOptions>(items: T | T[], position: number): Promise<void>; |
| |
| remove(item: Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem): Promise<void>; |
| |
| removeAt(position: number): Promise<Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | null>; |
| |
| items(): Promise<Array<Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem>>; |
| |
| get(id: string): Promise<Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem | null>; |
| |
| |
| |
| |
| |
| popup(at?: PhysicalPosition | LogicalPosition, window?: Window): Promise<void>; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| setAsWindowsMenuForNSApp(): Promise<void>; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| setAsHelpMenuForNSApp(): Promise<void>; |
| |
| setIcon(icon: MenuIcon | null): Promise<void>; |
| } |
|
|