Only private and/or inherited functions are available.
Set or get properties on a widget instance.
Construct the UI for this widget from a template, setting this.domNode.
Connects specified obj/event to specified method of this object
and registers for disconnect() on widget destroy.
Kick off the life-cycle of a widget
Destroy this widget, but not its descendants.
Will, however, destroy internal widgets such as those used within a template.
Recursively destroy the children of this widget and their
descendants.
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.
Destroys the DOM nodes associated with this widget
Disconnects handle created by this.connect.
Also removes handle from this widget's list of connects
Returns all the widgets that contained by this, i.e., all widgets underneath this.containerNode.
Returns the index of this widget within its container parent.
It returns -1 if the parent does not exist, or if the parent
is not a dijit._Container
Returns null if this is the last child of the parent,
otherwise returns the next element sibling to the "right".
Returns the parent widget of this widget, assuming the parent
implements dijit._Container
Returns null if this is the first child of the parent,
otherwise returns the next element sibling to the "left".
Return true if this widget can currently be focused
and false if not
Checks the page for text direction
stub function. Override or connect to this method to receive
notifications for when the widget moves out of focus.
User defined function to handle clicks
Callback if someone tries to close the child, child will be closed if func returns true
Connect to this function to receive notifications of mouse double click events.
stub function. Override or connect to this method to receive
notifications for when the widget moves into focus.
Connect to this function to receive notifications of keys being pressed down.
Connect to this function to receive notifications of printable keys being typed.
Connect to this function to receive notifications of keys being released.
Connect to this function to receive notifications of when the mouse button is pressed down.
Connect to this function to receive notifications of when the mouse moves onto this widget.
Connect to this function to receive notifications of when the mouse moves off of this widget.
Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget.
Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget.
Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget.
Connect to this function to receive notifications of when the mouse button is released.
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.
Called after a widget's dom has been setup
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.
kicks off widget instantiation, see create() for details.
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.
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.
stub function. Override to implement custom widget tear-down
behavior.
Step during widget creation to copy all widget attributes to the
DOM as per attributeMap and _setXXXAttr functions.
Iterate through the template and attach functions and nodes accordingly.
Reflect a widget attribute (title, tabIndex, duration etc.) to
the widget DOM, as specified in attributeMap.
relocate source contents to templated container node
this.containerNode must be able to receive children, or exceptions will be thrown
helper function for Widget.attr()
cache attribute name values so we don't do the string ops every time
Called when someone connects to one of my handlers.
"Turn on" that handler if it isn't active yet.
callback when mouse is moved onto menu item
callback when mouse is moved off of menu item
Hook for attr('disabled', ...) to work.
Enable or disable this menu item.
Only private and/or inherited properties are available.
attributeMap sets up a "binding" between attributes (aka properties)
of the widget and the widget's DOM.
Changes to widget attributes listed in attributeMap will be
reflected into the DOM.
For example, calling attr('title', 'hello')
on a TitlePane will automatically cause the TitlePane's DOM to update
with the new title.
attributeMap is a hash where the key is an attribute of the widget,
and the value reflects a binding to a:
- DOM node attribute
focus: {node: "focusNode", type: "attribute"}
Maps this.focus to this.focusNode.focus
- DOM node innerHTML
title: { node: "titleNode", type: "innerHTML" }
Maps this.title to this.titleNode.innerHTML
- DOM node CSS class
myClass: { node: "domNode", type: "class" }
Maps this.myClass to this.domNode.className
If the value is an array, then each element in the array matches one of the
formats of the above list.
There are also some shorthands for backwards compatibility:
- string --> { node: string, type: "attribute" }, for example:
"focusNode" ---> { node: "focusNode", type: "attribute" }
- "" --> { node: "domNode", type: "attribute" }
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.
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".
if true, the menu item is disabled
if false, the menu item is enabled
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.
class to apply to div in button to make it display an icon
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.
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).
pointer to original dom node
a node that represents the widget template. Pre-empts both templateString and templatePath.
Path to template (HTML file) for this widget relative to dojo.baseUrl
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.
should we parse the template to find widgets that might be
declared in markup inside it? false by default.
attributeMap addendum for event handlers that should be connected only on first use