UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

35 lines (34 loc) 1.29 kB
import { BaseClickHelper } from "./BaseClickHelper.js"; import { ClickHelperEventType } from "./ClickHelperEventType.js"; import { ClickState } from "./ClickState.js"; /** * A class that mixes multiple {@link BaseClickHelper} instances into one. * Useful if you want a widget to be both clickable by a pointer and by the * enter key * * @category Helper */ export declare class CompoundClickHelper extends BaseClickHelper { /** The {@link BaseClickHelper} instances being mixed */ protected clickHelpers: BaseClickHelper[]; private _clickState; protected refs: number; constructor(clickHelpers: BaseClickHelper[]); /** * Start listening to all ClickHelpers events. Must be called when a widget * that uses this CompoundClickHelper is attached to the UI tree * (handleAttachment). */ ref(): void; /** * Stop listening to all ClickHelpers events. Must be called when a widget * that uses this CompoundClickHelper is detached from the UI tree * (handleDetachment). */ unref(): void; private updateClickState; protected readonly handleDependentEvent: (eventType: ClickHelperEventType) => void; get clickState(): ClickState; /** Resets each click helper instance being mixed. */ reset(): void; }