lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
22 lines • 942 B
JavaScript
export var TextInputHandlerEventType;
(function (TextInputHandlerEventType) {
TextInputHandlerEventType[TextInputHandlerEventType["Dismiss"] = 0] = "Dismiss";
TextInputHandlerEventType[TextInputHandlerEventType["Input"] = 1] = "Input";
TextInputHandlerEventType[TextInputHandlerEventType["MoveCursor"] = 2] = "MoveCursor";
})(TextInputHandlerEventType || (TextInputHandlerEventType = {}));
export class TextInputHandler {
/**
* Create a new text input handler. Note that the signature of this
* constructor in base classes must have a single `listener` argument. Must
* not change the current focus.
*/
constructor(listener, domElems) {
this.listener = listener;
this.domElems = domElems;
}
/** Dismiss input handler. Must call super if overridden. */
dismiss() {
this.listener(TextInputHandlerEventType.Dismiss);
}
}
//# sourceMappingURL=TextInputHandler.js.map