@dark-engine/platform-desktop
Version:
Dark renderer to desktop platforms like Windows, Linux, macOS via Nodegui and Qt
22 lines (21 loc) • 773 B
TypeScript
import { type QMenuSignals, type QIcon, QWidget, QMenu } from '@nodegui/nodegui';
import { type ComponentFactory, type Ref } from '@dark-engine/core';
import type { WidgetProps, WithSlotProps, Container } from '../shared';
export type MenuProps = WithSlotProps<
{
ref?: Ref<MenuRef>;
title?: string;
icon?: QIcon;
} & WidgetProps
>;
export type MenuRef = QDarkMenu;
export type MenuSignals = QMenuSignals;
declare const Menu: ComponentFactory<MenuProps>;
declare class QDarkMenu extends QMenu implements Container {
detectIsContainer(): boolean;
appendChild(child: QWidget): void;
insertBefore(): void;
removeChild(child: QWidget): void;
}
declare function detectIsMenu(value: unknown): value is QDarkMenu;
export { Menu, QDarkMenu, detectIsMenu };