Login Register Help
API Documentation
Choose a stylesheet:

Constructordijit.Menu

 

Usage

var foo=new dijit.Menu();

Jump to PropertiesFunctionsBack to top

FunctionaddChild(widget: Widget, insertIndex: Integer?)
Add a child to our _Container
Functionattr(name: String|Object, value: Object?)
Defined by dijit._Widget
Set or get properties on a widget instance.
Attach menu to given node
Construct the UI for this widget from a template, setting this.domNode.
Functionconnect(obj: Object|null, event: String|Function, method: String|Function)
Defined by dijit._Widget
Connects specified obj/event to specified method of this object and registers for disconnect() on widget destroy.
FunctionconnectKeyNavHandlers(prevKeyCodes: dojo.keys[], nextKeyCodes: dojo.keys[])
Call in postCreate() to attach the keyboard handlers to the container. preKeyCodes: dojo.keys[] Key codes for navigating to the previous child.
Functioncreate(params: Object?, srcNodeRef: DomNode|String?)
Defined by dijit._Widget
Kick off the life-cycle of a widget
Functiondestroy(preserveDom: Boolean)
Defined by dijit._Widget
Destroy this widget, but not its descendants. Will, however, destroy internal widgets such as those used within a template.
Destroys all the widgets inside this.containerNode, but not this widget itself
FunctiondestroyRecursive(preserveDom: Boolean?)
Defined by dijit._Widget
Destroy this widget and it's descendants. This is the generic "destructor" function that all widget users should call to cleanly discard with a widget. Once a widget is destroyed, it's removed from the manager object.
FunctiondestroyRendering(preserveDom: Boolean?)
Defined by dijit._Widget
Destroys the DOM nodes associated with this widget
Functiondisconnect(handles: Object)
Defined by dijit._Widget
Disconnects handle created by this.connect. Also removes handle from this widget's list of connects
Default focus() implementation: focus the first child.
FunctionfocusChild(widget: Widget, node: Node?)
Focus widget. Optionally focus 'node' within widget.
Focus the first focusable child in the container.
Focus the next widget or focal node (for widgets with multiple focal nodes) within this container.
Focus the previous widget or focal node (for widgets with multiple focal nodes) within this container.
FunctiongetChildren(): Widget[]
Returns array of children widgets.
Defined by dijit._Widget
Returns all the widgets that contained by this, i.e., all widgets underneath this.containerNode. This method should generally be avoided as it returns widgets declared in templates, which are supposed to be internal/hidden, but it's left here for back-compat reasons.
FunctiongetIndexOfChild(child: Widget): Integer
Defined by dijit._Container
Gets the index of the child in this container or -1 if not found
FunctiongetPlaceholders(label: String?): dojox.widget.PlaceholderMenuItem[]
returns an array of placeholders with the given label. There can be multiples.
Defined by dijit._Container
Returns true if widget has children, i.e. if this.containerNode contains something.
Defined by dijit._Widget
Return true if this widget can currently be focused and false if not
Defined by dijit._Widget
Checks the page for text direction
Defined by dijit._Widget
Called when the widget stops being "active" because focus moved to something outside of it, or the user clicked somewhere outside of it, or the widget was hidden.
FunctiononCancel(closeAll: Boolean)
Defined by dijit._MenuBase
Attach point for notification about when the user cancels the current menu This is an internal mechanism used for Menus to signal to their parent to close them. In general developers should not attach to or override this method.
FunctiononClick(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of mouse click events.
Callback when this menu is closed. This is called by the popup manager as notification that the menu was closed.
FunctiononDblClick(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of mouse double click events.
Defined by dijit._MenuBase
Attach point for notification about when a menu item has been executed. This is an internal mechanism used for Menus to signal to their parent to close them, because they are about to execute the onClick handler. In general developers should not attach to or override this method.
Defined by dijit._Widget
Called when the widget becomes "active" because it or a widget inside of it either has focus, or has recently been clicked.
FunctiononItemClick(item: Widget, evt: Event)
Defined by dijit._MenuBase
Handle clicks on an item.
FunctiononItemHover(item: MenuItem)
Defined by dijit._MenuBase
Called when cursor is over a MenuItem.
FunctiononItemUnhover(item: MenuItem)
Defined by dijit._MenuBase
Callback fires when mouse exits a MenuItem
FunctiononKeyDown(event: key)
Defined by dijit._Widget
Connect to this function to receive notifications of keys being pressed down.
FunctiononKeyPress(event: key)
Defined by dijit._Widget
Connect to this function to receive notifications of printable keys being typed.
FunctiononKeyUp(event: key)
Defined by dijit._Widget
Connect to this function to receive notifications of keys being released.
FunctiononMouseDown(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse button is pressed down.
FunctiononMouseEnter(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse moves onto this widget.
FunctiononMouseLeave(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse moves off of this widget.
FunctiononMouseMove(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
FunctiononMouseOut(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
FunctiononMouseOver(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
FunctiononMouseUp(event: mouse)
Defined by dijit._Widget
Connect to this function to receive notifications of when the mouse button is released.
FunctiononOpen(e: Event)
Defined by dijit._MenuBase
Callback when this menu is opened. This is called by the popup manager as notification that the menu was opened.
FunctionplaceAt(reference: String|DomNode|_Widget, position: String|Integer?)
Defined by dijit._Widget
Place this widget's domNode reference somewhere in the DOM based on standard dojo.place conventions, or passing a Widget reference that contains and addChild member.
Overrides dijit._Widget
Called after a widget's dom has been setup
Defined by dijit._Widget
Called after the parameters to the widget have been read-in, but before the widget template is instantiated. Especially useful to set properties that are referenced in the widget template.
FunctionremoveChild(widget: Widget)
Defined by dijit._Container
Removes the passed widget instance from this widget but does not destroy it. You can also pass in an integer indicating the index within the container to remove
FunctionsetAttribute(attr: String, value: anything)
Defined by dijit._Widget
Deprecated. Use attr() instead.
Called after a widget's children, and other widgets on the page, have been created. Provides an opportunity to manipulate any children before they are displayed. This is useful for composite widgets that need to control or layout sub-widgets. Many layout widgets can use this as a wiring phase.
Call in startup() to set child tabindexes to -1
Defined by dijit._Widget
Returns a string that represents the widget. When a widget is cast to a string, this method will be used to generate the output. Currently, it does not implement any sort of reversable serialization.
Detach menu from given node
Overrides dijit._Widget
Stub function. Override to implement custom widget tear-down behavior.
Defined by dijit._Widget
Step during widget creation to copy all widget attributes to the DOM as per attributeMap and _setXXXAttr functions.
Function_attachTemplateNodes(rootNode: DomNode|Array[Widgets], getAttrFunc: Function?)
Defined by dijit._Templated
Iterate through the template and attach functions and nodes accordingly.
Function_attrToDom(attr: String, value: String)
Defined by dijit._Widget
Reflect a widget attribute (title, tabIndex, duration etc.) to the widget DOM, as specified in attributeMap.
Function_connectNode(node: Element)
Monitor focus and blur events on the node
Code to handle popping up editor using F10 key rather than mouse
Helper to remember when we opened the context menu with the mouse instead of with the keyboard
Defined by dijit._Templated
Relocate source contents to templated container node. this.containerNode must be able to receive children, or exceptions will be thrown.
Defined by dijit._Container
Find the first (non-text, non-comment etc) node
Defined by dijit._Widget
Helper function for Widget.attr(). Caches attribute name values so we don't do the string ops every time.
Returns first child that can be focused
Function_getNextFocusableChild(child: Widget, dir: Integer)
Returns the next or previous focusable child, compared to "child"
Function_getSiblingOfChild(child: Widget, dir: Integer)
Defined by dijit._Container
Get the next or previous widget sibling of child
Defined by dijit._MenuBase
Returns the top menu in this chain of Menus
Function_iframeContentDocument(iframe_el: HTMLIFrameElement): HTMLDocument
Returns a reference to the document object inside iframe_el
Function_iframeContentWindow(iframe_el: HTMLIFrameElement): Window
Returns the window reference of the passed iframe
Function_moveToPopup(evt: Event)
Defined by dijit._MenuBase
This handles the right arrow key (left arrow key on RTL systems), which will either open a submenu, or move to the next item in the ancestor MenuBar
Defined by dijit._Container
Find the next (non-text, non-comment etc) node
Function_onBlur(evt)
Called when focus is moved away from this Menu and it's submenus.
Called when a child MenuItem becomes inactive because focus has been removed from the MenuItem *and* it's descendant menus.
Defined by dijit._Widget
Called when someone connects to one of my handlers. "Turn on" that handler if it isn't active yet. This is also called for every single initialization parameter so need to do nothing for parameters like "id".
Handler for when the container gets focus
When a key is pressed, if it's an arrow key etc. then it's handled here.
Defined by dijit._MenuBase
Called when submenu is clicked. Close hierarchy of menus.
Called when this Menu gets focus from: 1) clicking it 2) tabbing into it 3) being opened by a parent menu. This is not called just from mouse hover.
Function_onKeyPress(evt: Event)
Handle keyboard based menu navigation.
Handler for onblur event on a child node
Handler for onfocus event on a child node
Function_openMyself(e: Event)
Internal function for opening myself when the user does a right-click or something similar
Defined by dijit._MenuBase
Open the popup to the side of/underneath the current menu item
Defined by dijit._Widget
Custom setter for the CSS "class" attribute
Defined by dijit._Widget
Sets the style attribut of the widget according to value, which is either a hash like {height: "5px", width: "3px"} or a plain string
Function_startupChild(widget: Widget)
Set tabindex="-1" on focusable widgets so that we can focus them programmatically and by clicking. Connect focus and blur handlers.
Defined by dijit._MenuBase
Cancels the popup timer because the user has stop hovering on the MenuItem, etc.
Defined by dijit._Templated
Does substitution of ${foo} type properties in template string

Jump to FunctionsPropertiesBack to top

Defined by dijit._Widget
HTML class attribute
Defined by dijit._Widget
True if user can close (destroy) this child, such as (for example) clicking the X on the tab. true if user can close this tab pane
Defined by dijit._Widget
Column of the grid to place the widget.
Designates where children of the source dom node will be placed. "Children" in this case refers to both dom nodes and widgets. For example, for myWidget: <div dojoType=myWidget> <b> here's a plain dom node <span dojoType=subWidget>and a widget</span> <i> and another plain dom node </i> </div> containerNode would point to: <b> here's a plain dom node <span dojoType=subWidget>and a widget</span> <i> and another plain dom node </i> In templated widgets, "containerNode" is set via a dojoAttachPoint assignment. containerNode must be defined for any widget that accepts innerHTML (like ContentPane or BorderContainer or even Button), and conversely is null for widgets that don't, like TextBox.
If true, right clicking anywhere on the window will cause this context menu to open. If false, must specify targetNodeIds.
Defined by dijit._Widget
Unsupported by Dijit, but here for completeness. Dijit only supports setting text direction on the entire document. Bi-directional support, as defined by the [HTML DIR](http://www.w3.org/TR/html401/struct/dirlang.html#adef-dir) attribute. Either left-to-right "ltr" or right-to-left "rtl".
This is our visible representation of the widget! Other DOM Nodes may by assigned to other properties, usually through the template system's dojoAttachPoint syntax, but the domNode property is the canonical "top level" node in widget UI.
Defined by dijit._Widget
To remove the drag capability.
The currently focused child widget, or null if there isn't one
Defined by dijit._Widget
Defines a group belonging.
Defined by dijit._Widget
A unique, opaque ID string that can be assigned by users or by the system. If the developer passes an ID which is known not to be unique, the specified ID is ignored and the system-generated ID is used instead.
Defined by dijit._Container
Just a flag indicating that this widget descends from dijit._Container
Defined by dijit._Widget
Rarely used. Overrides the default Dojo locale used to render this widget, as defined by the [HTML LANG](http://www.w3.org/TR/html401/struct/dirlang.html#adef-lang) attribute. Value must be among the list of locales specified during by the Dojo bootstrap, formatted according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt) (like en-us).
Defined by dijit._Widget
"none", "left", "right", "bottom", "top", and "client". See the LayoutContainer description for details on this parameter.
If true, menu will open on left click instead of right click, similiar to a file menu.
Defined by dijit._Widget
Specifies a minimum size for this widget when resized by a splitter
Defined by dijit._Widget
List of nodes that correctly handle click events via native browser support, and don't need dijit's help
Defined by dijit._MenuBase
pointer to menu that displayed me
Defined by dijit._MenuBase
number of milliseconds before hovering (without clicking) causes the popup to automatically open.
Defined by dijit._Widget
"top", "bottom", "leading", "trailing", "left", "right", "center". See the BorderContainer description for details on this parameter.
Defined by dijit._Widget
Is this child currently selected?
Defined by dijit._Widget
Minimum size (width or height) of a child of a SplitContainer. The value is relative to other children's sizeShare properties.
Defined by dijit._Widget
Size (width or height) of a child of a SplitContainer. The value is relative to other children's sizeShare properties. For example, if there are two children and each has sizeShare=10, then each takes up 50% of the available space.
Defined by dijit._Widget
A parameter needed by RadioGroupSlide only. An optional paramter to force the ContentPane to slide in from a set direction. Defaults to "random", or specify one of "top", "left", "right", "bottom" to slideFrom top, left, right, or bottom.
Defined by dijit._Widget
If true, puts a draggable splitter on this widget to resize when used inside a border container edge region.
Defined by dijit._Widget
pointer to original dom node
Defined by dijit._Widget
HTML style attributes as cssText string or name/value hash
Tab index of the container; same as HTML tabindex attribute. Note then when user tabs into the container, focus is immediately moved to the first item in the container.
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.
Overrides dijit._Templated
Path to template (HTML file) for this widget relative to dojo.baseUrl
Defined by dijit._Templated
A string that represents the widget template. Pre-empts the templatePath. In builds that have their strings "interned", the templatePath is converted to an inline templateString, thereby preventing a synchronous network call.
Defined by dijit._Widget
Title of this widget. Used by TabContainer to the name the tab, etc. TODO: remove this, it's in _Widget already.
Defined by dijit._Widget
a css size value (e.g. "100px")
Defined by dijit._Templated
Should we parse the template to find widgets that might be declared in markup inside it? False by default.
Defined by dijit._Widget
Used by <img> nodes in templates that really get there image via CSS background-image
Used to record mouse and keyboard events to determine if a context menu is being opened with the keyboard or the mouse.