lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
30 lines (29 loc) • 1.05 kB
TypeScript
import { BaseClickHelper } from './BaseClickHelper.js';
import { type Widget } from '../widgets/Widget.js';
import { ClickState } from './ClickState.js';
/**
* An aggregate helper class for widgets that can be clicked, in the general
* sense that the widget is/has a button or is clickable. This does not mean
* that the widget is only clickable with a pointer; it could also be "clicked"
* with a keyboard.
*
* Keeps its current click state as well as its last click state, and whether
* the last click state change resulted in an actual click.
*
* @category Helper
*/
export declare class GenericClickHelper extends BaseClickHelper {
private _clickState;
protected widget: Widget;
/**
* @param widget - The Widget aggregating this helper
*/
constructor(widget: Widget);
/**
* Sets {@link GenericClickHelper#clickState} and dispatches events if
* current one differs.
*/
setClickState(clickState: ClickState, inside: boolean): void;
get clickState(): ClickState;
reset(): void;
}