UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

22 lines (21 loc) 983 B
import { Widget } from './Widget.js'; import { SingleParent } from './SingleParent.js'; import { WidgetEvent } from '../events/WidgetEvent.js'; import type { Rect } from '../helpers/Rect.js'; /** * A {@link SingleParent} which contains a single child and automatically paints * the child, adds padding, propagates events (if enabled) and handles layout. * * Can be constrained to a specific type of children. * * @category Widget */ export declare abstract class BaseContainer<W extends Widget = Widget> extends SingleParent<W> { protected onThemeUpdated(property?: string | null): void; protected handleEvent(event: WidgetEvent): Widget | null; protected handlePreLayoutUpdate(): void; protected handlePostLayoutUpdate(): void; protected handleResolveDimensions(minWidth: number, maxWidth: number, minHeight: number, maxHeight: number): void; resolvePosition(x: number, y: number): void; protected handlePainting(dirtyRects: Array<Rect>): void; }