##// END OF EJS Templates
Added tag v1.0.0-rc2 for changeset fc9f82c082ef
Added tag v1.0.0-rc2 for changeset fc9f82c082ef

File last commit:

r2:8ec37bf1b4d1 default
r5:e5727b40aba0 default
Show More
registry.d.ts
55 lines | 1.4 KiB | video/mp2t | TypeScriptLexer
cin
created typings for basic part of dojo and dijit further work is required to...
r2 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;