UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

27 lines 1.2 kB
/** * The focus type of a {@link TricklingEvent}. Used to categorise events when * focusing {@link Widget | widgets} in {@link Root | roots}. * * @category Event */ export var FocusType; (function (FocusType) { /** Used for widgets that need pointer input, such as {@link Button} */ FocusType[FocusType["Pointer"] = 0] = "Pointer"; /** Used for widgets that need text input, such as {@link TextInput} */ FocusType[FocusType["Keyboard"] = 1] = "Keyboard"; /** * Similar to keyboard focus, but used for checking whether a widget has * been tabbed into (focused by pressing the tab key). * * If a widget gains a tab focus, then it also gain a keyboard focus. If a * widgets gains a keyboard focus, then it also gains a tab focus. However, * losing the tab focus doesn't automatically lose the keyboard focus, and * losing the keyboard focus doesn't automatically lose the tab focus. * * This focus should only be used internally. Do not manually request tab * focus unless you know what you are doing. */ FocusType[FocusType["Tab"] = 2] = "Tab"; })(FocusType || (FocusType = {})); //# sourceMappingURL=FocusType.js.map