##// END OF EJS Templates
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods
Added 'Attrs', 'Events' type parameters to DjxWidgetBase, typed 'on' and 'emit' methods

File last commit:

r2:8ec37bf1b4d1 default
r30:a46488b209e8 v1.0.0-rc14 default
Show More
Menu.d.ts
53 lines | 1.5 KiB | video/mp2t | TypeScriptLexer
import DropDownMenu = require("./DropDownMenu");
import { _WidgetBaseConstructor } from "./_WidgetBase";
/**
* A context menu you can assign to multiple elements
*/
interface Menu extends DropDownMenu {
/**
* Array of dom node ids of nodes to attach to.
* Fill this with nodeIds upon widget creation and it becomes context menu for those nodes.
*/
targetNodeIds: string[];
/**
* CSS expression to apply this Menu to descendants of targetNodeIds, rather than to
* the nodes specified by targetNodeIds themselves. Useful for applying a Menu to
* a range of rows in a table, tree, etc.
*
* The application must require() an appropriate level of dojo/query to handle the selector.
*/
selector: string;
/**
* If true, right clicking anywhere on the window will cause this context menu to open.
* If false, must specify targetNodeIds.
*/
contextMenuForWindow: boolean;
/**
* If true, menu will open on left click instead of right click, similar to a file menu.
*/
leftClickToOpen: boolean;
/**
* When this menu closes, re-focus the element which had focus before it was opened.
*/
refocus: boolean;
/**
* Attach menu to given node
*/
bindDomNode(node: string | Node): void;
/**
* Detach menu from given node
*/
unBindDomNode(nodeName: string | Node): void;
}
interface MenuConstructor extends _WidgetBaseConstructor<Menu> { }
declare const Menu: MenuConstructor;
export = Menu;