UNPKG

@dark-engine/platform-desktop

Version:

Dark renderer to desktop platforms like Windows, Linux, macOS via Nodegui and Qt

36 lines (35 loc) 1.42 kB
import { QWidget, QGridLayout } from '@nodegui/nodegui'; import { type ComponentFactory, type Ref } from '@dark-engine/core'; import type { WidgetProps, WithSlotProps, Container } from '../shared'; export type GridLayoutProps = WithSlotProps< { ref?: Ref<GridLayoutRef>; horizontalSpacing?: number; verticalSpacing?: number; margin?: number | [number, number, number, number]; columnStretch?: Array<ValueVariant>; rowStretch?: Array<ValueVariant>; rowMinimumHeight?: Array<ValueVariant>; columnMinimumWidth?: Array<ValueVariant>; } & WidgetProps >; export type GridLayoutRef = QDarkGridLayout; type ValueVariant = number | undefined; declare const GridLayout: ComponentFactory<GridLayoutProps>; declare class QDarkGridLayout extends QWidget implements Container { private gridLayout; constructor(); detectIsContainer(): boolean; getGridLayout(): QGridLayout; setHorizontalSpacing(value: number): void; setVerticalSpacing(value: number): void; setMargin(value: number | [number, number, number, number]): void; setColumnStretch(value: Array<ValueVariant>): void; setRowStretch(value: Array<ValueVariant>): void; setRowMinimumHeight(value: Array<ValueVariant>): void; setColumnMinimumWidth(value: Array<ValueVariant>): void; appendChild(child: QWidget): void; insertBefore(): void; removeChild(child: QWidget): void; } export { GridLayout, QDarkGridLayout };