##// END OF EJS Templates
Changed @djclass decorator to support legacy dojo versions (<1.15)
Changed @djclass decorator to support legacy dojo versions (<1.15)

File last commit:

r2:8ec37bf1b4d1 default
r11:5a2c44d8e1f3 v1.0.0-rc5 default
Show More
registry.d.ts
55 lines | 1.4 KiB | video/mp2t | TypeScriptLexer
import _WidgetBase = require("./_WidgetBase");
interface Registry {
/**
* Number of registered widgets
*/
length: number;
/**
* Add a widget to the registry. If a duplicate ID is detected, a error is thrown.
*/
add(widget: _WidgetBase): void;
/**
* Remove a widget from the registry. Does not destroy the widget; simply
* removes the reference.
*/
remove(id: string): void;
/**
* Find a widget by it's id.
* If passed a widget then just returns the widget.
*/
byId(id: string | _WidgetBase): _WidgetBase;
/**
* Returns the widget corresponding to the given DOMNode
*/
byNode(node: Element | Node): _WidgetBase;
/**
* Convert registry into a true Array
*/
toArray(): _WidgetBase[];
/**
* Generates a unique id for a given widgetType
*/
getUniqueId(widgetType: string): string;
/**
* Search subtree under root returning widgets found.
* Doesn't search for nested widgets (ie, widgets inside other widgets).
*/
findWidgets(root: Node, skipNode?: Node): _WidgetBase[];
/**
* Returns the widget whose DOM tree contains the specified DOMNode, or null if
* the node is not contained within the DOM tree of any widget
*/
getEnclosingWidget(node: Element | Node): _WidgetBase;
}
declare const registry: Registry;
export = registry;