DropDownButton.d.ts
45 lines
| 1.5 KiB
| video/mp2t
|
TypeScriptLexer
|
|
r2 | import _WidgetBase = require("../_WidgetBase"); | ||
| import _Container = require("../_Container"); | ||||
| import _HasDropDown = require("../_HasDropDown"); | ||||
| import { _WidgetBaseConstructor } from "../_WidgetBase"; | ||||
| import { NodeOrString } from "dojo/interfaces"; | ||||
| import Button = require("./Button"); | ||||
| interface DropDownButton<T extends _WidgetBase> extends Button, _Container, _HasDropDown<T> { | ||||
| baseClass: string; | ||||
| templateString: string; | ||||
| /** | ||||
| * Overrides _TemplatedMixin#_fillContent(). | ||||
| * My inner HTML possibly contains both the button label and/or a drop down widget, like | ||||
| * <DropDownButton> <span>push me</span> <Menu> ... </Menu> </DropDownButton> | ||||
| */ | ||||
| _fillContent(): void; | ||||
| startup(): void; | ||||
| /** | ||||
| * Returns whether or not we are loaded - if our dropdown has an href, | ||||
| * then we want to check that. | ||||
| */ | ||||
| isLoaded(): boolean; | ||||
| /** | ||||
| * Default implementation assumes that drop down already exists, | ||||
| * but hasn't loaded it's data (ex: ContentPane w/href). | ||||
| * App must override if the drop down is lazy-created. | ||||
| */ | ||||
| loadDropDown(callback: () => void): void; | ||||
| /** | ||||
| * Overridden so that focus is handled by the _HasDropDown mixin, not by | ||||
| * the _FormWidget mixin. | ||||
| */ | ||||
| isFocusable(): boolean; | ||||
| } | ||||
| interface DropDownButtonConstructor<T extends _WidgetBase = _WidgetBase> extends _WidgetBaseConstructor<DropDownButton<T>> { | ||||
| new <T extends _WidgetBase>(params: Object, srcNodeRef: NodeOrString): DropDownButton<T>; | ||||
| } | ||||
| declare const DropDownButton: DropDownButtonConstructor; | ||||
| export = DropDownButton; | ||||
