From df419f5533751b62f93059b29773a46400225b56 Mon Sep 17 00:00:00 2001 From: Mike Van Sickle Date: Fri, 12 Dec 2014 16:01:24 -0500 Subject: [PATCH] - minor corrections --- dojo/dijit.d.ts | 131281 ++++++++++++++++++++++++++++++++++++--------- dojo/dojo.d.ts | 1 + 2 files changed, 104942 insertions(+), 26340 deletions(-) diff --git a/dojo/dijit.d.ts b/dojo/dijit.d.ts index 1a9991e122..f769cd44ff 100644 --- a/dojo/dijit.d.ts +++ b/dojo/dijit.d.ts @@ -1,3121 +1,1788 @@ -declare function define(dependencies: String[], factory: Function): any; -declare function require(config?:Object, dependencies?: String[], callback?: Function): any; +// Type definitions for Dojo v1.9 +// Project: http://dojotoolkit.org +// Definitions by: Michael Van Sickle +// Definitions: https://github.com/borisyankov/DefinitelyTyped -declare module dojox.dtl { - interface __StringArgs { } - interface __ObjectArgs { } -} +/// -declare module dojo { +declare module dijit { /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_BidiSupport.html * - * Send a request using the default transport for the current platform. + * Deprecated module for enabling textdir support in the dijit widgets. New code should just define + * has("dojo-bidi") to return true, rather than manually requiring this module. * - * @param url The URL to request. - * @param options OptionalOptions for the request. */ - interface request { (url: String, options?: dojo.request.__Options): void } - interface request { + interface _BidiSupport{(): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/BackgroundIframe.html + * + * For IE/FF z-index shenanigans. id attribute is required. + * new dijit.BackgroundIframe(node). + * + * Makes a background iframe as a child of node, that fills + * area (and position) of node + * + * @param node + */ + interface BackgroundIframe{(node: HTMLElement): void} + module BackgroundIframe { /** - * Send an HTTP DELETE request using the default transport for the current platform. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - del(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP GET request using the default transport for the current platform. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP POST request using the default transport for the current platform. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - post(url: String, options?: dojo.request.__BaseOptions): any; - /** - * Send an HTTP POST request using the default transport for the current platform. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - put(url: String, options?: dojo.request.__BaseOptions): dojo.request.__Promise; - } - - module request { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/handlers.html - * - * - * @param response - */ - interface handlers { (response: any): void } - interface handlers { - /** - * - * @param name - * @param handler - */ - register(name: any, handler: any): void; - } - - module handlers { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.html - * - * Sends a request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - interface iframe { (url: String, options?: dojo.request.iframe.__Options): void } - interface iframe { - /** - * - * @param name - * @param onloadstr - * @param uri - */ - create(name: any, onloadstr: any, uri: any): any; - /** - * - * @param iframeNode - */ - doc(iframeNode: any): any; - /** - * Send an HTTP GET request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP POST request using an iframe element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - post(url: String, options: dojo.request.iframe.__BaseOptions): dojo.request.__Promise; - /** - * - * @param _iframe - * @param src - * @param replace - */ - setSrc(_iframe: any, src: any, replace: any): void; - } - - module iframe { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__MethodOptions.html - * - * - */ - class __MethodOptions { - constructor(); - /** - * The HTTP method to use to make the request. Must be - * uppercase. Only "GET" and "POST" are accepted. - * Default is "POST". - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. When making a GET request, this will - * be converted to key=value parameters and appended to the - * URL. - * - */ - "data": string; - /** - * A form node to use to submit data to the server. - * - */ - "form": HTMLElement; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/iframe.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * Data to transfer. When making a GET request, this will - * be converted to key=value parameters and appended to the - * URL. - * - */ - "data": string; - /** - * A form node to use to submit data to the server. - * - */ - "form": HTMLElement; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * The HTTP method to use to make the request. Must be - * uppercase. Only "GET" and "POST" are accepted. - * Default is "POST". - * - */ - "method": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/notify.html - * - * Register a listener to be notified when an event - * in dojo/request happens. - * - * @param type OptionalThe event to listen for. Events emitted: "start", "send","load", "error", "done", "stop". - * @param listener OptionalA callback to be run when an event happens. - */ - interface notify { (type?: String, listener?: Function): void } - interface notify { - /** - * - * @param type - * @param event - * @param cancel - */ - emit(type: any, event: any, cancel: any): void; - } - - module notify { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/registry.html - * - * - * @param url - * @param options - */ - interface registry { (url: any, options: any): void } - interface registry { - /** - * - * @param id - * @param parentRequire - * @param loaded - * @param config - */ - load(id: any, parentRequire: any, loaded: any, config: any): void; - /** - * - * @param url - * @param provider - * @param first - */ - register(url: any, provider: any, first: any): void; - } - - module registry { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.html - * - * Sends a request using the included http or https interface from node.js - * with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - interface node { (url: String, options?: dojo.request.node.__Options): void } - interface node { - /** - * Send an HTTP DELETE request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - del(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP GET request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP POST request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - post(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - put(url: String, options: dojo.request.node.__BaseOptions): dojo.request.__Promise; - } - - module node { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__MethodOptions.html - * - * - */ - class __MethodOptions { - constructor(); - /** - * The HTTP method to use to make the request. Must be - * uppercase. Default is "GET". - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Headers to use for the request. - * - */ - "headers": Object; - /** - * The HTTP method to use to make the request. Must be - * uppercase. Default is "GET". - * - */ - "method": string; - /** - * Password to use during the request. - * - */ - "password": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - /** - * Username to use during the request. - * - */ - "user": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/node.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Headers to use for the request. - * - */ - "headers": Object; - /** - * Password to use during the request. - * - */ - "password": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - /** - * Username to use during the request. - * - */ - "user": string; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/watch.html - * - * Watches the io request represented by dfd to see if it completes. - * - * @param dfd The Deferred object to watch. - */ - interface watch { (dfd: dojo.Deferred): void } - interface watch { - /** - * Function used to check if basic IO call worked. Gets the dfd - * object as its only argument. - * - */ - ioCheck: Function; - /** - * Function used to process response. Gets the dfd - * object as its only argument. - * - */ - resHandle: Function; - /** - * Function used to check if the IO request is still valid. Gets the dfd - * object as its only argument. - * - */ - validCheck: Function; - /** - * Cancels all pending IO requests, regardless of IO type - * - */ - cancelAll(): void; - } - - module watch { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/script.html - * - * Sends a request using a script element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - interface script { (url: String, options?: dojo.request.script.__Options): void } - interface script { - /** - * Send an HTTP GET request using a script element with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get(url: String, options: dojo.request.script.__BaseOptions): dojo.request.__Promise; - } - - module script { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/script.__MethodOptions.html - * - * - */ - class __MethodOptions { - constructor(); - /** - * This option is ignored. All requests using this transport are - * GET requests. - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/script.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * A string of JavaScript that when evaluated like so: - * "typeof(" + checkString + ") != 'undefined'" - * being true means that the script fetched has been loaded. - * Do not use this if doing a JSONP type of call (use jsonp instead). - * - */ - "checkString": string; - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * The Document object of a child iframe. If this is passed in, the script - * will be attached to that document. This can be helpful in some comet long-polling - * scenarios with Firefox and Opera. - * - */ - "frameDoc": Object; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * The URL parameter name that indicates the JSONP callback string. - * For instance, when using Yahoo JSONP calls it is normally, - * jsonp: "callback". For AOL JSONP calls it is normally - * jsonp: "c". - * - */ - "jsonp": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/script.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * A string of JavaScript that when evaluated like so: - * "typeof(" + checkString + ") != 'undefined'" - * being true means that the script fetched has been loaded. - * Do not use this if doing a JSONP type of call (use jsonp instead). - * - */ - "checkString": string; - /**dojo - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * The Document object of a child iframe. If this is passed in, the script - * will be attached to that document. This can be helpful in some comet long-polling - * scenarios with Firefox and Opera. - * - */ - "frameDoc": Object; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * The URL parameter name that indicates the JSONP callback string. - * For instance, when using Yahoo JSONP calls it is normally, - * jsonp: "callback". For AOL JSONP calls it is normally - * jsonp: "c". - * - */ - "jsonp": string; - /** - * This option is ignored. All requests using this transport are - * GET requests. - * - */ - "method": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.html - * - * Sends a request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - interface xhr { (url: String, options?: dojo.request.xhr.__Options): void } - interface xhr { - /** - * Send an HTTP DELETE request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - del(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP GET request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - get(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP POST request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - post(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; - /** - * Send an HTTP PUT request using XMLHttpRequest with the given URL and options. - * - * @param url URL to request - * @param options OptionalOptions for the request. - */ - put(url: String, options: dojo.request.xhr.__BaseOptions): dojo.request.__Promise; - } - - module xhr { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.__BaseOptions.html - * - * - */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Headers to use for the request. - * - */ - "headers": Object; - /** - * Password to use during the request. - * - */ - "password": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Whether to make a synchronous request or not. Default - * is false (asynchronous). - * - */ - "sync": boolean; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - /** - * Username to use during the request. - * - */ - "user": string; - /** - * For cross-site requests, whether to send credentials - * or not. - * - */ - "withCredentials": boolean; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.__MethodOptions.html - * - * - */ - class __MethodOptions { - constructor(); - /** - * The HTTP method to use to make the request. Must be - * uppercase. Default is "GET". - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/xhr.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Headers to use for the request. - * - */ - "headers": Object; - /** - * The HTTP method to use to make the request. Must be - * uppercase. Default is "GET". - * - */ - "method": string; - /** - * Password to use during the request. - * - */ - "password": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Whether to make a synchronous request or not. Default - * is false (asynchronous). - * - */ - "sync": boolean; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - /** - * Username to use during the request. - * - */ - "user": string; - /** - * For cross-site requests, whether to send credentials - * or not. - * - */ - "withCredentials": boolean; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__BaseOptions.html - * + * destroy the iframe * */ - class __BaseOptions { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } + interface destroy{(): void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__MethodOptions.html - * + * Resize the iframe so it's the same size as node. + * Needed on IE6 and IE/quirks because height:100% doesn't work right. * + * @param node */ - class __MethodOptions { - constructor(); - /** - * The HTTP method to use to make the request. Must be - * uppercase. - * - */ - "method": string; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__Options.html - * - * - */ - class __Options { - constructor(); - /** - * Data to transfer. This is ignored for GET and DELETE - * requests. - * - */ - "data": string; - /** - * How to handle the response from the server. Default is - * 'text'. Other values are 'json', 'javascript', and 'xml'. - * - */ - "handleAs": string; - /** - * The HTTP method to use to make the request. Must be - * uppercase. - * - */ - "method": string; - /** - * Whether to append a cache-busting parameter to the URL. - * - */ - "preventCache": boolean; - /** - * Query parameters to append to the URL. - * - */ - "query": string; - /** - * Milliseconds to wait for the response. If this time - * passes, the then the promise is rejected. - * - */ - "timeout": number; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request.__Promise.html - * - * - */ - class __Promise extends dojo.promise.Promise { - constructor(); - /** - * A promise resolving to an object representing - * the response from the server. - * - */ - "response": Object; - /** - * Add a callback to be invoked when the promise is resolved - * or rejected. - * - * @param callbackOrErrback OptionalA function that is used both as a callback and errback. - */ - always(callbackOrErrback: Function): any; - /** - * Inform the deferred it may cancel its asynchronous operation. - * Inform the deferred it may cancel its asynchronous operation. - * The deferred's (optional) canceler is invoked and the - * deferred will be left in a rejected state. Can affect other - * promises that originate with the same deferred. - * - * @param reason A message that may be sent to the deferred's canceler,explaining why it's being canceled. - * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be canceled. - */ - cancel(reason: any, strict: boolean): any; - /** - * Checks whether the promise has been canceled. - * - */ - isCanceled(): boolean; - /** - * Checks whether the promise has been resolved or rejected. - * - */ - isFulfilled(): boolean; - /** - * Checks whether the promise has been rejected. - * - */ - isRejected(): boolean; - /** - * Checks whether the promise has been resolved. - * - */ - isResolved(): boolean; - /** - * Add new errbacks to the promise. - * - * @param errback OptionalCallback to be invoked when the promise is rejected. - */ - otherwise(errback: Function): any; - /** - * Add new callbacks to the promise. - * Add new callbacks to the deferred. Callbacks can be added - * before or after the deferred is fulfilled. - * - * @param callback OptionalCallback to be invoked when the promise is resolved.Receives the resolution value. - * @param errback OptionalCallback to be invoked when the promise is rejected.Receives the rejection error. - * @param progback OptionalCallback to be invoked when the promise emits a progressupdate. Receives the progress update. - */ - then(callback?: Function, errback?: Function, progback?: Function): dojo.promise.Promise; - /** - * - */ - toString(): String; - /** - * - */ - trace(): dojo.promise.Promise; - /** - * - */ - traceRejected(): dojo.promise.Promise; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/default.html - * - * - */ - interface default_ { - /** - * - */ - getPlatformDefaultId(): void; - /** - * - * @param id - * @param parentRequire - * @param loaded - * @param config - */ - load(id: any, parentRequire: any, loaded: any, config: any): void; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/request/util.html - * - * - */ - interface util { - /** - * - * @param provider - * @param methods - */ - addCommonMethods(provider: any, methods: any): void; - /** - * - * @param stat - */ - checkStatus(stat: any): boolean; - /** - * - * @param target - * @param source - */ - deepCopy(target: any, source: any): any; - /** - * - * @param source - * @param properties - */ - deepCreate(source: any, properties: any): any; - /** - * - * @param response The object used as the value of the request promise. - * @param cancel - * @param isValid - * @param isReady - * @param handleResponse - * @param last - */ - deferred(response: Object, cancel: any, isValid: any, isReady: any, handleResponse: any, last: any): any; - /** - * Register a listener to be notified when an event - * in dojo/request happens. - * - * @param type OptionalThe event to listen for. Events emitted: "start", "send","load", "error", "done", "stop". - * @param listener OptionalA callback to be run when an event happens. - */ - notify(type: String, listener: Function): any; - /** - * - * @param url - * @param options - * @param skipData - */ - parseArgs(url: any, options: any, skipData: any): Object; - } + interface resize{(node: any): void} } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/AdapterRegistry.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/hccss.html * - * A registry to make contextual calling/searching easier. - * Objects of this class keep list of arrays in the form [name, check, - * wrap, directReturn] that are used to determine what the contextual - * result of a set of checked arguments is. All check/wrap functions - * in this registry should be of the same arity. + * Test if computer is in high contrast mode, and sets dijit_a11y flag on if it is. + * Deprecated, use dojo/hccss instead. * - * @param returnWrappers Optional */ - interface AdapterRegistry { (returnWrappers?: boolean): void } - interface AdapterRegistry { + interface hccss{(): void} + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_AttachMixin.html + * + * Mixin for widgets to attach to dom nodes and setup events via + * convenient data-dojo-attach-point and data-dojo-attach-event DOM attributes. + * + * Superclass of _TemplatedMixin, and can also be used standalone when templates are pre-rendered on the + * server. + * + * Does not [yet] handle widgets like ContentPane with this.containerNode set. It should skip + * scanning for data-dojo-attach-point and data-dojo-attach-event inside this.containerNode, but it + * doesn't. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. + */ + class _AttachMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + /** + * Search descendants of this.containerNode for data-dojo-attach-point and data-dojo-attach-event. + * Should generally be left false (the default value) both for performance and to avoid failures when + * this.containerNode holds other _AttachMixin instances with their own attach points and events. + * + */ + "searchContainerNode": boolean; + /** + * Attach to DOM nodes marked with special attributes. + * + */ + buildRendering(): void; /** * */ - pairs: any[]; - /** - * - */ - returnWrappers: boolean; - /** - * Find an adapter for the given arguments. If no suitable adapter - * is found, throws an exception. match() accepts any number of - * arguments, all of which are passed to all matching functions - * from the registered pairs. - * - */ - match(): any; - /** - * register a check function to determine if the wrap function or - * object gets selected - * - * @param name a way to identify this matcher. - * @param check a function that arguments are passed to from the adapter'smatch() function. The check function should return true if thegiven arguments are appropriate for the wrap function. - * @param wrap - * @param directReturn OptionalIf directReturn is true, the value passed in for wrap will bereturned instead of being called. Alternately, theAdapterRegistry can be set globally to "return not call" usingthe returnWrappers property. Either way, this behavior allowsthe registry to act as a "search" function instead of afunction interception library. - * @param override OptionalIf override is given and true, the check function will be givenhighest priority. Otherwise, it will be the lowest priorityadapter. - */ - register(name: String, check: Function, wrap: Function, directReturn: boolean, override: boolean): void; - /** - * Remove a named adapter from the registry - * - * @param name The name of the adapter. - */ - unregister(name: String): any; + destroyRendering(): void; } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_Container.html + * + * Mixin for widgets that contain HTML and/or a set of widget children. + * + */ + class _Container { + constructor(); + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * + */ + buildRendering(): void; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; - module AdapterRegistry { } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_Contained.html * - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. + * Mixin for widgets that are children of a container widget * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. */ - interface cache { (module: String, url: String, value?: String): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html - * - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - interface cache { (module: Object, url: String, value?: String): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html - * - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - interface cache { (module: String, url: String, value?: Object): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/cache.html - * - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - interface cache { (module: Object, url: String, value?: Object): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/cookie.html - * - * Get or set a cookie. - * If one argument is passed, returns the value of the cookie - * For two or more arguments, acts as a setter. - * - * @param name Name of the cookie - * @param value OptionalValue for the cookie - * @param props OptionalProperties for the cookie - */ - interface cookie { (name: String, value?: String, props?: Object): void } - interface cookie { + class _Contained { + constructor(); /** - * Use to determine if the current browser supports cookies or not. - * - * Returns true if user allows cookies. - * Returns false if user doesn't allow cookies. + * 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 * */ - isSupported(): void; + getIndexInParent(): any; + /** + * Returns null if this is the last child of the parent, + * otherwise returns the next element sibling to the "right". + * + */ + getNextSibling(): any; + /** + * Returns null if this is the first child of the parent, + * otherwise returns the next element sibling to the "left". + * + */ + getPreviousSibling(): any; } - - module cookie { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_DialogMixin.html + * + * This provides functions useful to Dialog and TooltipDialog + * + */ + class _DialogMixin { + constructor(); + /** + * Callback when the user hits the submit button. + * Override this method to handle Dialog execution. + * After the user has pressed the submit button, the Dialog + * first calls onExecute() to notify the container to hide the + * dialog and restore focus to wherever it used to be. + * + * Then this method is called. + * + * @param formContents + */ + execute(formContents: Object): void; + /** + * Called when user has pressed the Dialog's cancel button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onCancel(): void; + /** + * Called when user has pressed the dialog's OK button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onExecute(): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/domReady.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_CssStateMixin.html * - * Plugin to delay require()/define() callback from firing until the DOM has finished loading. + * Mixin for widgets to set CSS classes on the widget DOM nodes depending on hover/mouse press/focus + * state changes, and also higher-level state changes such becoming disabled or selected. + * By mixing this class into your widget, and setting the this.baseClass attribute, it will automatically + * maintain CSS classes on the widget root node (this.domNode) depending on hover, + * active, focus, etc. state. Ex: with a baseClass of dijitButton, it will apply the classes + * dijitButtonHovered and dijitButtonActive, as the user moves the mouse over the widget and clicks it. + * + * It also sets CSS like dijitButtonDisabled based on widget semantic state. + * + * By setting the cssStateNodes attribute, a widget can also track events on subnodes (like buttons + * within the widget). * - * @param callback */ - interface domReady { (callback: any): void } - interface domReady { + class _CssStateMixin { + constructor(); /** + * True if mouse was pressed while over this widget, and hasn't been released yet * - * @param id - * @param req - * @param load */ - load(id: any, req: any, load: any): void; + "active": boolean; + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; } - - module domReady { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_FocusMixin.html + * + * Mixin to widget to provide _onFocus() and _onBlur() methods that + * fire when a widget or its descendants get/lose focus + * + */ + class _FocusMixin { + constructor(); } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/hash.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_HasDropDown.html * - * Gets or sets the hash string in the browser URL. - * Handles getting and setting of location.hash. + * Mixin for widgets that need drop down ability. * - * If no arguments are passed, acts as a getter. - * If a string is passed, acts as a setter. - * - * @param hash Optionalthe hash is set - #string. - * @param replace OptionalIf true, updates the hash value in the current historystate instead of creating a new history state. */ - interface hash { (hash?: String, replace?: boolean): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html - * - * Return the current value of the named feature. - * Returns the value of the feature named by name. The feature must have been - * previously added to the cache by has.add. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - */ - interface has { (name: String): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/has.html - * - * Return the current value of the named feature. - * Returns the value of the feature named by name. The feature must have been - * previously added to the cache by has.add. - * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - */ - interface has { (name: number): void } - interface has { + class _HasDropDown extends dijit._FocusMixin { + constructor(); + /** + * Set to true to make the drop down at least as wide as this + * widget. Set to false if the drop down should just be its + * default width. + * + */ + "autoWidth": boolean; + /** + * The widget to display as a popup. This widget must be + * defined before the startup function is called. + * + */ + "dropDown": Object; + /** + * This variable controls the position of the drop down. + * It's an array of strings with the following values: + * + * before: places drop down to the left of the target node/widget, or to the right in + * the case of RTL scripts like Hebrew and Arabic + * after: places drop down to the right of the target node/widget, or to the left in + * the case of RTL scripts like Hebrew and Arabic + * above: drop down goes above target node + * below: drop down goes below target node + * The list is positions is tried, in order, until a position is found where the drop down fits + * within the viewport. + * + */ + "dropDownPosition": Object; + /** + * Set to true to make the drop down exactly as wide as this + * widget. Overrides autoWidth. + * + */ + "forceWidth": boolean; + /** + * The max height for our dropdown. + * Any dropdown taller than this will have scrollbars. + * Set to 0 for no max height, or -1 to limit height to available space in viewport + * + */ + "maxHeight": number; /** * */ - cache: string; + buildRendering(): void; /** - * Register a new feature test for some named feature. + * Closes the drop down on this widget * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. - * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. - * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). + * @param focus If true, refocuses the button widget */ - add(name: String, test: Function, now: boolean, force: boolean): any; + closeDropDown(focus: boolean): void; /** - * Register a new feature test for some named feature. * - * @param name The name (if a string) or identifier (if an integer) of the feature to test. - * @param test A test function to register. If a function, queued for testing until actuallyneeded. The test function should return a boolean indicatingthe presence of a feature or bug. - * @param now OptionalOptional. Omit if test is not a function. Provides a way to immediatelyrun the test and cache the result. - * @param force OptionalOptional. If the test already exists and force is truthy, then the existingtest will be replaced; otherwise, add does not replace an existing test (thatis, by default, the first test advice wins). */ - add(name: number, test: Function, now: boolean, force: boolean): any; + destroy(): void; /** - * Deletes the contents of the element passed to test functions. + * Returns true if the dropdown exists and it's data is loaded. This can + * be overridden in order to force a call to loadDropDown(). * - * @param element */ - clearElement(element: any): void; + isLoaded(): boolean; /** - * Conditional loading of AMD modules based on a has feature test value. + * Creates the drop down if it doesn't exist, loads the data + * if there's an href and it hasn't been loaded yet, and + * then opens the drop down. This is basically a callback when the + * user presses the down arrow button to open the drop down. * - * @param id Gives the resolved module id to load. - * @param parentRequire The loader require function with respect to the module that contained the plugin resource in it'sdependency list. - * @param loaded Callback to loader that consumes result of plugin demand. */ - load(id: String, parentRequire: Function, loaded: Function): void; + loadAndOpenDropDown(): any; /** - * Resolves id into a module id based on possibly-nested tenary expression that branches on has feature test value(s). + * Creates the drop down if it doesn't exist, loads the data + * if there's an href and it hasn't been loaded yet, and then calls + * the given callback. * - * @param id - * @param toAbsMid Resolves a relative module id into an absolute module id + * @param loadCallback */ - normalize(id: any, toAbsMid: Function): void; + loadDropDown(loadCallback: Function): void; + /** + * Opens the dropdown for this widget. To be called only when this.dropDown + * has been created and is ready to display (ie, it's data is loaded). + * + */ + openDropDown(): any; + /** + * set up nodes and connect our mouse and keyboard events + * + */ + postCreate(): void; + /** + * Callback when the user presses the down arrow button or presses + * the down arrow key to open/close the drop down. + * Toggle the drop-down widget; if it is up, close it, if not, open it + * + */ + toggleDropDown(): void; } - - module has { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_KeyNavMixin.html + * + * A mixin to allow arrow key and letter key navigation of child or descendant widgets. + * It can be used by dijit/_Container based widgets with a flat list of children, + * or more complex widgets like dijit/Tree. + * + * To use this mixin, the subclass must: + * + * - Implement _getNext(), _getFirst(), _getLast(), _onLeftArrow(), _onRightArrow() + * _onDownArrow(), _onUpArrow() methods to handle home/end/left/right/up/down keystrokes. + * Next and previous in this context refer to a linear ordering of the descendants used + * by letter key search. + * - Set all descendants' initial tabIndex to "-1"; both initial descendants and any + * descendants added later, by for example addChild() + * - Define childSelector to a function or string that identifies focusable descendant widgets + * Also, child widgets must implement a focus() method. + * + */ + class _KeyNavMixin extends dijit._FocusMixin { + constructor(); + /** + * Selector (passed to on.selector()) used to identify what to treat as a child widget. Used to monitor + * focus events and set this.focusedChild. Must be set by implementing class. If this is a string + * (ex: "> *") then the implementing class must require dojo/query. + * + */ + "childSelector": any; + /** + * The currently focused child widget, or null if there isn't one + * + */ + "focusedChild": Object; + /** + * If multiple characters are typed where each keystroke happens within + * multiCharSearchDuration of the previous keystroke, + * search for nodes matching all the keystrokes. + * + * For example, typing "ab" will search for entries starting with + * "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration. + * + */ + "multiCharSearchDuration": number; + /** + * 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. + * + */ + "tabIndex": string; + /** + * Default focus() implementation: focus the first child. + * + */ + focus(): void; + /** + * Focus specified child widget. + * + * @param widget Reference to container's child widget + * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one + */ + focusChild(widget: dijit._WidgetBase, last: boolean): void; + /** + * Focus the first focusable child in the container. + * + */ + focusFirstChild(): void; + /** + * Focus the last focusable child in the container. + * + */ + focusLastChild(): void; + /** + * + */ + postCreate(): void; + /** + * When a key is pressed that matches a child item, + * this method is called so that a widget can take appropriate action is necessary. + * + * @param item + * @param evt + * @param searchString + * @param numMatches + */ + onKeyboardSearch(item: dijit._WidgetBase, evt: Event, searchString: String, numMatches: number): void; } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/hccss.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_KeyNavContainer.html * - * Test if computer is in high contrast mode (i.e. if browser is not displaying background images). - * Defines has("highcontrast") and sets dj_a11y CSS class on if machine is in high contrast mode. - * Returns has() method; + * A _Container with keyboard navigation of its children. + * Provides normalized keyboard and focusing code for Container widgets. + * To use this mixin, call connectKeyNavHandlers() in postCreate(). + * Also, child widgets must implement a focus() method. * */ - interface hccss { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-data.html - * - * Adds data() and removeData() methods to NodeList, and returns NodeList constructor. - * - */ - interface NodeList_data { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-html.html - * - * Adds a chainable html method to dojo/query() / NodeList instances for setting/replacing node content - * - */ - interface NodeList_html { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-fx.html - * - * Adds dojo.fx animation support to dojo.query() by extending the NodeList class - * with additional FX functions. NodeList is the array-like object used to hold query results. - * - */ - interface NodeList_fx { (): void } - interface NodeList_fx { + class _KeyNavContainer extends dijit._FocusMixin implements dijit._KeyNavMixin, dijit._Container { + constructor(); /** - * fade all elements of the node list to a specified opacity + * The currently focused child widget, or null if there isn't one * - * @param args */ - fadeTo(args: any): any; + "focusedChild": Object; /** - * highlight all elements of the node list. - * Returns an instance of dojo.Animation + * If multiple characters are typed where each keystroke happens within + * multiCharSearchDuration of the previous keystroke, + * search for nodes matching all the keystrokes. + * + * For example, typing "ab" will search for entries starting with + * "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration. * - * @param args */ - highlight(args: any): any; + "multiCharSearchDuration": number; /** - * size all elements of this NodeList. Returns an instance of dojo.Animation + * 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. * - * @param args */ - sizeTo(args: any): any; + "tabIndex": string; /** - * slide all elements of this NodeList. Returns an instance of dojo.Animation * - * @param args + * @param widget + * @param insertIndex Optional */ - slideBy(args: any): any; + addChild(widget: dijit._WidgetBase, insertIndex: number): void; /** - * Wipe all elements of the NodeList to a specified width: or height: * - * @param args */ - wipeTo(args: any): any; + buildRendering(): void; + /** + * + * @param node + */ + childSelector(node: HTMLElement): any; + /** + * Deprecated. You can call this in postCreate() to attach the keyboard handlers to the container, + * but the preferred method is to override _onLeftArrow() and _onRightArrow(), or + * _onUpArrow() and _onDownArrow(), to call focusPrev() and focusNext(). + * + * @param prevKeyCodes Key codes for navigating to the previous child. + * @param nextKeyCodes Key codes for navigating to the next child. + */ + connectKeyNavHandlers(prevKeyCodes: dojo.keys, nextKeyCodes: dojo.keys): void; + /** + * Default focus() implementation: focus the first child. + * + */ + focus(): void; + /** + * Focus specified child widget. + * + * @param widget Reference to container's child widget + * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one + */ + focusChild(widget: dijit._WidgetBase, last: boolean): void; + /** + * Focus the first focusable child in the container. + * + */ + focusFirstChild(): void; + /** + * Focus the last focusable child in the container. + * + */ + focusLastChild(): void; + /** + * Focus the next widget + * + */ + focusNext(): void; + /** + * Focus the last focusable node in the previous widget + * (ex: go to the ComboButton icon section rather than button section) + * + */ + focusPrev(): void; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * + */ + postCreate(): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * + */ + startup(): void; + /** + * + */ + startupKeyNavChildren(): void; + /** + * When a key is pressed that matches a child item, + * this method is called so that a widget can take appropriate action is necessary. + * + * @param item + * @param evt + * @param searchString + * @param numMatches + */ + onKeyboardSearch(item: dijit._WidgetBase, evt: Event, searchString: String, numMatches: number): void; } - - module NodeList_fx { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-dom.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_OnDijitClickMixin.html * - * Adds DOM related methods to NodeList, and returns NodeList constructor. + * Deprecated. New code should access the dijit/a11yclick event directly, ex: + * + * this.own(on(node, a11yclick, function(){ ... })); + * Mixing in this class will make _WidgetBase.connect(node, "ondijitclick", ...) work. + * It also used to be necessary to make templates with ondijitclick work, but now you can just require + * dijit/a11yclick. * */ - interface NodeList_dom { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-manipulate.html - * - * Adds chainable methods to dojo.query() / NodeList instances for manipulating HTML - * and DOM nodes and their properties. - * - */ - interface NodeList_manipulate { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList-traverse.html - * - * Adds chainable methods to dojo/query() / NodeList instances for traversing the DOM - * - */ - interface NodeList_traverse { (): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html - * - * A function that provides core event listening functionality. With this function - * you can provide a target, event type, and listener to be notified of - * future matching events that are fired. - * To listen for "click" events on a button node, we can do: - * - * define(["dojo/on"], function(listen){ - * on(button, "click", clickHandler); - * ... - * Evented JavaScript objects can also have their own events. - * - * var obj = new Evented; - * on(obj, "foo", fooHandler); - * And then we could publish a "foo" event: - * - * on.emit(obj, "foo", {key: "value"}); - * We can use extension events as well. For example, you could listen for a tap gesture: - * - * define(["dojo/on", "dojo/gesture/tap", function(listen, tap){ - * on(button, tap, tapHandler); - * ... - * which would trigger fooHandler. Note that for a simple object this is equivalent to calling: - * - * obj.onfoo({key:"value"}); - * If you use on.emit on a DOM node, it will use native event dispatching when possible. - * - * @param target This is the target object or DOM element that to receive events from - * @param type This is the name of the event to listen for or an extension event type. - * @param listener This is the function that should be called when the event fires. - * @param dontFix - */ - interface on { (target: HTMLElement, type: String, listener: Function, dontFix: any): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html - * - * A function that provides core event listening functionality. With this function - * you can provide a target, event type, and listener to be notified of - * future matching events that are fired. - * To listen for "click" events on a button node, we can do: - * - * define(["dojo/on"], function(listen){ - * on(button, "click", clickHandler); - * ... - * Evented JavaScript objects can also have their own events. - * - * var obj = new Evented; - * on(obj, "foo", fooHandler); - * And then we could publish a "foo" event: - * - * on.emit(obj, "foo", {key: "value"}); - * We can use extension events as well. For example, you could listen for a tap gesture: - * - * define(["dojo/on", "dojo/gesture/tap", function(listen, tap){ - * on(button, tap, tapHandler); - * ... - * which would trigger fooHandler. Note that for a simple object this is equivalent to calling: - * - * obj.onfoo({key:"value"}); - * If you use on.emit on a DOM node, it will use native event dispatching when possible. - * - * @param target This is the target object or DOM element that to receive events from - * @param type This is the name of the event to listen for or an extension event type. - * @param listener This is the function that should be called when the event fires. - * @param dontFix - */ - interface on { (target: Object, type: String, listener: Function, dontFix: any): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html - * - * A function that provides core event listening functionality. With this function - * you can provide a target, event type, and listener to be notified of - * future matching events that are fired. - * To listen for "click" events on a button node, we can do: - * - * define(["dojo/on"], function(listen){ - * on(button, "click", clickHandler); - * ... - * Evented JavaScript objects can also have their own events. - * - * var obj = new Evented; - * on(obj, "foo", fooHandler); - * And then we could publish a "foo" event: - * - * on.emit(obj, "foo", {key: "value"}); - * We can use extension events as well. For example, you could listen for a tap gesture: - * - * define(["dojo/on", "dojo/gesture/tap", function(listen, tap){ - * on(button, tap, tapHandler); - * ... - * which would trigger fooHandler. Note that for a simple object this is equivalent to calling: - * - * obj.onfoo({key:"value"}); - * If you use on.emit on a DOM node, it will use native event dispatching when possible. - * - * @param target This is the target object or DOM element that to receive events from - * @param type This is the name of the event to listen for or an extension event type. - * @param listener This is the function that should be called when the event fires. - * @param dontFix - */ - interface on { (target: HTMLElement, type: Function, listener: Function, dontFix: any): void } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/on.html - * - * A function that provides core event listening functionality. With this function - * you can provide a target, event type, and listener to be notified of - * future matching events that are fired. - * To listen for "click" events on a button node, we can do: - * - * define(["dojo/on"], function(listen){ - * on(button, "click", clickHandler); - * ... - * Evented JavaScript objects can also have their own events. - * - * var obj = new Evented; - * on(obj, "foo", fooHandler); - * And then we could publish a "foo" event: - * - * on.emit(obj, "foo", {key: "value"}); - * We can use extension events as well. For example, you could listen for a tap gesture: - * - * define(["dojo/on", "dojo/gesture/tap", function(listen, tap){ - * on(button, tap, tapHandler); - * ... - * which would trigger fooHandler. Note that for a simple object this is equivalent to calling: - * - * obj.onfoo({key:"value"}); - * If you use on.emit on a DOM node, it will use native event dispatching when possible. - * - * @param target This is the target object or DOM element that to receive events from - * @param type This is the name of the event to listen for or an extension event type. - * @param listener This is the function that should be called when the event fires. - * @param dontFix - */ - interface on { (target: Object, type: String, listener: Function, dontFix?: any): { remove: { (): void } } } - interface on { + class _OnDijitClickMixin { + constructor(); + /** + * Custom press, release, and click synthetic events + * which trigger on a left mouse click, touch, or space/enter keyup. + * + */ + "a11yclick": Object; /** * - * @param target - * @param type + * @param obj * @param event + * @param method */ - emit(target: any, type: any, event: any): any; - /** - * This function acts the same as on(), but will only call the listener once. The - * listener will be called for the first - * event that takes place and then listener will automatically be removed. - * - * @param target - * @param type - * @param listener - * @param dontFix - */ - once(target: any, type: any, listener: any, dontFix: any): any; - /** - * - * @param target - * @param type - * @param listener - * @param addListener - * @param dontFix - * @param matchesTarget - */ - parse(target: any, type: any, listener: any, addListener: any, dontFix: any, matchesTarget: any): any; - /** - * This function acts the same as on(), but with pausable functionality. The - * returned signal object has pause() and resume() functions. Calling the - * pause() method will cause the listener to not be called for future events. Calling the - * resume() method will cause the listener to again be called for future events. - * - * @param target - * @param type - * @param listener - * @param dontFix - */ - pausable(target: any, type: any, listener: any, dontFix: any): any; - /** - * Creates a new extension event with event delegation. This is based on - * the provided event type (can be extension event) that - * only calls the listener when the CSS selector matches the target of the event. - * - * The application must require() an appropriate level of dojo/query to handle the selector. - * - * @param selector The CSS selector to use for filter events and determine the |this| of the event listener. - * @param eventType The event to listen for - * @param children Indicates if children elements of the selector should be allowed. This defaults to true - */ - selector(selector: any, eventType: any, children: any): Function; + connect(obj: any, event: any, method: any): any; } - - module on { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/query.html - * - * This modules provides DOM querying functionality. The module export is a function - * that can be used to query for DOM nodes by CSS selector and returns a NodeList - * representing the matching nodes. - * dojo/query is responsible for loading the appropriate query engine and wrapping - * its results with a NodeList. You can use dojo/query with a specific selector engine - * by using it as a plugin. For example, if you installed the sizzle package, you could - * use it as the selector engine with: - * - * require(["dojo/query!sizzle"], function(query){ - * query("div")... - * The id after the ! can be a module id of the selector engine or one of the following values: - * - * acme: This is the default engine used by Dojo base, and will ensure that the full - * Acme engine is always loaded. - * css2: If the browser has a native selector engine, this will be used, otherwise a - * very minimal lightweight selector engine will be loaded that can do simple CSS2 selectors - * (by #id, .class, tag, and [name=value] attributes, with standard child or descendant (>) - * operators) and nothing more. - * css2.1: If the browser has a native selector engine, this will be used, otherwise the - * full Acme engine will be loaded. - * css3: If the browser has a native selector engine with support for CSS3 pseudo - * selectors (most modern browsers except IE8), this will be used, otherwise the - * full Acme engine will be loaded. - * Or the module id of a selector engine can be used to explicitly choose the selector engine - * - * For example, if you are using CSS3 pseudo selectors in module, you can specify that - * you will need support them with: - * - * require(["dojo/query!css3"], function(query){ - * query('#t > h3:nth-child(odd)')... - * You can also choose the selector engine/load configuration by setting the query-selector: - * For example: - * - * - * - * @param selector A CSS selector to search for. - * @param context OptionalAn optional context to limit the searching scope. Only nodes under context will bescanned. - */ - interface query{(selector: String, context?: String): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/query.html - * - * This modules provides DOM querying functionality. The module export is a function - * that can be used to query for DOM nodes by CSS selector and returns a NodeList - * representing the matching nodes. - * dojo/query is responsible for loading the appropriate query engine and wrapping - * its results with a NodeList. You can use dojo/query with a specific selector engine - * by using it as a plugin. For example, if you installed the sizzle package, you could - * use it as the selector engine with: - * - * require(["dojo/query!sizzle"], function(query){ - * query("div")... - * The id after the ! can be a module id of the selector engine or one of the following values: - * - * acme: This is the default engine used by Dojo base, and will ensure that the full - * Acme engine is always loaded. - * css2: If the browser has a native selector engine, this will be used, otherwise a - * very minimal lightweight selector engine will be loaded that can do simple CSS2 selectors - * (by #id, .class, tag, and [name=value] attributes, with standard child or descendant (>) - * operators) and nothing more. - * css2.1: If the browser has a native selector engine, this will be used, otherwise the - * full Acme engine will be loaded. - * css3: If the browser has a native selector engine with support for CSS3 pseudo - * selectors (most modern browsers except IE8), this will be used, otherwise the - * full Acme engine will be loaded. - * Or the module id of a selector engine can be used to explicitly choose the selector engine - * - * For example, if you are using CSS3 pseudo selectors in module, you can specify that - * you will need support them with: - * - * require(["dojo/query!css3"], function(query){ - * query('#t > h3:nth-child(odd)')... - * You can also choose the selector engine/load configuration by setting the query-selector: - * For example: - * - * - * - * @param selector A CSS selector to search for. - * @param context OptionalAn optional context to limit the searching scope. Only nodes under context will bescanned. - */ - interface query{(selector: String, context?: HTMLElement): void} - interface query { + module _OnDijitClickMixin { /** - * can be used as AMD plugin to conditionally load new query engine - * - * @param id - * @param parentRequire - * @param loaded - */ - load(id: any, parentRequire: any, loaded: any): void; - /** - * Array-like object which adds syntactic - * sugar for chaining, common iteration operations, animation, and - * node manipulation. NodeLists are most often returned as the - * result of dojo/query() calls. - * NodeList instances provide many utilities that reflect - * core Dojo APIs for Array iteration and manipulation, DOM - * manipulation, and event handling. Instead of needing to dig up - * functions in the dojo package, NodeLists generally make the - * full power of Dojo available for DOM manipulation tasks in a - * simple, chainable way. - * - * @param array - */ - NodeList(array: any): any[]; - } - - module query { - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/ready.html - * - * Add a function to execute on DOM content loaded and all requested modules have arrived and been evaluated. - * In most cases, the domReady plug-in should suffice and this method should not be needed. - * - * When called in a non-browser environment, just checks that all requested modules have arrived and been - * evaluated. - * - * @param priority OptionalThe order in which to exec this callback relative to other callbacks, defaults to 1000 - * @param context The context in which to run execute callback, or a callback if not using context - * @param callback OptionalThe function to execute. - */ - interface ready{(priority?: number, context?: any, callback?: Function): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/sniff.html - * - * This module sets has() flags based on the current browser. - * It returns the has() function. - * - */ - interface sniff{(): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/when.html - * - * Transparently applies callbacks to values and/or promises. - * Accepts promises but also transparently handles non-promises. If no - * callbacks are provided returns a promise, regardless of the initial - * value. Foreign promises are converted. - * - * If callbacks are provided and the initial value is not a promise, - * the callback is executed immediately with no error handling. Returns - * a promise if the initial value is a promise, or the result of the - * callback otherwise. - * - * @param valueOrPromise Either a regular value or an object with a then() method thatfollows the Promises/A specification. - * @param callback OptionalCallback to be invoked when the promise is resolved, or a non-promiseis received. - * @param errback OptionalCallback to be invoked when the promise is rejected. - * @param progback OptionalCallback to be invoked when the promise emits a progress update. - */ - interface when{(valueOrPromise: any, callback?: Function, errback?: Function, progback?: Function): void} - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/DeferredList.html - * - * Deprecated, use dojo/promise/all instead. - * Provides event handling for a group of Deferred objects. - * DeferredList takes an array of existing deferreds and returns a new deferred of its own - * this new deferred will typically have its callback fired when all of the deferreds in - * the given list have fired their own deferreds. The parameters fireOnOneCallback and - * fireOnOneErrback, will fire before all the deferreds as appropriate - * - */ - class DeferredList { - constructor(); - /** - * Gathers the results of the deferreds for packaging - * as the parameters to the Deferred Lists' callback - * - * @param deferredList The deferred list from which this function gathers results. - */ - gatherResults(deferredList: dojo.DeferredList): any; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/Deferred.html - * - * Creates a new deferred. This API is preferred over - * dojo/_base/Deferred. - * Creates a new deferred, as an abstraction over (primarily) - * asynchronous operations. The deferred is the private interface - * that should not be returned to calling code. That's what the - * promise is for. See dojo/promise/Promise. - * - * @param canceler OptionalWill be invoked if the deferred is canceled. The cancelerreceives the reason the deferred was canceled as its argument.The deferred is rejected with its return value, or a newdojo/errors/CancelError instance. - */ - class Deferred { - constructor(canceler?: Function); - /** - * - */ - "promise": Object; - /** - * Inform the deferred it may cancel its asynchronous operation. - * Inform the deferred it may cancel its asynchronous operation. - * The deferred's (optional) canceler is invoked and the - * deferred will be left in a rejected state. Can affect other - * promises that originate with the same deferred. - * - * @param reason A message that may be sent to the deferred's canceler,explaining why it's being canceled. - * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be canceled. - */ - cancel(reason: any, strict: boolean): any; - /** - * Checks whether the deferred has been canceled. - * - */ - isCanceled(): boolean; - /** - * Checks whether the deferred has been resolved or rejected. - * - */ - isFulfilled(): boolean; - /** - * Checks whether the deferred has been rejected. - * - */ - isRejected(): boolean; - /** - * Checks whether the deferred has been resolved. - * - */ - isResolved(): boolean; - /** - * Emit a progress update on the deferred. - * Emit a progress update on the deferred. Progress updates - * can be used to communicate updates about the asynchronous - * operation before it has finished. - * - * @param update The progress update. Passed to progbacks. - * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently no progress can be emitted. - */ - progress(update: any, strict: boolean): dojo.promise.Promise; - /** - * Reject the deferred. - * Reject the deferred, putting it in an error state. - * - * @param error The error result of the deferred. Passed to errbacks. - * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be rejected. - */ - reject(error: any, strict: boolean): any; - /** - * Resolve the deferred. - * Resolve the deferred, putting it in a success state. - * - * @param value The result of the deferred. Passed to callbacks. - * @param strict OptionalIf strict, will throw an error if the deferred has alreadybeen fulfilled and consequently cannot be resolved. - */ - resolve(value: any, strict: boolean): dojo.promise.Promise; - /** - * Add new callbacks to the deferred. - * Add new callbacks to the deferred. Callbacks can be added - * before or after the deferred is fulfilled. - * - * @param callback OptionalCallback to be invoked when the promise is resolved.Receives the resolution value. - * @param errback OptionalCallback to be invoked when the promise is rejected.Receives the rejection error. - * @param progback OptionalCallback to be invoked when the promise emits a progressupdate. Receives the progress update. - */ - then(callback: Function, errback: Function, progback: Function): dojo.promise.Promise; - /** - * - */ - toString(): String; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/Evented.html - * - * A class that can be used as a mixin or base class, - * to add on() and emit() methods to a class - * for listening for events and emitting events: - * - */ - class Evented { - constructor(); - /** - * - * @param type - * @param event - */ - emit(type: String, data: any): any; - /** - * - * @param type - * @param listener - */ - on(type: String, listener: {(e:any):void}): {remove: {():void}}; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList.html - * - * Array-like object which adds syntactic - * sugar for chaining, common iteration operations, animation, and - * node manipulation. NodeLists are most often returned as the - * result of dojo/query() calls. - * NodeList instances provide many utilities that reflect - * core Dojo APIs for Array iteration and manipulation, DOM - * manipulation, and event handling. Instead of needing to dig up - * functions in the dojo package, NodeLists generally make the - * full power of Dojo available for DOM manipulation tasks in a - * simple, chainable way. - * - * @param array - */ - class NodeList { - constructor(array: any); - /** - * - */ - "events": any[]; - /** - * adds the specified class to every node in the list - * - * @param className A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(className: String): void; - /** - * adds the specified class to every node in the list - * - * @param className A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(className: any[]): void; - /** - * Animate the effects of adding a class to all nodes in this list. - * see dojox.fx.addClass - * - * @param cssClass - * @param args - */ - addClassFx(cssClass: any, args: any): {type:Function;value:any}; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: String, position: String): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: HTMLElement, position: String): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: Object, position: String): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: dojo.NodeList, position: String): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: String, position: number): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: HTMLElement, position: number): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: Object, position: number): Function; - /** - * add a node, NodeList or some HTML as a string to every item in the - * list. Returns the original list. - * a copy of the HTML content is added to each item in the - * list, with an optional position argument. If no position - * argument is provided, the content is appended to the end of - * each item. - * - * @param content the content to be set on the parent element.This can be an html string, a node reference or a NodeList, dojo/NodeList, Array or other enumerable list of nodes - * @param position Optionalcan be one of:"last"||"end" (default)"first||"start""before""after""replace" (replaces nodes in this NodeList with new content)"only" (removes other children of the nodes so new content is the only child)or an offset in the childNodes property - */ - addContent(content: dojo.NodeList, position: number): Function; - /** - * places any/all elements in queryOrListOrNode at a - * position relative to the first element in this list. - * Returns a dojo/NodeList of the adopted elements. - * - * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. - * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property - */ - adopt(queryOrListOrNode: String, position: String): any; - /** - * places any/all elements in queryOrListOrNode at a - * position relative to the first element in this list. - * Returns a dojo/NodeList of the adopted elements. - * - * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. - * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property - */ - adopt(queryOrListOrNode: any[], position: String): any; - /** - * places any/all elements in queryOrListOrNode at a - * position relative to the first element in this list. - * Returns a dojo/NodeList of the adopted elements. - * - * @param queryOrListOrNode a DOM node or a query string or a query result.Represents the nodes to be adopted relative to thefirst element of this NodeList. - * @param position Optionalcan be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property - */ - adopt(queryOrListOrNode: HTMLElement, position: String): any; - /** - * Places the content after every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - after(content: String): any; - /** - * Places the content after every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - after(content: HTMLElement): any; - /** - * Places the content after every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - after(content: NodeList): any; - /** - * Adds the nodes from the previous dojo/NodeList to the current dojo/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - */ - andSelf(): any; - /** - * Animate one or more CSS properties for all nodes in this list. - * The returned animation object will already be playing when it - * is returned. See the docs for dojo.anim for full details. - * - * @param properties the properties to animate. does NOT support the auto parameter like otherNodeList-fx methods. - * @param duration OptionalOptional. The time to run the animations for - * @param easing OptionalOptional. The easing function to use. - * @param onEnd OptionalA function to be called when the animation ends - * @param delay Optionalhow long to delay playing the returned animation - */ - anim(properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; - /** - * Animate all elements of this NodeList across the properties specified. - * syntax identical to dojo.animateProperty - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - animateProperty(args: Object): any; - /** - * appends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - append(content: String): any; - /** - * appends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - append(content: HTMLElement): any; - /** - * appends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - append(content: NodeList): any; - /** - * appends nodes in this NodeList to the nodes matched by - * the query passed to appendTo. - * The nodes in this NodeList will be cloned if the query - * matches more than one element. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param query - */ - appendTo(query: String): any; - /** - * Returns a new NodeList comprised of items in this NodeList - * at the given index or indices. - * - * @param index One or more 0-based indices of items in the currentNodeList. A negative index will start at the end of thelist and go backwards. - */ - at(index: number[]): any; - /** - * gets or sets the DOM attribute for every element in the - * NodeList. See also dojo/dom-attr - * - * @param property the attribute to get/set - * @param value Optionaloptional. The value to set the property to - */ - attr(property: String, value: String): any; - /** - * Places the content before every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - before(content: String): any; - /** - * Places the content before every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - before(content: HTMLElement): any; - /** - * Places the content before every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - before(content: NodeList): any; - /** - * Returns all immediate child elements for nodes in this dojo/NodeList. - * Optionally takes a query to filter the child elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - children(query: String): any; - /** - * Clones all the nodes in this NodeList and returns them as a new NodeList. - * Only the DOM nodes are cloned, not any attached event handlers. - * - */ - clone(): any; - /** - * Returns closest parent that matches query, including current node in this - * dojo/NodeList if it matches the query. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query a CSS selector. - * @param root OptionalIf specified, query is relative to "root" rather than document body. - */ - closest(query: String, root: String): any; - /** - * Returns closest parent that matches query, including current node in this - * dojo/NodeList if it matches the query. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query a CSS selector. - * @param root OptionalIf specified, query is relative to "root" rather than document body. - */ - closest(query: String, root: HTMLElement): any; - /** - * Returns a new NodeList comprised of items in this NodeList - * as well as items passed in as parameters - * This method behaves exactly like the Array.concat method - * with the caveat that it returns a NodeList and not a - * raw Array. For more details, see the Array.concat - * docs - * - * @param item OptionalAny number of optional parameters may be passed in to bespliced into the NodeList - */ - concat(item: Object): any; - /** - * Attach event handlers to every item of the NodeList. Uses dojo.connect() - * so event properties are normalized. - * - * Application must manually require() "dojo/_base/connect" before using this method. - * - * @param methodName the name of the method to attach to. For DOM events, this should bethe lower-case name of the event - * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in - * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. - */ - connect(methodName: String, objOrFunc: Object, funcName: String): void; - /** - * Attach event handlers to every item of the NodeList. Uses dojo.connect() - * so event properties are normalized. - * - * Application must manually require() "dojo/_base/connect" before using this method. - * - * @param methodName the name of the method to attach to. For DOM events, this should bethe lower-case name of the event - * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in - * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. - */ - connect(methodName: String, objOrFunc: Function, funcName: String): void; - /** - * Attach event handlers to every item of the NodeList. Uses dojo.connect() - * so event properties are normalized. - * - * Application must manually require() "dojo/_base/connect" before using this method. - * - * @param methodName the name of the method to attach to. For DOM events, this should bethe lower-case name of the event - * @param objOrFunc if 2 arguments are passed (methodName, objOrFunc), objOrFunc shouldreference a function or be the name of the function in the globalnamespace to attach. If 3 arguments are provided(methodName, objOrFunc, funcName), objOrFunc must be the scope tolocate the bound function in - * @param funcName Optionaloptional. A string naming the function in objOrFunc to bind to theevent. May also be a function reference. - */ - connect(methodName: String, objOrFunc: String, funcName: String): void; - /** - * Deprecated: Use position() for border-box x/y/w/h - * or marginBox() for margin-box w/h/l/t. - * Returns the box objects of all elements in a node list as - * an Array (not a NodeList). Acts like domGeom.coords, though assumes - * the node passed is each node in this list. - * - */ - coords(): void; - /** - * stash or get some arbitrary data on/from these nodes. - * Stash or get some arbitrary data on/from these nodes. This private _data function is - * exposed publicly on dojo/NodeList, eg: as the result of a dojo/query call. - * DIFFERS from jQuery.data in that when used as a getter, the entire list is ALWAYS - * returned. EVEN WHEN THE LIST IS length == 1. - * - * A single-node version of this function is provided as dojo._nodeData, which follows - * the same signature, though expects a String ID or DomNode reference in the first - * position, before key/value arguments. - * - * @param key OptionalIf an object, act as a setter and iterate over said object setting data items as defined.If a string, and value present, set the data for defined key to valueIf a string, and value absent, act as a getter, returning the data associated with said key - * @param value OptionalThe value to set for said key, provided key is a string (and not an object) - */ - data(key: Object, value: any): any; - /** - * stash or get some arbitrary data on/from these nodes. - * Stash or get some arbitrary data on/from these nodes. This private _data function is - * exposed publicly on dojo/NodeList, eg: as the result of a dojo/query call. - * DIFFERS from jQuery.data in that when used as a getter, the entire list is ALWAYS - * returned. EVEN WHEN THE LIST IS length == 1. - * - * A single-node version of this function is provided as dojo._nodeData, which follows - * the same signature, though expects a String ID or DomNode reference in the first - * position, before key/value arguments. - * - * @param key OptionalIf an object, act as a setter and iterate over said object setting data items as defined.If a string, and value present, set the data for defined key to valueIf a string, and value absent, act as a getter, returning the data associated with said key - * @param value OptionalThe value to set for said key, provided key is a string (and not an object) - */ - data(key: String, value: any): any; - /** - * Monitor nodes in this NodeList for [bubbled] events on nodes that match selector. - * Calls fn(evt) for those events, where (inside of fn()), this == the node - * that matches the selector. - * Sets up event handlers that can catch events on any subnodes matching a given selector, - * including nodes created after delegate() has been called. - * - * This allows an app to setup a single event handler on a high level node, rather than many - * event handlers on subnodes. For example, one onclick handler for a Tree widget, rather than separate - * handlers for each node in the tree. - * Since setting up many event handlers is expensive, this can increase performance. - * - * Note that delegate() will not work for events that don't bubble, like focus. - * onmouseenter/onmouseleave also don't currently work. - * - * @param selector CSS selector valid to dojo.query, like ".foo" or "div > span". Theselector is relative to the nodes in this NodeList, not the document root.For example myNodeList.delegate("> a", "onclick", ...) will catch events onanchor nodes which are (immediate) children of the nodes in myNodeList. - * @param eventName Standard event name used as an argument to dojo.connect, like "onclick". - * @param fn Callback function passed the event object, and where this == the node that matches the selector.That means that for example, after setting up a handler viadojo.query("body").delegate("fieldset", "onclick", ...)clicking on a fieldset or any nodes inside of a fieldset will be reportedas a click on the fieldset itself. - */ - delegate(selector: String, eventName: String, fn: Function): any; - /** - * Renders the specified template in each of the NodeList entries. - * - * @param template The template string or location - * @param context The context object or location - */ - dtl(template: dojox.dtl.__StringArgs , context: dojox.dtl.__ObjectArgs ): Function; - /** - * Renders the specified template in each of the NodeList entries. - * - * @param template The template string or location - * @param context The context object or location - */ - dtl(template: String, context: dojox.dtl.__ObjectArgs ): Function; - /** - * Renders the specified template in each of the NodeList entries. - * - * @param template The template string or location - * @param context The context object or location - */ - dtl(template: dojox.dtl.__StringArgs , context: Object): Function; - /** - * Renders the specified template in each of the NodeList entries. - * - * @param template The template string or location - * @param context The context object or location - */ - dtl(template: String, context: Object): Function; - /** - * clears all content from each node in the list. Effectively - * equivalent to removing all child nodes from every item in - * the list. - * - */ - empty(): any; - /** - * Ends use of the current NodeList by returning the previous NodeList - * that generated the current NodeList. - * Returns the NodeList that generated the current NodeList. If there - * is no parent NodeList, an empty NodeList is returned. - * - */ - end(): any; - /** - * Returns the even nodes in this dojo/NodeList as a dojo/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - */ - even(): any; - /** - * see dojo/_base/array.every() and the Array.every - * docs. - * Takes the same structure of arguments and returns as - * dojo/_base/array.every() with the caveat that the passed array is - * implicitly this NodeList - * - * @param callback the callback - * @param thisObject Optionalthe context - */ - every(callback: Function, thisObject: Object): any; - /** - * fade in all elements of this NodeList via dojo.fadeIn - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - fadeIn(args: Object): any; - /** - * fade out all elements of this NodeList via dojo.fadeOut - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - fadeOut(args: Object): any; - /** - * "masks" the built-in javascript filter() method (supported - * in Dojo via dojo.filter) to support passing a simple - * string filter in addition to supporting filtering function - * objects. - * - * @param filter If a string, a CSS rule like ".thinger" or "div > span". - */ - filter(filter: String): any; - /** - * "masks" the built-in javascript filter() method (supported - * in Dojo via dojo.filter) to support passing a simple - * string filter in addition to supporting filtering function - * objects. - * - * @param filter If a string, a CSS rule like ".thinger" or "div > span". - */ - filter(filter: Function): any; - /** - * Returns the first node in this dojo/NodeList as a dojo/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - */ - first(): any; - /** - * see dojo/_base/array.forEach(). The primary difference is that the acted-on - * array is implicitly this NodeList. If you want the option to break out - * of the forEach loop, use every() or some() instead. - * - * @param callback - * @param thisObj - */ - forEach(callback: any, thisObj: any): Function; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - html(value: String): any; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - html(value: HTMLElement): any; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - html(value: NodeList): any; - /** - * see dojo/_base/array.indexOf(). The primary difference is that the acted-on - * array is implicitly this NodeList - * For more details on the behavior of indexOf, see Mozilla's - * indexOf - * docs - * - * @param value The value to search for. - * @param fromIndex OptionalThe location to start searching from. Optional. Defaults to 0. - */ - indexOf(value: Object, fromIndex: number): any; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - innerHTML(value: String): any; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - innerHTML(value: HTMLElement): any; - /** - * allows setting the innerHTML of each node in the NodeList, - * if there is a value passed in, otherwise, reads the innerHTML value of the first node. - * This method is simpler than the dojo/NodeList.html() method provided by - * dojo/NodeList-html. This method just does proper innerHTML insertion of HTML fragments, - * and it allows for the innerHTML to be read for the first node in the node list. - * Since dojo/NodeList-html already took the "html" name, this method is called - * "innerHTML". However, if dojo/NodeList-html has not been loaded yet, this - * module will define an "html" method that can be used instead. Be careful if you - * are working in an environment where it is possible that dojo/NodeList-html could - * have been loaded, since its definition of "html" will take precedence. - * The nodes represented by the value argument will be cloned if more than one - * node is in this NodeList. The nodes in this NodeList are returned in the "set" - * usage of this method, not the HTML that was inserted. - * - * @param value Optional - */ - innerHTML(value: NodeList): any; - /** - * The nodes in this NodeList will be placed after the nodes - * matched by the query passed to insertAfter. - * The nodes in this NodeList will be cloned if the query - * matches more than one element. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param query - */ - insertAfter(query: String): any; - /** - * The nodes in this NodeList will be placed after the nodes - * matched by the query passed to insertAfter. - * The nodes in this NodeList will be cloned if the query - * matches more than one element. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param query - */ - insertBefore(query: String): any; - /** - * Create a new instance of a specified class, using the - * specified properties and each node in the NodeList as a - * srcNodeRef. - * - * @param declaredClass - * @param properties Optional - */ - instantiate(declaredClass: String, properties: Object): any; - /** - * Create a new instance of a specified class, using the - * specified properties and each node in the NodeList as a - * srcNodeRef. - * - * @param declaredClass - * @param properties Optional - */ - instantiate(declaredClass: Object, properties: Object): any; - /** - * Returns the last node in this dojo/NodeList as a dojo/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - */ - last(): any; - /** - * see dojo/_base/array.lastIndexOf(). The primary difference is that the - * acted-on array is implicitly this NodeList - * For more details on the behavior of lastIndexOf, see - * Mozilla's lastIndexOf - * docs - * - * @param value The value to search for. - * @param fromIndex OptionalThe location to start searching from. Optional. Defaults to 0. - */ - lastIndexOf(value: Object, fromIndex: number): any; - /** - * see dojo/_base/array.map(). The primary difference is that the acted-on - * array is implicitly this NodeList and the return is a - * NodeList (a subclass of Array) - * - * @param func - * @param obj Optional - */ - map(func: Function, obj: Function): any; - /** - * Returns margin-box size of nodes - * - */ - marginBox(): void; - /** - * Returns the next element for nodes in this dojo/NodeList. - * Optionally takes a query to filter the next elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - next(query: String): any; - /** - * Returns all sibling elements that come after the nodes in this dojo/NodeList. - * Optionally takes a query to filter the sibling elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - nextAll(query: String): any; - /** - * Returns the odd nodes in this dojo/NodeList as a dojo/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - */ - odd(): any; - /** - * Listen for events on the nodes in the NodeList. Basic usage is: - * - * @param eventName - * @param listener - */ - on(eventName: any, listener: any): any; - /** - * removes elements in this list that match the filter - * from their parents and returns them as a new NodeList. - * - * @param filter OptionalCSS selector like ".foo" or "div > span" - */ - orphan(filter: String): any; - /** - * Returns immediate parent elements for nodes in this dojo/NodeList. - * Optionally takes a query to filter the parent elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - parent(query: String): any; - /** - * Returns all parent elements for nodes in this dojo/NodeList. - * Optionally takes a query to filter the child elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - parents(query: String): any; - /** - * places elements of this node list relative to the first element matched - * by queryOrNode. Returns the original NodeList. See: dojo/dom-construct.place - * - * @param queryOrNode may be a string representing any valid CSS3 selector or a DOM node.In the selector case, only the first matching element will be usedfor relative positioning. - * @param position can be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property - */ - place(queryOrNode: String, position: String): any; - /** - * places elements of this node list relative to the first element matched - * by queryOrNode. Returns the original NodeList. See: dojo/dom-construct.place - * - * @param queryOrNode may be a string representing any valid CSS3 selector or a DOM node.In the selector case, only the first matching element will be usedfor relative positioning. - * @param position can be one of:"last" (default)"first""before""after""only""replace"or an offset in the childNodes property - */ - place(queryOrNode: HTMLElement, position: String): any; - /** - * Returns border-box objects (x/y/w/h) of all elements in a node list - * as an Array (not a NodeList). Acts like dojo/dom-geometry-position, though - * assumes the node passed is each node in this list. - * - */ - position(): any; - /** - * prepends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - prepend(content: String): any; - /** - * prepends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - prepend(content: HTMLElement): any; - /** - * prepends the content to every node in the NodeList. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - prepend(content: NodeList): any; - /** - * prepends nodes in this NodeList to the nodes matched by - * the query passed to prependTo. - * The nodes in this NodeList will be cloned if the query - * matches more than one element. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param query - */ - prependTo(query: String): any; - /** - * Returns the previous element for nodes in this dojo/NodeList. - * Optionally takes a query to filter the previous elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - prev(query: String): any; - /** - * Returns all sibling elements that come before the nodes in this dojo/NodeList. - * Optionally takes a query to filter the sibling elements. - * The returned nodes will be in reverse DOM order -- the first node in the list will - * be the node closest to the original node/NodeList. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - prevAll(query: String): any; - /** - * Returns a new list whose members match the passed query, - * assuming elements of the current NodeList as the root for - * each search. - * - * @param queryStr - */ - query(queryStr: String): any; - /** - * removes elements in this list that match the filter - * from their parents and returns them as a new NodeList. - * - * @param filter OptionalCSS selector like ".foo" or "div > span" - */ - remove(filter: String): any; - /** - * Removes an attribute from each node in the list. - * - * @param name the name of the attribute to remove - */ - removeAttr(name: String): void; - /** - * removes the specified class from every node in the list - * - * @param className OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. - */ - removeClass(className: String): any; - /** - * removes the specified class from every node in the list - * - * @param className OptionalAn optional String class name to remove, or several space-separatedclass names, or an array of class names. If omitted, all class nameswill be deleted. - */ - removeClass(className: any[]): any; - /** - * Animate the effect of removing a class to all nodes in this list. - * see dojox.fx.removeClass - * - * @param cssClass - * @param args - */ - removeClassFx(cssClass: any, args: any): {type:Function;value:any}; - /** - * Remove the data associated with these nodes. - * - * @param key OptionalIf omitted, clean all data for this node.If passed, remove the data item found at key - */ - removeData(key: String): void; - /** - * replaces nodes matched by the query passed to replaceAll with the nodes - * in this NodeList. - * The nodes in this NodeList will be cloned if the query - * matches more than one element. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param query - */ - replaceAll(query: String): any; - /** - * Replaces one or more classes on a node if not present. - * Operates more quickly than calling removeClass() and addClass() - * - * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. - * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. - */ - replaceClass(addClassStr: String, removeClassStr: String): void; - /** - * Replaces one or more classes on a node if not present. - * Operates more quickly than calling removeClass() and addClass() - * - * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. - * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. - */ - replaceClass(addClassStr: any[], removeClassStr: String): void; - /** - * Replaces one or more classes on a node if not present. - * Operates more quickly than calling removeClass() and addClass() - * - * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. - * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. - */ - replaceClass(addClassStr: String, removeClassStr: any[]): void; - /** - * Replaces one or more classes on a node if not present. - * Operates more quickly than calling removeClass() and addClass() - * - * @param addClassStr A String class name to add, or several space-separated class names,or an array of class names. - * @param removeClassStr OptionalA String class name to remove, or several space-separated class names,or an array of class names. - */ - replaceClass(addClassStr: any[], removeClassStr: any[]): void; - /** - * Replaces each node in ths NodeList with the content passed to replaceWith. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - replaceWith(content: String): any; - /** - * Replaces each node in ths NodeList with the content passed to replaceWith. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - replaceWith(content: HTMLElement): any; - /** - * Replaces each node in ths NodeList with the content passed to replaceWith. - * The content will be cloned if the length of NodeList - * is greater than 1. Only the DOM nodes are cloned, not - * any attached event handlers. - * - * @param content - */ - replaceWith(content: NodeList): any; - /** - * Returns all sibling elements for nodes in this dojo/NodeList. - * Optionally takes a query to filter the sibling elements. - * .end() can be used on the returned dojo/NodeList to get back to the - * original dojo/NodeList. - * - * @param query Optionala CSS selector. - */ - siblings(query: String): any; - /** - * Returns a new NodeList, maintaining this one in place - * This method behaves exactly like the Array.slice method - * with the caveat that it returns a dojo/NodeList and not a - * raw Array. For more details, see Mozilla's slice - * documentation - * - * @param begin Can be a positive or negative integer, with positiveintegers noting the offset to begin at, and negativeintegers denoting an offset from the end (i.e., to the leftof the end) - * @param end OptionalOptional parameter to describe what position relative tothe NodeList's zero index to end the slice at. Like begin,can be positive or negative. - */ - slice(begin: number, end: number): any; - /** - * slide all elements of the node list to the specified place via dojo/fx.slideTo() - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - slideTo(args: Object): any; - /** - * Takes the same structure of arguments and returns as - * dojo/_base/array.some() with the caveat that the passed array is - * implicitly this NodeList. See dojo/_base/array.some() and Mozilla's - * Array.some - * documentation. - * - * @param callback the callback - * @param thisObject Optionalthe context - */ - some(callback: Function, thisObject: Object): any; - /** - * Returns a new NodeList, manipulating this NodeList based on - * the arguments passed, potentially splicing in new elements - * at an offset, optionally deleting elements - * This method behaves exactly like the Array.splice method - * with the caveat that it returns a dojo/NodeList and not a - * raw Array. For more details, see Mozilla's splice - * documentation - * For backwards compatibility, calling .end() on the spliced NodeList - * does not return the original NodeList -- splice alters the NodeList in place. - * - * @param index begin can be a positive or negative integer, with positiveintegers noting the offset to begin at, and negativeintegers denoting an offset from the end (i.e., to the leftof the end) - * @param howmany OptionalOptional parameter to describe what position relative tothe NodeList's zero index to end the slice at. Like begin,can be positive or negative. - * @param item OptionalAny number of optional parameters may be passed in to bespliced into the NodeList - */ - splice(index: number, howmany: number, item: Object[]): any; - /** - * gets or sets the CSS property for every element in the NodeList - * - * @param property the CSS property to get/set, in JavaScript notation("lineHieght" instead of "line-height") - * @param value Optionaloptional. The value to set the property to - */ - style(property: String, value: String): any; - /** - * allows setting the text value of each node in the NodeList, - * if there is a value passed in, otherwise, returns the text value for all the - * nodes in the NodeList in one string. - * - * @param value - */ - text(value: String): any; - /** - * Adds a class to node if not present, or removes if present. - * Pass a boolean condition if you want to explicitly add or remove. - * - * @param className the CSS class to add - * @param condition OptionalIf passed, true means to add the class, false means to remove. - */ - toggleClass(className: String, condition: boolean): void; - /** - * Animate the effect of adding or removing a class to all nodes in this list. - * see dojox.fx.toggleClass - * - * @param cssClass - * @param force - * @param args - */ - toggleClassFx(cssClass: any, force: any, args: any): {type:Function;value:any}; - /** - * - */ - toString(): any; - /** - * If a value is passed, allows seting the value property of form elements in this - * NodeList, or properly selecting/checking the right value for radio/checkbox/select - * elements. If no value is passed, the value of the first node in this NodeList - * is returned. - * - * @param value - */ - val(value: String): any; - /** - * If a value is passed, allows seting the value property of form elements in this - * NodeList, or properly selecting/checking the right value for radio/checkbox/select - * elements. If no value is passed, the value of the first node in this NodeList - * is returned. - * - * @param value - */ - val(value: any[]): any; - /** - * wipe in all elements of this NodeList via dojo/fx.wipeIn() - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - wipeIn(args: Object): any; - /** - * wipe out all elements of this NodeList via dojo/fx.wipeOut() - * - * @param args OptionalAdditional dojo/_base/fx.Animation arguments to mix into this set with the addition ofan auto parameter. - */ - wipeOut(args: Object): any; - /** - * Wrap each node in the NodeList with html passed to wrap. - * html will be cloned if the NodeList has more than one - * element. Only DOM nodes are cloned, not any attached - * event handlers. - * - * @param html - */ - wrap(html: String): any; - /** - * Wrap each node in the NodeList with html passed to wrap. - * html will be cloned if the NodeList has more than one - * element. Only DOM nodes are cloned, not any attached - * event handlers. - * - * @param html - */ - wrap(html: HTMLElement): any; - /** - * Insert html where the first node in this NodeList lives, then place all - * nodes in this NodeList as the child of the html. - * - * @param html - */ - wrapAll(html: String): any; - /** - * Insert html where the first node in this NodeList lives, then place all - * nodes in this NodeList as the child of the html. - * - * @param html - */ - wrapAll(html: HTMLElement): any; - /** - * For each node in the NodeList, wrap all its children with the passed in html. - * html will be cloned if the NodeList has more than one - * element. Only DOM nodes are cloned, not any attached - * event handlers. - * - * @param html - */ - wrapInner(html: String): any; - /** - * For each node in the NodeList, wrap all its children with the passed in html. - * html will be cloned if the NodeList has more than one - * element. Only DOM nodes are cloned, not any attached - * event handlers. - * - * @param html - */ - wrapInner(html: HTMLElement): any; - } - module NodeList { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/NodeList._nodeDataCache.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_OnDijitClickMixin.a11yclick.html * + * Custom press, release, and click synthetic events + * which trigger on a left mouse click, touch, or space/enter keyup. * */ - interface _nodeDataCache { + interface a11yclick { + /** + * Logical click operation for mouse, touch, or keyboard (space/enter key) + * + * @param node + * @param listener + */ + click(node: any, listener: any): void; + /** + * Mouse cursor or a finger is dragged over the given node. + * + * @param node + * @param listener + */ + move(node: any, listener: any): void; + /** + * Mousedown (left button), touchstart, or keydown (space or enter) corresponding to logical click operation. + * + * @param node + * @param listener + */ + press(node: any, listener: any): void; + /** + * Mouseup (left button), touchend, or keyup (space or enter) corresponding to logical click operation. + * + * @param node + * @param listener + */ + release(node: any, listener: any): void; } } /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/Stateful.html + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_PaletteMixin.html * - * Base class for objects that provide named properties with optional getter/setter - * control and the ability to watch for property changes - * - * The class also provides the functionality to auto-magically manage getters - * and setters for object attributes/properties. - * - * Getters and Setters should follow the format of _xxxGetter or _xxxSetter where - * the xxx is a name of the attribute to handle. So an attribute of "foo" - * would have a custom getter of _fooGetter and a custom setter of _fooSetter. + * A keyboard accessible palette, for picking a color/emoticon/etc. + * A mixin for a grid showing various entities, so the user can pick a certain entity. * */ - class Stateful { + class _PaletteMixin extends dijit._CssStateMixin { constructor(); /** - * Get a property on a Stateful instance. - * Get a named property on a Stateful object. The property may - * potentially be retrieved via a getter method in subclasses. In the base class - * this just retrieves the object's property. + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + /** + * CSS class applied to each cell in the palette + * + */ + "cellClass": string; + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + /** + * Number of milliseconds before a held key or button becomes typematic + * + */ + "defaultTimeout": number; + /** + * Constructor for Object created for each cell of the palette. + * dyeClass should implement the dijit/_PaletteMixin.__Dye interface. + * + */ + "dyeClass": Object; + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + /** + * Widget tab index. + * + */ + "tabIndex": string; + /** + * Fraction of time used to change the typematic timer between events + * 1.0 means that each typematic event fires at defaultTimeout intervals + * Less than 1.0 means that each typematic event fires at an increasing faster rate + * + */ + "timeoutChangeRate": number; + /** + * Currently selected color/emoticon/etc. + * + */ + "value": string; + /** + * Focus this widget. Puts focus on the most recently focused cell. + * + */ + focus(): void; + /** + * + */ + postCreate(): void; + /** + * Callback when a cell is selected. + * + * @param value Value corresponding to cell. + */ + onChange(value: String): void; + } + module _PaletteMixin { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_PaletteMixin.__Dye.html + * + * Interface for the JS Object associated with a palette cell (i.e. DOMNode) + * + * @param alias + * @param row + * @param col + */ + class __Dye { + constructor(alias: String, row: any, col: any); + /** + * Add cell DOMNode inner structure + * + * @param cell The surrounding cell + * @param blankGif URL for blank cell image + */ + fillCell(cell: HTMLElement, blankGif: String): void; + /** + * Return "value" of cell; meaning of "value" varies by subclass. + * For example color hex value, emoticon ascii value etc, entity hex value. + * + */ + getValue(): void; + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_TemplatedMixin.html + * + * Mixin for widgets that are instantiated from a template + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. + */ + class _TemplatedMixin extends dijit._AttachMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + /** + * + */ + "searchContainerNode": boolean; + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + /** + * A string that represents the widget template. + * Use in conjunction with dojo.cache() to load from a file. + * + */ + "templateString": string; + /** + * Construct the UI for this widget from a template, setting this.domNode. + * + */ + buildRendering(): void; + /** + * + */ + destroyRendering(): void; + /** + * Static method to get a template based on the templatePath or + * templateString key + * + * @param templateString The template + * @param alwaysUseString Don't cache the DOM tree for this template, even if it doesn't have any variables + * @param doc OptionalThe target document. Defaults to document global if unspecified. + */ + getCachedTemplate(templateString: String, alwaysUseString: boolean, doc: HTMLDocument): any; + } + module _TemplatedMixin { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_TemplatedMixin._templateCache.html + * + * + */ + interface _templateCache { + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_Templated.html + * + * Deprecated mixin for widgets that are instantiated from a template. + * Widgets should use _TemplatedMixin plus if necessary _WidgetsInTemplateMixin instead. + * + */ + class _Templated extends dijit._TemplatedMixin implements dijit._WidgetsInTemplateMixin { + constructor(); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + /** + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. + * + */ + "contextRequire": Function; + /** + * + */ + "searchContainerNode": boolean; + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + /** + * A string that represents the widget template. + * Use in conjunction with dojo.cache() to load from a file. + * + */ + "templateString": string; + /** + * Should we parse the template to find widgets that might be + * declared in markup inside it? False by default. + * + */ + "widgetsInTemplate": boolean; + /** + * Construct the UI for this widget from a template, setting this.domNode. + * + */ + buildRendering(): void; + /** + * + */ + destroyRendering(): void; + /** + * + */ + startup(): void; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_MenuBase.html + * + * Abstract base class for Menu and MenuBar. + * Subclass should implement _onUpArrow(), _onDownArrow(), _onLeftArrow(), and _onRightArrow(). + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _MenuBase extends dijit._Widget implements dijit._TemplatedMixin, dijit._KeyNavContainer, dijit._CssStateMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * This Menu has been clicked (mouse or via space/arrow key) or opened as a submenu, + * so mere mouseover will open submenus. Focusing a menu via TAB does NOT automatically make it active + * since TAB is a navigation operation and not a selection one. + * For Windows apps, pressing the ALT key focuses the menubar menus (similar to TAB navigation) but the + * menu is not active (ie no dropdown) until an item is clicked. + * + */ + "activated": boolean; + set(property:"activated", value: boolean): void; + get(property:"activated"): boolean; + watch(property:"activated", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * A toggle to control whether or not a Menu gets focused when opened as a drop down from a MenuBar + * or DropDownButton/ComboButton. Note though that it always get focused when opened via the keyboard. + * + */ + "autoFocus": boolean; + set(property:"autoFocus", value: boolean): void; + get(property:"autoFocus"): boolean; + watch(property:"autoFocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The currently focused child widget, or null if there isn't one + * + */ + "focusedChild": Object; + set(property:"focusedChild", value: Object): void; + get(property:"focusedChild"): Object; + watch(property:"focusedChild", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * If multiple characters are typed where each keystroke happens within + * multiCharSearchDuration of the previous keystroke, + * search for nodes matching all the keystrokes. + * + * For example, typing "ab" will search for entries starting with + * "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration. + * + */ + "multiCharSearchDuration": number; + set(property:"multiCharSearchDuration", value: number): void; + get(property:"multiCharSearchDuration"): number; + watch(property:"multiCharSearchDuration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to menu that displayed me + * + */ + "parentMenu": Object; + set(property:"parentMenu", value: Object): void; + get(property:"parentMenu"): Object; + watch(property:"parentMenu", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * For a passive (unclicked) Menu, number of milliseconds before hovering (without clicking) will cause + * the popup to open. Default is Infinity, meaning you need to click the menu to open it. + * + */ + "passivePopupDelay": number; + set(property:"passivePopupDelay", value: number): void; + get(property:"passivePopupDelay"): number; + watch(property:"passivePopupDelay", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * After a menu has been activated (by clicking on it etc.), number of milliseconds before hovering + * (without clicking) another MenuItem causes that MenuItem's popup to automatically open. + * + */ + "popupDelay": number; + set(property:"popupDelay", value: number): void; + get(property:"popupDelay"): number; + watch(property:"popupDelay", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Currently selected (a.k.a. highlighted) MenuItem, or null if no MenuItem is selected. + * If a submenu is open, will be set to MenuItem that displayed the submenu. OTOH, if + * this Menu is in passive mode (i.e. hasn't been clicked yet), will be null, because + * "selected" is not merely "hovered". + * + */ + "selected": Object; + set(property:"selected", value: Object): void; + get(property:"selected"): Object; + watch(property:"selected", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * A string that represents the widget template. + * Use in conjunction with dojo.cache() to load from a file. + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Selector (passed to on.selector()) used to identify MenuItem child widgets, but exclude inert children + * like MenuSeparator. If subclass overrides to a string (ex: "> *"), the subclass must require dojo/query. + * + * @param node + */ + childSelector(node: HTMLElement): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Deprecated. You can call this in postCreate() to attach the keyboard handlers to the container, + * but the preferred method is to override _onLeftArrow() and _onRightArrow(), or + * _onUpArrow() and _onDownArrow(), to call focusPrev() and focusNext(). + * + * @param prevKeyCodes Key codes for navigating to the previous child. + * @param nextKeyCodes Key codes for navigating to the next child. + */ + connectKeyNavHandlers(prevKeyCodes: dojo.keys, nextKeyCodes: dojo.keys): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Default focus() implementation: focus the first child. + * + */ + focus(): void; + /** + * Focus specified child widget. + * + * @param widget Reference to container's child widget + * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one + */ + focusChild(widget: dijit._WidgetBase, last: boolean): void; + /** + * Focus the first focusable child in the container. + * + */ + focusFirstChild(): void; + /** + * Focus the last focusable child in the container. + * + */ + focusLastChild(): void; + /** + * Focus the next widget + * + */ + focusNext(): void; + /** + * Focus the last focusable node in the previous widget + * (ex: go to the ComboButton icon section rather than button section) + * + */ + focusPrev(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 * * @param name The property to get. */ - get(name: String): any; + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; /** * - * @param params Optional + * @param type protected + * @param func */ - postscript(params: Object): void; + on(type: String, func: Function): any; /** - * Set a property on a Stateful instance - * Sets named properties on a stateful object and notifies any watchers of - * the property. A programmatic setter may be defined in subclasses. + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) * * @param name The property to set. * @param value The value to set in the property. */ - set(name: String, value: Object): any; + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * + */ + startupKeyNavChildren(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; /** * Watches a property for changes * @@ -3123,962 +1790,13250 @@ declare module dojo { * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. */ watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * 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. + * + * @param closeAll + */ + onCancel(closeAll: boolean): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * 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. + * + */ + onExecute(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Called when cursor is over a MenuItem. + * + * @param item + */ + onItemHover(item: dijit.MenuItem): void; + /** + * Callback fires when mouse exits a MenuItem + * + * @param item + */ + onItemUnhover(item: dijit.MenuItem): void; + /** + * Attach point for notification about when a menu item has been searched for + * via the keyboard search mechanism. + * + * @param item + * @param evt + * @param searchString + * @param numMatches + */ + onKeyboardSearch(item: dijit.MenuItem, evt: Event, searchString: String, numMatches: number): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; } - module _base { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_WidgetsInTemplateMixin.html + * + * Mixin to supplement _TemplatedMixin when template contains widgets + * + */ + class _WidgetsInTemplateMixin { + constructor(); /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/declare.html - * - * Create a feature-rich constructor from compact notation. - * Create a constructor using a compact notation for inheritance and - * prototype extension. + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. * - * Mixin ancestors provide a type of multiple inheritance. - * Prototypes of mixin ancestors are copied to the new class: - * changes to mixin prototypes will not affect classes to which - * they have been mixed in. - * - * Ancestors can be compound classes created by this version of - * declare(). In complex cases all base classes are going to be - * linearized according to C3 MRO algorithm - * (see http://www.python.org/download/releases/2.3/mro/ for more - * details). - * - * "className" is cached in "declaredClass" property of the new class, - * if it was supplied. The immediate super class will be cached in - * "superclass" property of the new class. - * - * Methods in "props" will be copied and modified: "nom" property - * (the declared name of the method) will be added to all copied - * functions to help identify them for the internal machinery. Be - * very careful, while reusing methods: if you use the same - * function under different names, it can produce errors in some - * cases. - * - * It is possible to use constructors created "manually" (without - * declare()) as bases. They will be called as usual during the - * creation of an instance, their methods will be chained, and even - * called by "this.inherited()". - * - * Special property "-chains-" governs how to chain methods. It is - * a dictionary, which uses method names as keys, and hint strings - * as values. If a hint string is "after", this method will be - * called after methods of its base classes. If a hint string is - * "before", this method will be called before methods of its base - * classes. - * - * If "constructor" is not mentioned in "-chains-" property, it will - * be chained using the legacy mode: using "after" chaining, - * calling preamble() method before each constructor, if available, - * and calling postscript() after all constructors were executed. - * If the hint is "after", it is chained as a regular method, but - * postscript() will be called after the chain of constructors. - * "constructor" cannot be chained "before", but it allows - * a special hint string: "manual", which means that constructors - * are not going to be chained in any way, and programmer will call - * them manually using this.inherited(). In the latter case - * postscript() will be called after the construction. - * - * All chaining hints are "inherited" from base classes and - * potentially can be overridden. Be very careful when overriding - * hints! Make sure that all chained methods can work in a proposed - * manner of chaining. - * - * Once a method was chained, it is impossible to unchain it. The - * only exception is "constructor". You don't need to define a - * method in order to supply a chaining hint. - * - * If a method is chained, it cannot use this.inherited() because - * all other methods in the hierarchy will be called automatically. - * - * Usually constructors and initializers of any kind are chained - * using "after" and destructors of any kind are chained as - * "before". Note that chaining assumes that chained methods do not - * return any value: any returned value will be discarded. - * - * @param className OptionalThe optional name of the constructor (loosely, a "class")stored in the "declaredClass" property in the created prototype.It will be used as a global name for a created constructor. - * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). - * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". */ - interface declare { (className?: String, superclass?: any, props?: Object): any} + "contextRequire": Function; /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/declare.html - * - * Create a feature-rich constructor from compact notation. - * Create a constructor using a compact notation for inheritance and - * prototype extension. + * Should we parse the template to find widgets that might be + * declared in markup inside it? (Remove for 2.0 and assume true) * - * Mixin ancestors provide a type of multiple inheritance. - * Prototypes of mixin ancestors are copied to the new class: - * changes to mixin prototypes will not affect classes to which - * they have been mixed in. - * - * Ancestors can be compound classes created by this version of - * declare(). In complex cases all base classes are going to be - * linearized according to C3 MRO algorithm - * (see http://www.python.org/download/releases/2.3/mro/ for more - * details). - * - * "className" is cached in "declaredClass" property of the new class, - * if it was supplied. The immediate super class will be cached in - * "superclass" property of the new class. - * - * Methods in "props" will be copied and modified: "nom" property - * (the declared name of the method) will be added to all copied - * functions to help identify them for the internal machinery. Be - * very careful, while reusing methods: if you use the same - * function under different names, it can produce errors in some - * cases. - * - * It is possible to use constructors created "manually" (without - * declare()) as bases. They will be called as usual during the - * creation of an instance, their methods will be chained, and even - * called by "this.inherited()". - * - * Special property "-chains-" governs how to chain methods. It is - * a dictionary, which uses method names as keys, and hint strings - * as values. If a hint string is "after", this method will be - * called after methods of its base classes. If a hint string is - * "before", this method will be called before methods of its base - * classes. - * - * If "constructor" is not mentioned in "-chains-" property, it will - * be chained using the legacy mode: using "after" chaining, - * calling preamble() method before each constructor, if available, - * and calling postscript() after all constructors were executed. - * If the hint is "after", it is chained as a regular method, but - * postscript() will be called after the chain of constructors. - * "constructor" cannot be chained "before", but it allows - * a special hint string: "manual", which means that constructors - * are not going to be chained in any way, and programmer will call - * them manually using this.inherited(). In the latter case - * postscript() will be called after the construction. - * - * All chaining hints are "inherited" from base classes and - * potentially can be overridden. Be very careful when overriding - * hints! Make sure that all chained methods can work in a proposed - * manner of chaining. - * - * Once a method was chained, it is impossible to unchain it. The - * only exception is "constructor". You don't need to define a - * method in order to supply a chaining hint. - * - * If a method is chained, it cannot use this.inherited() because - * all other methods in the hierarchy will be called automatically. - * - * Usually constructors and initializers of any kind are chained - * using "after" and destructors of any kind are chained as - * "before". Note that chaining assumes that chained methods do not - * return any value: any returned value will be discarded. - * - * @param className OptionalThe optional name of the constructor (loosely, a "class")stored in the "declaredClass" property in the created prototype.It will be used as a global name for a created constructor. - * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). - * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". */ - interface declare{(className?: String, superclass?: any[], props?: Object): any} - interface declare { - /** - * Mix in properties skipping a constructor and decorating functions - * like it is done by declare(). - * This function is used to mix in properties like lang.mixin does, - * but it skips a constructor property and decorates functions like - * declare() does. - * - * It is meant to be used with classes and objects produced with - * declare. Functions mixed in with dojo.safeMixin can use - * this.inherited() like normal methods. - * - * This function is used to implement extend() method of a constructor - * produced with declare(). - * - * @param target Target object to accept new properties. - * @param source Source object for new properties. - */ - safeMixin(target: Object, source: Object): Object; - } - - module declare { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/declare.__DeclareCreatedObject.html - * - * dojo/_base/declare() returns a constructor C. new C() returns an Object with the following - * methods, in addition to the methods and properties specified via the arguments passed to declare(). - * - */ - class __DeclareCreatedObject { - constructor(); - /** - * Create a subclass of the declared class from a list of base classes. - * Create a constructor using a compact notation for inheritance and - * prototype extension. - * - * Mixin ancestors provide a type of multiple inheritance. - * Prototypes of mixin ancestors are copied to the new class: - * changes to mixin prototypes will not affect classes to which - * they have been mixed in. - * - * @param mixins Specifies a list of bases (the left-most one is the most deepestbase). - * @param props OptionalAn optional object whose properties are copied to the created prototype. - */ - createSubclass(mixins: Function[], props: Object): dojo._base.declare.__DeclareCreatedObject; - /** - * Adds all properties and methods of source to constructor's - * prototype, making them available to all instances created with - * constructor. This method is specific to constructors created with - * declare(). - * Adds source properties to the constructor's prototype. It can - * override existing properties. - * - * This method is similar to dojo.extend function, but it is specific - * to constructors produced by declare(). It is implemented - * using dojo.safeMixin, and it skips a constructor property, - * and properly decorates copied functions. - * - * @param source Source object which properties are going to be copied to theconstructor's prototype. - */ - extend(source: Object): void; - /** - * Returns a super method. - * This method is a convenience method for "this.inherited()". - * It uses the same algorithm but instead of executing a super - * method, it returns it, or "undefined" if not found. - * - * @param name OptionalThe optional method name. Should be the same as the caller'sname. Usually "name" is specified in complex dynamic cases, whenthe calling method was dynamically added, undecorated bydeclare(), and it cannot be determined. - * @param args The caller supply this argument, which should be the original"arguments". - */ - getInherited(name: String, args: Object): any; - /** - * Calls a super method. - * This method is used inside method of classes produced with - * declare() to call a super method (next in the chain). It is - * used for manually controlled chaining. Consider using the regular - * chaining, because it is faster. Use "this.inherited()" only in - * complex cases. - * - * This method cannot me called from automatically chained - * constructors including the case of a special (legacy) - * constructor chaining. It cannot be called from chained methods. - * - * If "this.inherited()" cannot find the next-in-chain method, it - * does nothing and returns "undefined". The last method in chain - * can be a default method implemented in Object, which will be - * called last. - * - * If "name" is specified, it is assumed that the method that - * received "args" is the parent method for this call. It is looked - * up in the chain list and if it is found the next-in-chain method - * is called. If it is not found, the first-in-chain method is - * called. - * - * If "name" is not specified, it will be derived from the calling - * method (using a methoid property "nom"). - * - * @param name OptionalThe optional method name. Should be the same as the caller'sname. Usually "name" is specified in complex dynamic cases, whenthe calling method was dynamically added, undecorated bydeclare(), and it cannot be determined. - * @param args The caller supply this argument, which should be the original"arguments". - * @param newArgs OptionalIf "true", the found function will be returned withoutexecuting it.If Array, it will be used to call a super method. Otherwise"args" will be used. - */ - inherited(name: String, args: Object, newArgs: Object): any; - /** - * Checks the inheritance chain to see if it is inherited from this - * class. - * This method is used with instances of classes produced with - * declare() to determine of they support a certain interface or - * not. It models "instanceof" operator. - * - * @param cls Class constructor. - */ - isInstanceOf(cls: Function): any; - } - } - + "widgetsInTemplate": boolean; /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/Deferred.html - * - * Deprecated. This module defines the legacy dojo/_base/Deferred API. - * New code should use dojo/Deferred instead. - * The Deferred API is based on the concept of promises that provide a - * generic interface into the eventual completion of an asynchronous action. - * The motivation for promises fundamentally is about creating a - * separation of concerns that allows one to achieve the same type of - * call patterns and logical data flow in asynchronous code as can be - * achieved in synchronous code. Promises allows one - * to be able to call a function purely with arguments needed for - * execution, without conflating the call with concerns of whether it is - * sync or async. One shouldn't need to alter a call's arguments if the - * implementation switches from sync to async (or vice versa). By having - * async functions return promises, the concerns of making the call are - * separated from the concerns of asynchronous interaction (which are - * handled by the promise). * - * The Deferred is a type of promise that provides methods for fulfilling the - * promise with a successful result or an error. The most important method for - * working with Dojo's promises is the then() method, which follows the - * CommonJS proposed promise API. An example of using a Dojo promise: + */ + startup(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_WidgetBase.html + * + * Future base class for all Dijit widgets. + * Future base class for all Dijit widgets. + * _Widget extends this class adding support for various features needed by desktop. + * + * Provides stubs for widget lifecycle methods for subclasses to extend, like postMixInProperties(), buildRendering(), + * postCreate(), startup(), and destroy(), and also public API methods like set(), get(), and watch(). + * + * Widgets can provide custom setters/getters for widget attributes, which are called automatically by set(name, value). + * For an attribute XXX, define methods _setXXXAttr() and/or _getXXXAttr(). + * + * _setXXXAttr can also be a string/hash/array mapping from a widget attribute XXX to the widget's DOMNodes: + * + * DOM node attribute + * _setFocusAttr: {node: "focusNode", type: "attribute"} + * _setFocusAttr: "focusNode" (shorthand) + * _setFocusAttr: "" (shorthand, maps to this.domNode) + * Maps this.focus to this.focusNode.focus, or (last example) this.domNode.focus + * + * DOM node innerHTML + * _setTitleAttr: { node: "titleNode", type: "innerHTML" } + * Maps this.title to this.titleNode.innerHTML + * + * DOM node innerText + * _setTitleAttr: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * DOM node CSS class + * _setMyClassAttr: { node: "domNode", type: "class" } + * Maps this.myClass to this.domNode.className + * + * If the value of _setXXXAttr is an array, then each element in the array matches one of the + * formats of the above list. + * + * If the custom setter is null, no action is performed other than saving the new value + * in the widget (in this). + * + * If no custom setter is defined for an attribute, then it will be copied + * to this.focusNode (if the widget defines a focusNode), or this.domNode otherwise. + * That's only done though for attributes that match DOMNode attributes (title, + * alt, aria-labelledby, etc.) + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _WidgetBase extends dojo.Stateful implements dijit.Destroyable { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. * - * var resultingPromise = someAsyncOperation.then(function(result){ - * ... handle result ... - * }, - * function(error){ - * ... handle error ... + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": Object; + set(property:"style", value: Object): void; + get(property:"style"): Object; + watch(property:"style", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj?: Object, callbackArgs?: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + */ + isValid: any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: String, func: Function): {remove:{():void}}; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: Function, func: Function): {remove:{():void}}; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(handle:any): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position?: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position?: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position?: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position?: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position?: number): any; + /** + * Processing after the DOM fragment is created + * Called after the DOM fragment has been created, but not necessarily + * added to the document. Do not include any operations which rely on + * node dimensions or placement. + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 * }); - * The .then() call returns a new promise that represents the result of the - * execution of the callback. The callbacks will never affect the original promises value. + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) * - * The Deferred instances also provide the following functions for backwards compatibility: - * - * addCallback(handler) - * addErrback(handler) - * callback(result) - * errback(result) - * Callbacks are allowed to return promises themselves, so - * you can build complicated sequences of events with ease. - * - * The creator of the Deferred may specify a canceller. The canceller - * is a function that will be called if Deferred.cancel is called - * before the Deferred fires. You can use this to implement clean - * aborting of an XMLHttpRequest, etc. Note that cancel will fire the - * deferred with a CancelledError (unless your canceller returns - * another kind of error), so the errbacks should be prepared to - * handle that error for cancellable Deferreds. - * - * @param canceller Optional + * @param name The property to set. + * @param value The value to set in the property. */ - interface Deferred{(canceller?: Function): void} - interface Deferred { - /** - * - */ - fired: number; - /** - * - */ - promise: Object; - /** - * Add handler as both successful callback and error callback for this deferred instance. - * - * @param callback - */ - addBoth(callback: Function): any; - /** - * Adds successful callback for this deferred instance. - * - * @param callback - */ - addCallback(callback: Function): any; - /** - * Adds callback and error callback for this deferred instance. - * - * @param callback OptionalThe callback attached to this deferred object. - * @param errback OptionalThe error callback attached to this deferred object. - */ - addCallbacks(callback: Function, errback: Function): any; - /** - * Adds error callback for this deferred instance. - * - * @param errback - */ - addErrback(errback: Function): any; - /** - * Fulfills the Deferred instance successfully with the provide value - * - * @param value - */ - callback(value: any): void; - /** - * Cancels the asynchronous operation - * - */ - cancel(): void; - /** - * Fulfills the Deferred instance as an error with the provided error - * - * @param error - */ - errback(error: any): void; - /** - * Checks whether the deferred has been canceled. - * - */ - isCanceled(): boolean; - /** - * Checks whether the deferred has been resolved or rejected. - * - */ - isFulfilled(): boolean; - /** - * Checks whether the deferred has been rejected. - * - */ - isRejected(): boolean; - /** - * Checks whether the deferred has been resolved. - * - */ - isResolved(): boolean; - /** - * Send progress events to all listeners - * - * @param update - */ - progress(update: any): void; - /** - * Fulfills the Deferred instance as an error with the provided error - * - * @param error - */ - reject(error: any): void; - /** - * Fulfills the Deferred instance successfully with the provide value - * - * @param value - */ - resolve(value: any): void; - /** - * Adds a fulfilledHandler, errorHandler, and progressHandler to be called for - * completion of a promise. The fulfilledHandler is called when the promise - * is fulfilled. The errorHandler is called when a promise fails. The - * progressHandler is called for progress events. All arguments are optional - * and non-function values are ignored. The progressHandler is not only an - * optional argument, but progress events are purely optional. Promise - * providers are not required to ever create progress events. - * - * This function will return a new promise that is fulfilled when the given - * fulfilledHandler or errorHandler callback is finished. This allows promise - * operations to be chained together. The value returned from the callback - * handler is the fulfillment value for the returned promise. If the callback - * throws an error, the returned promise will be moved to failed state. - * - * @param resolvedCallback Optional - * @param errorCallback Optional - * @param progressCallback Optional - */ - then(resolvedCallback: Function, errorCallback: Function, progressCallback: Function): any; - /** - * Transparently applies callbacks to values and/or promises. - * Accepts promises but also transparently handles non-promises. If no - * callbacks are provided returns a promise, regardless of the initial - * value. Foreign promises are converted. - * - * If callbacks are provided and the initial value is not a promise, - * the callback is executed immediately with no error handling. Returns - * a promise if the initial value is a promise, or the result of the - * callback otherwise. - * - * @param valueOrPromise Either a regular value or an object with a then() method thatfollows the Promises/A specification. - * @param callback OptionalCallback to be invoked when the promise is resolved, or a non-promiseis received. - * @param errback OptionalCallback to be invoked when the promise is rejected. - * @param progback OptionalCallback to be invoked when the promise emits a progress update. - */ - when(valueOrPromise: any, callback: Function, errback: Function, progback: Function): any; - } - - module Deferred { - } - + set(name: any, value: any): any; /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.html + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * 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. + * + */ + onBlur(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_Widget.html + * + * Old base class for widgets. New widgets should extend dijit/_WidgetBase instead + * Old Base class for Dijit widgets. + * + * Extends _WidgetBase, adding support for: + * + * declaratively/programatically specifying widget initialization parameters like + * onMouseMove="foo" that call foo when this.domNode gets a mousemove event + * ondijitclick: + * Support new data-dojo-attach-event="ondijitclick: ..." that is triggered by a mouse click or a SPACE/ENTER keypress + * focus related functions: + * In particular, the onFocus()/onBlur() callbacks. Driven internally by + * dijit/_base/focus.js. + * deprecated methods + * onShow(), onHide(), onClose() + * Also, by loading code in dijit/_base, turns on: + * + * browser sniffing (putting browser class like dj_ie on node) + * high contrast mode sniffing (add dijit_a11y class to if machine is in high contrast mode) + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _Widget extends dijit._WidgetBase implements dijit._OnDijitClickMixin, dijit._FocusMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Custom press, release, and click synthetic events + * which trigger on a left mouse click, touch, or space/enter keyup. + * + */ + "a11yclick": Object; + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Defines a type of widget. + * + */ + "dndType": string; + set(property:"dndType", value: string): void; + get(property:"dndType"): string; + watch(property:"dndType", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "observer": string; + set(property:"observer", value: string): void; + get(property:"observer"): string; + watch(property:"observer", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * 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. + * + */ + "slideFrom": string; + set(property:"slideFrom", value: string): void; + get(property:"slideFrom"): string; + watch(property:"slideFrom", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": Object; + set(property:"style", value: Object): void; + get(property:"style"): Object; + watch(property:"style", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * 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. + * + */ + onBlur(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_TimePicker.html + * + * A time picker dropdown, used by dijit/form/TimeTextBox. + * This widget is not available as a standalone widget due to lack of accessibility support. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree + */ + class _TimePicker extends dijit._WidgetBase implements dijit.form._ListMouseMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * The root className to use for the various states of this widget + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * ISO-8601 string representing the amount by which + * every clickable element in the time picker increases. + * Set in local time, without a time zone. + * Example: T00:15:00 creates 15 minute increments + * Must divide dijit/_TimePicker.visibleIncrement evenly + * + */ + "clickableIncrement": string; + set(property:"clickableIncrement", value: string): void; + get(property:"clickableIncrement"): string; + watch(property:"clickableIncrement", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Specifies valid range of times (start time, end time) + * + */ + "constraints": Object; + set(property:"constraints", value: Object): void; + get(property:"constraints"): Object; + watch(property:"constraints", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * The string to filter by + * + */ + "filterString": string; + set(property:"filterString", value: string): void; + get(property:"filterString"): string; + watch(property:"filterString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * currently selected node + * + */ + "selected": HTMLElement; + set(property:"selected", value: HTMLElement): void; + get(property:"selected"): HTMLElement; + watch(property:"selected", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Date to display. + * Defaults to current time and date. + * Can be a Date object or an ISO-8601 string. + * If you specify the GMT time zone (-01:00), + * the time will be converted to the local time in the local time zone. + * Otherwise, the time is considered to be in the local time zone. + * If you specify the date and isDate is true, the date is used. + * Example: if your local time zone is GMT -05:00, + * T10:00:00 becomes T10:00:00-05:00 (considered to be local time), + * T10:00:00-01:00 becomes T06:00:00-05:00 (4 hour difference), + * T10:00:00Z becomes T05:00:00-05:00 (5 hour difference between Zulu and local time) + * yyyy-mm-ddThh:mm:ss is the format to set the date and time + * Example: 2007-06-01T09:00:00 + * + */ + "value": string; + set(property:"value", value: string): void; + get(property:"value"): string; + watch(property:"value", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * ISO-8601 string representing the amount by which + * every element with a visible time in the time picker increases. + * Set in local time, without a time zone. + * Example: T01:00:00 creates text in every 1 hour increment + * + */ + "visibleIncrement": string; + set(property:"visibleIncrement", value: string): void; + get(property:"visibleIncrement"): string; + watch(property:"visibleIncrement", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Called from dijit/form/_DateTimeTextBox to pass a keypress event + * from the dijit/form/TimeTextBox to be handled in this widget + * + * @param e + */ + handleKey(e: Event): any; + /** + * May be overridden to disable certain dates in the TimePicker e.g. isDisabledDate=locale.isWeekend + * + * @param dateObject + * @param locale Optional + */ + isDisabledDate(dateObject: Date, locale: String): boolean; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: String, func: Function): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * Processing after the DOM fragment is created + * Called after the DOM fragment has been created, but not necessarily + * added to the document. Do not include any operations which rely on + * node dimensions or placement. + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * Select the first displayed item in the list. + * + */ + selectFirstNode(): void; + /** + * Select the last displayed item in the list + * + */ + selectLastNode(): void; + /** + * Select the item just below the current selection. + * If nothing selected, select first node. + * + */ + selectNextNode(): void; + /** + * Select the item just above the current selection. + * If nothing selected, select last node (if + * you select Previous and try to keep scrolling up the list). + * + */ + selectPreviousNode(): void; + /** + * Format a Date object as a string according a subset of the ISO-8601 standard + * When options.selector is omitted, output follows RFC3339 + * The local time zone is included as an offset from GMT, except when selector=='time' (time without a date) + * Does not check bounds. Only years between 100 and 9999 are supported. + * + * @param dateObject A Date object + * @param options OptionalAn object with the following properties:selector (String): "date" or "time" for partial formatting of the Date object.Both date and time will be formatted by default.zulu (Boolean): if true, UTC/GMT is used for a timezonemilliseconds (Boolean): if true, output milliseconds + */ + serialize(dateObject: Date, options: Object): any; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Used set('value') instead. + * + * @param value + */ + setValue(value: Date): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * 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. + * + */ + onBlur(): void; + /** + * Notification that a time was selected. It may be the same as the previous value. + * + * @param time + */ + onChange(time: Date): void; + /** + * + * @param node + */ + onClick(node: HTMLElement): void; + /** + * + * @param node + */ + onDeselect(node: HTMLElement): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * + * @param node + */ + onHover(node: HTMLElement): void; + /** + * + */ + onOpen(): void; + /** + * + * @param node + */ + onSelect(node: HTMLElement): void; + /** + * + * @param node + */ + onUnhover(node: HTMLElement): void; + } + module _TimePicker { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/_TimePicker.__Constraints.html * * */ - interface url{(): void} - interface url { - /** - * - */ - authority: Object; - /** - * - */ - fragment: Object; - /** - * - */ - host: Object; - /** - * - */ - password: Object; - /** - * - */ - path: Object; - /** - * - */ - port: Object; - /** - * - */ - query: Object; - /** - * - */ - scheme: Object; - /** - * - */ - uri: Object; - /** - * - */ - user: Object; - /** - * - */ - toString(): void; - } - - module url { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.authority.html - * - * - */ - interface authority { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.password.html - * - * - */ - interface password { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.port.html - * - * - */ - interface port { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.fragment.html - * - * - */ - interface fragment { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.query.html - * - * - */ - interface query { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.user.html - * - * - */ - interface user { - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/url.scheme.html - * - * - */ - interface scheme { - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/xhr.html - * - * Deprecated. Use dojo/request instead. - * Sends an HTTP request with the given method. - * See also dojo.xhrGet(), xhrPost(), xhrPut() and dojo.xhrDelete() for shortcuts - * for those HTTP methods. There are also methods for "raw" PUT and POST methods - * via dojo.rawXhrPut() and dojo.rawXhrPost() respectively. - * - * @param method HTTP method to be used, such as GET, POST, PUT, DELETE. Should be uppercase. - * @param args - * @param hasBody OptionalIf the request has an HTTP body, then pass true for hasBody. - */ - interface xhr{(method: String, args: Object, hasBody?: boolean): void} - interface xhr { - /** - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. - * - */ - contentHandlers: Object; - /** - * Sends an HTTP DELETE request to the server. - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - del(args: Object): any; - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: HTMLElement): any; - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: String): any; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - formToJson(formNode: HTMLElement, prettyPrint: boolean): any; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - formToJson(formNode: String, prettyPrint: boolean): any; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - formToObject(formNode: HTMLElement): Object; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - formToObject(formNode: String): Object; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - formToQuery(formNode: HTMLElement): any; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - formToQuery(formNode: String): any; - /** - * Sends an HTTP GET request to the server. - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - get(args: Object): any; - /** - * takes a name/value mapping object and returns a string representing - * a URL-encoded version of that object. - * - * @param map - */ - objectToQuery(map: Object): any; - /** - * Sends an HTTP POST request to the server. In addition to the properties - * listed for the dojo.__XhrArgs type, the following property is allowed: - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - post(args: Object): any; - /** - * Sends an HTTP PUT request to the server. In addition to the properties - * listed for the dojo.__XhrArgs type, the following property is allowed: - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - put(args: Object): any; - /** - * Create an object representing a de-serialized query section of a - * URL. Query keys with multiple values are returned in an array. - * - * @param str - */ - queryToObject(str: String): Object; - } - - module xhr { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/xhr.contentHandlers.html - * - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. Each contentHandler is - * called, passing the xhr object for manipulation. The return value - * from the contentHandler will be passed to the load or handle - * functions defined in the original xhr call. - * - */ - interface contentHandlers { - /** - * - * @param xhr - */ - auto(xhr: any): void; - /** - * A contentHandler which evaluates the response data, expecting it to be valid JavaScript - * - * @param xhr - */ - javascript(xhr: any): any; - /** - * A contentHandler which returns a JavaScript object created from the response data - * - * @param xhr - */ - json(xhr: any): any; - /** - * A contentHandler which expects comment-filtered JSON. - * A contentHandler which expects comment-filtered JSON. - * the json-comment-filtered option was implemented to prevent - * "JavaScript Hijacking", but it is less secure than standard JSON. Use - * standard JSON instead. JSON prefixing can be used to subvert hijacking. - * - * Will throw a notice suggesting to use application/json mimetype, as - * json-commenting can introduce security issues. To decrease the chances of hijacking, - * use the standard json contentHandler, and prefix your "JSON" with: {}&& - * - * use djConfig.useCommentedJson = true to turn off the notice - * - * @param xhr - */ - json_comment_filtered(xhr: any): any; - /** - * A contentHandler which checks the presence of comment-filtered JSON and - * alternates between the json and json-comment-filtered contentHandlers. - * - * @param xhr - */ - json_comment_optional(xhr: any): any; - /** - * - * @param xhr - */ - olson_zoneinfo(xhr: any): void; - /** - * A contentHandler which simply returns the plaintext response data - * - * @param xhr - */ - text(xhr: any): any; - /** - * A contentHandler returning an XML Document parsed from the response data - * - * @param xhr - */ - xml(xhr: any): any; - } - } - - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/config.html - * - * This module defines the user configuration during bootstrap. - * By defining user configuration as a module value, an entire configuration can be specified in a build, - * thereby eliminating the need for sniffing and or explicitly setting in the global variable dojoConfig. - * Also, when multiple instances of dojo exist in a single application, each will necessarily be located - * at an unique absolute module identifier as given by the package configuration. Implementing configuration - * as a module allows for specifying unique, per-instance configurations. - * - */ - class config { + class __Constraints { constructor(); /** - * Adds a callback via dojo/ready. Useful when Dojo is added after - * the page loads and djConfig.afterOnLoad is true. Supports the same - * arguments as dojo/ready. When using a function reference, use - * djConfig.addOnLoad = function(){};. For object with function name use - * djConfig.addOnLoad = [myObject, "functionName"]; and for object with - * function reference use - * djConfig.addOnLoad = [myObject, function(){}]; + * override strings for am in times * */ - "addOnLoad": Function; + "am": string; /** + * See dijit/_TimePicker.clickableIncrement * */ - "afterOnLoad": boolean; + "clickableIncrement": string; /** + * override pattern with this string * */ - "baseUrl": Object; + "datePattern": string; /** - * Defines a callback to be used when dependencies are defined before - * the loader has been loaded. When provided, they cause the loader to - * execute require(deps, callback) once it has finished loading. - * Should be used with deps. + * choice of long, short, medium or full (plus any custom additions). Defaults to 'short' * */ - "callback": Function; + "formatLength": string; /** + * (format only) use 4 digit years whenever 2 digit years are called for * */ - "debugContainerId": string; + "fullYear": boolean; /** - * - */ - "debugHeight": number; - /** - * Default duration, in milliseconds, for wipe and fade animations within dijits. - * Assigned to dijit.defaultDuration. - * - */ - "defaultDuration": number; - /** - * Whether deferred instrumentation should be loaded or included - * in builds. - * - */ - "deferredInstrumentation": boolean; - /** - * Defines dependencies to be used before the loader has been loaded. - * When provided, they cause the loader to execute require(deps, callback) - * once it has finished loading. Should be used with callback. - * - */ - "deps": Function; - /** - * Used by some modules to configure an empty iframe. Used by dojo/io/iframe and - * dojo/back, and dijit/popup support in IE where an iframe is needed to make sure native - * controls do not bleed through the popups. Normally this configuration variable - * does not need to be set, except when using cross-domain/CDN Dojo builds. - * Save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl - * to the path on your domain your copy of blank.html. - * - */ - "dojoBlankHtmlUrl": string; - /** - * No default value. Specifies additional locales whose - * resources should also be loaded alongside the default locale when - * calls to dojo.requireLocalization() are processed. - * - */ - "extraLocale": any[]; - /** - * Set this to true to enable publishing of topics for the different phases of - * IO operations. Publishing is done via dojo/topic.publish(). See dojo/main.__IoPublish for a list - * of topics that are published. - * - */ - "ioPublish": Object; - /** - * Defaults to false. If set to true, ensures that Dojo provides - * extended debugging feedback via Firebug. If Firebug is not available - * on your platform, setting isDebug to true will force Dojo to - * pull in (and display) the version of Firebug Lite which is - * integrated into the Dojo distribution, thereby always providing a - * debugging/logging console when isDebug is enabled. Note that - * Firebug's console.* methods are ALWAYS defined by Dojo. If - * isDebug is false and you are on a platform without Firebug, these - * methods will be defined as no-ops. - * - */ - "isDebug": boolean; - /** - * The locale to assume for loading localized resources in this page, - * specified according to RFC 3066. - * Must be specified entirely in lowercase, e.g. en-us and zh-cn. - * See the documentation for dojo.i18n and dojo.requireLocalization - * for details on loading localized resources. If no locale is specified, - * Dojo assumes the locale of the user agent, according to navigator.userLanguage - * or navigator.language properties. + * override the locale used to determine formatting rules * */ "locale": string; /** - * A map of module names to paths relative to dojo.baseUrl. The - * key/value pairs correspond directly to the arguments which - * dojo.registerModulePath accepts. Specifying - * djConfig.modulePaths = { "foo": "../../bar" } is the equivalent - * of calling dojo.registerModulePath("foo", "../../bar");. Multiple - * modules may be configured via djConfig.modulePaths. + * override strings for pm in times * */ - "modulePaths": Object; + "pm": string; /** - * Run the parser after the page is loaded + * choice of 'time','date' (default: date and time) * */ - "parseOnLoad": boolean; + "selector": string; /** - * An array of module names to be loaded immediately after dojo.js has been included - * in a page. + * (parse only) strict parsing, off by default * */ - "require": Object; + "strict": boolean; /** - * Array containing the r, g, b components used as transparent color in dojo.Color; - * if undefined, [255,255,255] (white) will be used. + * override pattern with this string * */ - "transparentColor": any[]; - /** - * Used by dojox.analytics.Urchin as the default UA-123456-7 account - * number used when being created. Alternately, you can pass an acct:"" - * parameter to the constructor a la: new dojox.analytics.Urchin({ acct:"UA-123456-7" }); - * - */ - "urchin": string; - /** - * If set to a value that evaluates to true such as a string or array and - * isDebug is true and Firebug is not available or running, then it bypasses - * the creation of Firebug Lite allowing you to define your own console object. - * - */ - "useCustomLogger": Object; - /** - * Whether the deferred instrumentation should be used. - * - * "report-rejections": report each rejection as it occurs. - * true or 1 or "report-unhandled-rejections": wait 1 second - * in an attempt to detect unhandled rejections. - * - */ - "useDeferredInstrumentation": boolean; + "timePattern": string; } - module config { + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Destroyable.html + * + * Mixin to track handles and release them when instance is destroyed. + * Call this.own(...) on list of handles (returned from dojo/aspect, dojo/on, + * dojo/Stateful::watch, or any class (including widgets) with a destroyRecursive() or destroy() method. + * Then call destroy() later to destroy this instance and release the resources. + * + */ + class Destroyable { + constructor(); + /** + * Destroy this class, releasing any resources registered via own(). + * + * @param preserveDom + */ + destroy(preserveDom?: boolean): void; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(handle:any): any; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/CalendarLite.html + * + * Lightweight version of Calendar widget aimed towards mobile use + * A simple GUI for choosing a date in the context of a monthly calendar. + * This widget can't be used in a form because it doesn't serialize the date to an + * field. For a form element, use dijit/form/DateTextBox instead. + * + * Note that the parser takes all dates attributes passed in the + * RFC 3339 format, e.g. 2005-06-30T08:05:00-07:00 + * so that they are serializable and locale-independent. + * + * Also note that this widget isn't keyboard accessible; use dijit.Calendar for that + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree + */ + class CalendarLite extends dijit._WidgetBase implements dijit._TemplatedMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Date object containing the currently focused date, or the date which would be focused + * if the calendar itself was focused. Also indicates which year and month to display, + * i.e. the current "page" the calendar is on. + * + */ + "currentFocus": Date; + set(property:"currentFocus", value: Date): void; + get(property:"currentFocus"): Date; + watch(property:"currentFocus", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} + /** + * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines + * at dojo/date and dojo/date/locale. + * + */ + "datePackage": string; + set(property:"datePackage", value: string): void; + get(property:"datePackage"): string; + watch(property:"datePackage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "dateTemplateString": string; + set(property:"dateTemplateString", value: string): void; + get(property:"dateTemplateString"): string; + watch(property:"dateTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * How to represent the days of the week in the calendar header. See locale + * + */ + "dayWidth": string; + set(property:"dayWidth", value: string): void; + get(property:"dayWidth"): string; + watch(property:"dayWidth", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * + */ + "dowTemplateString": string; + set(property:"dowTemplateString", value: string): void; + get(property:"dowTemplateString"): string; + watch(property:"dowTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Order fields are traversed when user hits the tab key + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The currently selected Date, initially set to invalid date to indicate no selection. + * + */ + "value": Date; + set(property:"value", value: Date): void; + get(property:"value"): Date; + watch(property:"value", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} + /** + * + */ + "weekTemplateString": string; + set(property:"weekTemplateString", value: string): void; + get(property:"weekTemplateString"): string; + watch(property:"weekTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Focus the calendar by focusing one of the calendar cells + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * May be overridden to return CSS classes to associate with the date entry for the given dateObject, + * for example to indicate a holiday in specified locale. + * + * @param dateObject + * @param locale Optional + */ + getClassForDate(dateObject: Date, locale: String): String; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Sets calendar's value to today's date + * + */ + goToToday(): void; + /** + * May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend + * + * @param dateObject + * @param locale Optional + */ + isDisabledDate(dateObject: Date, locale: String): boolean; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: String, func: Function): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * Called only when the selected date has changed + * + * @param date + */ + onChange(date: Date): void; + } + module CalendarLite { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/CalendarLite._MonthWidget.html + * + * Displays name of current month padded to the width of the month + * w/the longest name, so that changing months doesn't change width. + * + * Create as: + * + * new Calendar._MonthWidget({ + * lang: ..., + * dateLocaleModule: ... + * }) + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _MonthWidget extends dijit._WidgetBase { + constructor(params?: Object, srcNodeRef?: HTMLElement); /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/config.modulePaths.html - * - * A map of module names to paths relative to dojo.baseUrl. The - * key/value pairs correspond directly to the arguments which - * dojo.registerModulePath accepts. Specifying - * djConfig.modulePaths = { "foo": "../../bar" } is the equivalent - * of calling dojo.registerModulePath("foo", "../../bar");. Multiple - * modules may be configured via djConfig.modulePaths. + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } * */ - interface modulePaths { - } + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: String, func: Function): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * Processing after the DOM fragment is created + * Called after the DOM fragment has been created, but not necessarily + * added to the document. Do not include any operations which rely on + * node dimensions or placement. + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Declaration.html + * + * The Declaration widget allows a developer to declare new widget + * classes directly from a snippet of markup. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class Declaration extends dijit._Widget { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * + */ + "defaults": Object; + set(property:"defaults", value: Object): void; + get(property:"defaults"): Object; + watch(property:"defaults", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * List containing the prototype for this widget, and also any mixins, + * ex: ["dijit._Widget", "dijit._Container"] + * + */ + "mixins": Object; + set(property:"mixins", value: Object): void; + get(property:"mixins"): Object; + watch(property:"mixins", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Name of class being declared, ex: "acme.myWidget" + * + */ + "widgetClass": string; + set(property:"widgetClass", value: string): void; + get(property:"widgetClass"): string; + watch(property:"widgetClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * 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. + * + */ + onBlur(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Calendar.html + * + * A simple GUI for choosing a date in the context of a monthly calendar. + * See CalendarLite for general description. Calendar extends CalendarLite, adding: + * + * month drop down list + * keyboard navigation + * CSS classes for hover/mousepress on date, month, and year nodes + * support of deprecated methods (will be removed in 2.0) + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree + */ + class Calendar extends dijit.CalendarLite implements dijit._Widget, dijit._CssStateMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Custom press, release, and click synthetic events + * which trigger on a left mouse click, touch, or space/enter keyup. + * + */ + "a11yclick": Object; + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Date object containing the currently focused date, or the date which would be focused + * if the calendar itself was focused. Also indicates which year and month to display, + * i.e. the current "page" the calendar is on. + * + */ + "currentFocus": Date; + set(property:"currentFocus", value: Date): void; + get(property:"currentFocus"): Date; + watch(property:"currentFocus", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} + /** + * JavaScript namespace to find calendar routines. If unspecified, uses Gregorian calendar routines + * at dojo/date and dojo/date/locale. + * + */ + "datePackage": string; + set(property:"datePackage", value: string): void; + get(property:"datePackage"): string; + watch(property:"datePackage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "dateTemplateString": string; + set(property:"dateTemplateString", value: string): void; + get(property:"dateTemplateString"): string; + watch(property:"dateTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * How to represent the days of the week in the calendar header. See locale + * + */ + "dayWidth": string; + set(property:"dayWidth", value: string): void; + get(property:"dayWidth"): string; + watch(property:"dayWidth", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * + */ + "dowTemplateString": string; + set(property:"dowTemplateString", value: string): void; + get(property:"dowTemplateString"): string; + watch(property:"dowTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Defines a type of widget. + * + */ + "dndType": string; + set(property:"dndType", value: string): void; + get(property:"dndType"): string; + watch(property:"dndType", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "observer": string; + set(property:"observer", value: string): void; + get(property:"observer"): string; + watch(property:"observer", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "slideFrom": string; + set(property:"slideFrom", value: string): void; + get(property:"slideFrom"): string; + watch(property:"slideFrom", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Order fields are traversed when user hits the tab key + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The currently selected Date, initially set to invalid date to indicate no selection. + * + */ + "value": Date; + set(property:"value", value: Date): void; + get(property:"value"): Date; + watch(property:"value", callback:{(property?:string, oldValue?:Date, newValue?: Date):void}) :{unwatch():void} + /** + * + */ + "weekTemplateString": string; + set(property:"weekTemplateString", value: string): void; + get(property:"weekTemplateString"): string; + watch(property:"weekTemplateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Focus the calendar by focusing one of the calendar cells + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * May be overridden to return CSS classes to associate with the date entry for the given dateObject, + * for example to indicate a holiday in specified locale. + * + * @param dateObject + * @param locale Optional + */ + getClassForDate(dateObject: Date, locale: String): String; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Sets calendar's value to today's date + * + */ + goToToday(): void; + /** + * Provides keyboard navigation of calendar. + * Called from _onKeyDown() to handle keydown on a stand alone Calendar, + * and also from dijit/form/_DateTimeTextBox to pass a keydown event + * from the dijit/form/DateTextBox to be handled in this widget + * + * @param evt + */ + handleKey(evt: Event): any; + /** + * May be overridden to disable certain dates in the calendar e.g. isDisabledDate=dojo.date.locale.isWeekend + * + * @param dateObject + * @param locale Optional + */ + isDisabledDate(dateObject: Date, locale: String): boolean; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: String, func: Function): any; + /** + * Call specified function when event occurs, ex: myWidget.on("click", function(){ ... }). + * Call specified function when event type occurs, ex: myWidget.on("click", function(){ ... }). + * Note that the function is not run in any particular scope, so if (for example) you want it to run in the + * widget's scope you must do myWidget.on("click", lang.hitch(myWidget, func)). + * + * @param type Name of event (ex: "click") or extension event like touch.press. + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('value', ...) instead. + * + * @param value + */ + setValue(value: Date): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * + * @param value + */ + onChange(value: any): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + /** + * Deprecated. Notification that a date cell was selected. It may be the same as the previous value. + * Formerly used by dijit/form/_DateTimeTextBox (and thus dijit/form/DateTextBox) + * to get notification when the user has clicked a date. Now onExecute() (above) is used. + * + * @param date + */ + onValueSelected(date: Date): void; + } + module Calendar { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Calendar._MonthDropDown.html + * + * The list-of-months drop down from the MonthDropDownButton + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _MonthDropDown extends dijit._Widget implements dijit._TemplatedMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * List of names of months, possibly w/some undefined entries for Hebrew leap months + * (ex: ["January", "February", undefined, "April", ...]) + * + */ + "months": Object; + set(property:"months", value: Object): void; + get(property:"months"): Object; + watch(property:"months", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Callback when month is selected from drop down + * + * @param month + */ + onChange(month: number): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Calendar._MonthDropDownButton.html + * + * DropDownButton for the current month. Displays name of current month + * and a list of month names in the drop down + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class _MonthDropDownButton extends dijit.form.DropDownButton { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Corresponds to the native HTML element's attribute. + * + */ + "alt": string; + set(property:"alt", value: string): void; + get(property:"alt"): string; + watch(property:"alt", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "aria-label": string; + set(property:"aria-label", value: string): void; + get(property:"aria-label"): string; + watch(property:"aria-label", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Set to true to make the drop down at least as wide as this + * widget. Set to false if the drop down should just be its + * default width. + * + */ + "autoWidth": boolean; + set(property:"autoWidth", value: boolean): void; + get(property:"autoWidth"): boolean; + watch(property:"autoWidth", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Should this widget respond to user input? + * In markup, this is specified as "disabled='disabled'", or just "disabled". + * + */ + "disabled": boolean; + set(property:"disabled", value: boolean): void; + get(property:"disabled"): boolean; + watch(property:"disabled", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * The widget to display as a popup. This widget must be + * defined before the startup function is called. + * + */ + "dropDown": Object; + set(property:"dropDown", value: Object): void; + get(property:"dropDown"): Object; + watch(property:"dropDown", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * This variable controls the position of the drop down. + * It's an array of strings with the following values: + * + * before: places drop down to the left of the target node/widget, or to the right in + * the case of RTL scripts like Hebrew and Arabic + * after: places drop down to the right of the target node/widget, or to the left in + * the case of RTL scripts like Hebrew and Arabic + * above: drop down goes above target node + * below: drop down goes below target node + * The list is positions is tried, in order, until a position is found where the drop down fits + * within the viewport. + * + */ + "dropDownPosition": Object; + set(property:"dropDownPosition", value: Object): void; + get(property:"dropDownPosition"): Object; + watch(property:"dropDownPosition", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Set to true to make the drop down exactly as wide as this + * widget. Overrides autoWidth. + * + */ + "forceWidth": boolean; + set(property:"forceWidth", value: boolean): void; + get(property:"forceWidth"): boolean; + watch(property:"forceWidth", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Class to apply to DOMNode in button to make it display an icon + * + */ + "iconClass": string; + set(property:"iconClass", value: string): void; + get(property:"iconClass"): string; + watch(property:"iconClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Fires onChange for each value change or only on demand + * + */ + "intermediateChanges": boolean; + set(property:"intermediateChanges", value: boolean): void; + get(property:"intermediateChanges"): boolean; + watch(property:"intermediateChanges", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Content to display in button. + * + */ + "label": string; + set(property:"label", value: string): void; + get(property:"label"): string; + watch(property:"label", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The max height for our dropdown. + * Any dropdown taller than this will have scrollbars. + * Set to 0 for no max height, or -1 to limit height to available space in viewport + * + */ + "maxHeight": number; + set(property:"maxHeight", value: number): void; + get(property:"maxHeight"): number; + watch(property:"maxHeight", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * Name used when submitting form; same as "name" attribute or plain HTML elements + * + */ + "name": string; + set(property:"name", value: string): void; + get(property:"name"): string; + watch(property:"name", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * On focus, should this widget scroll into view? + * + */ + "scrollOnFocus": boolean; + set(property:"scrollOnFocus", value: boolean): void; + get(property:"scrollOnFocus"): boolean; + watch(property:"scrollOnFocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Set this to true to hide the label text and display only the icon. + * (If showLabel=false then iconClass must be specified.) + * Especially useful for toolbars. + * If showLabel=true, the label will become the title (a.k.a. tooltip/hint) of the icon. + * + * The exception case is for computers in high-contrast mode, where the label + * will still be displayed, since the icon doesn't appear. + * + */ + "showLabel": boolean; + set(property:"showLabel", value: boolean): void; + get(property:"showLabel"): boolean; + watch(property:"showLabel", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Order fields are traversed when user hits the tab key + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Corresponds to the native HTML element's attribute. + * + */ + "type": string; + set(property:"type", value: string): void; + get(property:"type"): string; + watch(property:"type", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Corresponds to the native HTML element's attribute. + * + */ + "value": string; + set(property:"value", value: string): void; + get(property:"value"): string; + watch(property:"value", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Closes the drop down on this widget + * + * @param focus If true, refocuses the button widget + */ + closeDropDown(focus: boolean): void; + /** + * Compare 2 values (as returned by get('value') for this widget). + * + * @param val1 + * @param val2 + */ + compare(val1: any, val2: any): number; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Put focus on this widget + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Deprecated. Use get('value') instead. + * + */ + getValue(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + */ + isLoaded(): boolean; + /** + * Creates the drop down if it doesn't exist, loads the data + * if there's an href and it hasn't been loaded yet, and + * then opens the drop down. This is basically a callback when the + * user presses the down arrow button to open the drop down. + * + */ + loadAndOpenDropDown(): any; + /** + * + * @param callback + */ + loadDropDown(callback: Function): void; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Opens the dropdown for this widget. To be called only when this.dropDown + * has been created and is ready to display (ie, it's data is loaded). + * + */ + openDropDown(): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('disabled', ...) instead. + * + * @param disabled + */ + setDisabled(disabled: boolean): void; + /** + * Deprecated. Use set('label', ...) instead. + * + * @param content + */ + setLabel(content: String): void; + /** + * Deprecated. Use set('value', ...) instead. + * + * @param value + */ + setValue(value: String): void; + /** + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * Callback when the user presses the down arrow button or presses + * the down arrow key to open/close the drop down. + * Toggle the drop-down widget; if it is up, close it, if not, open it + * + */ + toggleDropDown(): void; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Callback when this widget's value is changed. + * + * @param newValue + */ + onChange(newValue: any): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): boolean; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * + */ + onMonthSelect(): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/CheckedMenuItem.html + * + * A checkbox-like menu item for toggling on and off + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class CheckedMenuItem extends dijit.MenuItem { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Text for the accelerator (shortcut) key combination, a control, alt, etc. modified keystroke meant to + * execute the menu item regardless of where the focus is on the page. + * + * Note that although Menu can display accelerator keys, there is no infrastructure to actually catch and + * execute those accelerators. + * + */ + "accelKey": string; + set(property:"accelKey", value: string): void; + get(property:"accelKey"): string; + watch(property:"accelKey", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Our checked state + * + */ + "checked": boolean; + set(property:"checked", value: boolean): void; + get(property:"checked"): boolean; + watch(property:"checked", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Character (or string) used in place of checkbox icon when display in high contrast mode + * + */ + "checkedChar": string; + set(property:"checkedChar", value: string): void; + get(property:"checkedChar"): string; + watch(property:"checkedChar", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * If true, the menu item is disabled. + * If false, the menu item is enabled. + * + */ + "disabled": boolean; + set(property:"disabled", value: boolean): void; + get(property:"disabled"): boolean; + watch(property:"disabled", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "iconClass": string; + set(property:"iconClass", value: string): void; + get(property:"iconClass"): string; + watch(property:"iconClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Menu text as HTML + * + */ + "label": string; + set(property:"label", value: string): void; + get(property:"label"): string; + watch(property:"label", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "role": string; + set(property:"role", value: string): void; + get(property:"role"): string; + watch(property:"role", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Single character (underlined when the parent Menu is focused) used to navigate directly to this widget, + * also known as a mnemonic. + * This is denoted in the label by surrounding the single character with {}. + * For example, if label="{F}ile", then shortcutKey="F". + * + */ + "shortcutKey": string; + set(property:"shortcutKey", value: string): void; + get(property:"shortcutKey"): string; + watch(property:"shortcutKey", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Focus on this MenuItem + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * 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 + * + */ + getIndexInParent(): any; + /** + * Returns null if this is the last child of the parent, + * otherwise returns the next element sibling to the "right". + * + */ + getNextSibling(): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Returns null if this is the first child of the parent, + * otherwise returns the next element sibling to the "left". + * + */ + getPreviousSibling(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('disabled', bool) instead. + * + * @param disabled + */ + setDisabled(disabled: boolean): void; + /** + * Deprecated. Use set('label', ...) instead. + * + * @param content + */ + setLabel(content: String): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * User defined function to handle check/uncheck events + * + * @param checked + */ + onChange(checked: boolean): void; + /** + * User defined function to handle clicks + * + */ + onClick(): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/DialogUnderlay.html + * + * A component used to block input behind a dijit/Dialog. + * + * Normally this class should not be instantiated directly, but rather shown and hidden via + * DialogUnderlay.show() and DialogUnderlay.hide(). And usually the module is not accessed directly + * at all, since the underlay is shown and hidden by Dialog.DialogLevelManager. + * + * The underlay itself can be styled based on and id: + * + * #myDialog_underlay { background-color:red; } + * In the case of dijit.Dialog, this id is based on the id of the Dialog, + * suffixed with _underlay. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class DialogUnderlay extends dijit._Widget implements dijit._TemplatedMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Root CSS class of the widget (ex: dijitTextBox), used to construct CSS classes to indicate + * widget state. + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Id of the dialog.... DialogUnderlay's id is based on this id + * + */ + "dialogId": string; + set(property:"dialogId", value: string): void; + get(property:"dialogId"): string; + watch(property:"dialogId", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * + */ + destroy(): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Hide the underlay. + * + */ + hide(): void; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Show the dialog underlay + * + */ + show(): void; + /** + * Display the underlay with the given attributes set. If the underlay is already displayed, + * then adjust it's attributes as specified. + * + * @param attrs The parameters to create DialogUnderlay with. + * @param zIndex zIndex of the underlay + */ + show(attrs: Object, zIndex: number): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.10/dijit/_ConfirmDialogMixin.html + * + * Mixin for Dialog/TooltipDialog with OK/Cancel buttons. + * + */ + class _ConfirmDialogMixin extends dijit._WidgetsInTemplateMixin { + constructor(); + /** + * + */ + "actionBarTemplate": Object; + /** + * Label of cancel button + * + */ + "buttonCancel": string; + /** + * Label of OK button + * + */ + "buttonOk": string; + /** + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. + * + */ + "contextRequire": Function; + /** + * Should we parse the template to find widgets that might be + * declared in markup inside it? (Remove for 2.0 and assume true) + * + */ + "widgetsInTemplate": boolean; + /** + * + */ + startup(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.10/dijit/ConfirmDialog.html + * + * A Dialog with OK/Cancel buttons. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class ConfirmDialog extends dijit.Dialog implements dijit._ConfirmDialogMixin { + constructor(params: Object, srcNodeRef?: HTMLElement); + okButton: dijit.form.Button; + cancelButon: dijit.form.Button; /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/Color.html - * - * Takes a named string, hex string, array of rgb or rgba values, - * an object with r, g, b, and a properties, or another Color object - * and creates a new Color instance to work from. + * HTML snippet to show the action bar (gray bar with OK/cancel buttons). + * Blank by default, but used by ConfirmDialog/ConfirmTooltipDialog subclasses. * - * @param color */ - class Color { - constructor(color: any[]); + "actionBarTemplate": string; + set(property:"actionBarTemplate", value: string): void; + get(property:"actionBarTemplate"): string; + watch(property:"actionBarTemplate", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to focus on the first dialog element after opening the dialog. + * False will disable autofocusing. Default: true + * + */ + "autofocus": boolean; + set(property:"autofocus", value: boolean): void; + get(property:"autofocus"): boolean; + watch(property:"autofocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Label of cancel button + * + */ + "buttonCancel": string; + set(property:"buttonCancel", value: string): void; + get(property:"buttonCancel"): string; + watch(property:"buttonCancel", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Label of OK button + * + */ + "buttonOk": string; + set(property:"buttonOk", value: string): void; + get(property:"buttonOk"): string; + watch(property:"buttonOk", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Dialog show [x] icon to close itself, and ESC key will close the dialog. + * + */ + "closable": boolean; + set(property:"closable", value: boolean): void; + get(property:"closable"): boolean; + watch(property:"closable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * The innerHTML of the ContentPane. + * Note that the initialization parameter / argument to set("content", ...) + * can be a String, DomNode, Nodelist, or _Widget. + * + */ + "content": string; + set(property:"content", value: string): void; + get(property:"content"): string; + watch(property:"content", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Used to provide a context require to the dojo/parser in order to be + * able to use relative MIDs (e.g. ./Widget) in the widget's template. + * + */ + "contextRequire": Function; + set(property:"contextRequire", value: Function): void; + get(property:"contextRequire"): Function; + watch(property:"contextRequire", callback:{(property?:string, oldValue?:Function, newValue?: Function):void}) :{unwatch():void} + /** + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + * false - don't adjust size of children + * true - if there is a single visible child widget, set it's size to however big the ContentPane is + * + */ + "doLayout": boolean; + set(property:"doLayout", value: boolean): void; + get(property:"doLayout"): boolean; + watch(property:"doLayout", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Toggles the movable aspect of the Dialog. If true, Dialog + * can be dragged by it's title. If false it will remain centered + * in the viewport. + * + */ + "draggable": boolean; + set(property:"draggable", value: boolean): void; + get(property:"draggable"): boolean; + watch(property:"draggable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The time in milliseconds it takes the dialog to fade in and out + * + */ + "duration": number; + set(property:"duration", value: number): void; + get(property:"duration"): number; + watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * Message that shows if an error occurs + * + */ + "errorMessage": string; + set(property:"errorMessage", value: string): void; + get(property:"errorMessage"): string; + watch(property:"errorMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Extract visible content from inside of .... . + * I.e., strip and (and it's contents) from the href + * + */ + "extractContent": boolean; + set(property:"extractContent", value: boolean): void; + get(property:"extractContent"): boolean; + watch(property:"extractContent", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The href of the content that displays now. + * Set this at construction if you want to load data externally when the + * pane is shown. (Set preload=true to load it immediately.) + * Changing href after creation doesn't have any effect; Use set('href', ...); + * + */ + "href": string; + set(property:"href", value: string): void; + get(property:"href"): string; + watch(property:"href", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Parameters to pass to xhrGet() request, for example: + * + *
+ * + */ + "ioArgs": Object; + set(property:"ioArgs", value: Object): void; + get(property:"ioArgs"): Object; + watch(property:"ioArgs", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Indicates that this widget will call resize() on it's child widgets + * when they become visible. + * + */ + "isLayoutContainer": boolean; + set(property:"isLayoutContainer", value: boolean): void; + get(property:"isLayoutContainer"): boolean; + watch(property:"isLayoutContainer", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if the ContentPane has data in it, either specified + * during initialization (via href or inline content), or set + * via set('content', ...) / set('href', ...) + * + * False if it doesn't have any content, or if ContentPane is + * still in the process of downloading href. + * + */ + "isLoaded": boolean; + set(property:"isLoaded", value: boolean): void; + get(property:"isLoaded"): boolean; + watch(property:"isLoaded", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Message that shows while downloading + * + */ + "loadingMessage": string; + set(property:"loadingMessage", value: string): void; + get(property:"loadingMessage"): string; + watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Maximum size to allow the dialog to expand to, relative to viewport size + * + */ + "maxRatio": number; + set(property:"maxRatio", value: number): void; + get(property:"maxRatio"): number; + watch(property:"maxRatio", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * This is the dojo.Deferred returned by set('href', ...) and refresh(). + * Calling onLoadDeferred.then() registers your + * callback to be called only once, when the prior set('href', ...) call or + * the initial href parameter to the constructor finishes loading. + * + * This is different than an onLoad() handler which gets called any time any href + * or content is loaded. + * + */ + "onLoadDeferred": Object; + set(property:"onLoadDeferred", value: Object): void; + get(property:"onLoadDeferred"): Object; + watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * True if Dialog is currently displayed on screen. + * + */ + "open": boolean; + set(property:"open", value: boolean): void; + get(property:"open"): boolean; + watch(property:"open", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Parse content and create the widgets, if any. + * + */ + "parseOnLoad": boolean; + set(property:"parseOnLoad", value: boolean): void; + get(property:"parseOnLoad"): boolean; + watch(property:"parseOnLoad", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, + * will search for data-dojo-type (or dojoType). For backwards compatibility + * reasons defaults to dojo._scopeName (which is "dojo" except when + * multi-version support is used, when it will be something like dojo16, dojo20, etc.) + * + */ + "parserScope": string; + set(property:"parserScope", value: string): void; + get(property:"parserScope"): string; + watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Force load of data on initialization even if pane is hidden. + * + */ + "preload": boolean; + set(property:"preload", value: boolean): void; + get(property:"preload"): boolean; + watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Prevent caching of data from href's by appending a timestamp to the href. + * + */ + "preventCache": boolean; + set(property:"preventCache", value: boolean): void; + get(property:"preventCache"): boolean; + watch(property:"preventCache", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to re-focus the element which had focus before being opened. + * False will disable refocusing. Default: true + * + */ + "refocus": boolean; + set(property:"refocus", value: boolean): void; + get(property:"refocus"): boolean; + watch(property:"refocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Refresh (re-download) content when pane goes from hidden to shown + * + */ + "refreshOnShow": boolean; + set(property:"refreshOnShow", value: boolean): void; + get(property:"refreshOnShow"): boolean; + watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Will be "Error" if one or more of the child widgets has an invalid value, + * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", + * which indicates that the form is ready to be submitted. + * + */ + "state": string; + set(property:"state", value: string): void; + get(property:"state"): string; + watch(property:"state", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "stopParser": boolean; + set(property:"stopParser", value: boolean): void; + get(property:"stopParser"): boolean; + watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Should we parse the template to find widgets that might be + * declared in markup inside it? (Remove for 2.0 and assume true) + * + */ + "widgetsInTemplate": boolean; + set(property:"widgetsInTemplate", value: boolean): void; + get(property:"widgetsInTemplate"): boolean; + watch(property:"widgetsInTemplate", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Cancels an in-flight download of content + * + */ + cancel(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * You can call this function directly, ex. in the event that you + * programmatically add a widget to the form after the form has been + * initialized. + * + * @param inStartup + */ + connectChildren(inStartup: boolean): void; + /** + * + * @param params + * @param srcNodeRef + */ + create(params: any, srcNodeRef: any): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * + */ + destroy(): void; + /** + * Destroy all the widgets inside the ContentPane and empty containerNode + * + * @param preserveDom + */ + destroyDescendants(preserveDom: boolean): void; + /** + * Destroy the ContentPane and its contents + * + * @param preserveDom + */ + destroyRecursive(preserveDom: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Deprecated method. Applications no longer need to call this. Remove for 2.0. + * + */ + disconnectChildren(): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Callback when the user hits the submit button. + * Override this method to handle Dialog execution. + * After the user has pressed the submit button, the Dialog + * first calls onExecute() to notify the container to hide the + * dialog and restore focus to wherever it used to be. + * + * Then this method is called. + * + * @param formContents + */ + execute(formContents: Object): void; + /** + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * + */ + getValues(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Hide the dialog + * + */ + hide(): any; + /** + * Function that should grab the content specified via href. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + */ + ioMethod(args: Object): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Returns true if all of the widgets are valid. + * Deprecated, will be removed in 2.0. Use get("state") instead. + * + */ + isValid: {(): boolean}; + /** + * + * @param params + * @param node + * @param ctor + */ + markupFactory(params: any, node: any, ctor: any): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, DocumentFragment, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * [Re]download contents of href and display + * cancels any currently in-flight requests + * posts "loading..." message + * sends XHR to download new data + * + */ + refresh(): any; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * + */ + reset(): void; + /** + * See dijit/layout/_LayoutWidget.resize() for description. + * Although ContentPane doesn't extend _LayoutWidget, it does implement + * the same API. + * + * @param changeSize + * @param resultSize + */ + resize(changeSize: any, resultSize: any): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: String): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: HTMLElement): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: NodeList): void; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: String): any; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: URL): any; + /** + * + * @param val + */ + setValues(val: any): any; + /** + * Display the dialog + * + */ + show(): any; + /** + * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * returns if the form is valid - same as isValid - but + * provides a few additional (ui-specific) features: + * + * it will highlight any sub-widgets that are not valid + * it will call focus() on the first invalid sub-widget + * + */ + validate(): any; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Called when user has pressed the Dialog's cancel button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onCancel(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Called on DOM faults, require faults etc. in content. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * By default (if this method is not overriden), it returns + * nothing, so the error message is just printed to the console. + * + * @param error + */ + onContentError(error: Error): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when download is finished. + * + */ + onDownloadEnd(): void; + /** + * Called when download error occurs. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * Default behavior (if this method is not overriden) is to display + * the error message inside the pane. + * + * @param error + */ + onDownloadError(error: Error): any; + /** + * Called before download starts. + * The string returned by this function will be the html + * that tells the user we are loading something. + * Override with your own function if you want to change text. + * + */ + onDownloadStart(): any; + /** + * Called when user has pressed the dialog's OK button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onExecute(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Event hook, is called after everything is loaded and widgetified + * + * @param data + */ + onLoad(data: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + /** + * Event hook, is called before old content is cleared + * + */ + onUnload(): void; + /** + * Stub function to connect to if you want to do something + * (like disable/enable a submit button) when the valid + * state changes on the form as a whole. + * + * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. + * + * @param isValid + */ + onValidStateChange(isValid: boolean): void; + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Dialog.html + * + * A modal dialog Widget. + * Pops up a modal dialog window, blocking access to the screen + * and also graying out the screen Dialog is extended from + * ContentPane so it supports all the same parameters (href, etc.). + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class Dialog extends dijit.layout.ContentPane implements dijit._TemplatedMixin, dijit.form._FormMixin, dijit._DialogMixin, dijit._CssStateMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to focus on the first dialog element after opening the dialog. + * False will disable autofocusing. Default: true + * + */ + "autofocus": boolean; + set(property:"autofocus", value: boolean): void; + get(property:"autofocus"): boolean; + watch(property:"autofocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Dialog show [x] icon to close itself, and ESC key will close the dialog. + * + */ + "closable": boolean; + set(property:"closable", value: boolean): void; + get(property:"closable"): boolean; + watch(property:"closable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * The innerHTML of the ContentPane. + * Note that the initialization parameter / argument to set("content", ...) + * can be a String, DomNode, Nodelist, or _Widget. + * + */ + "content": string; + set(property:"content", value: string): void; + get(property:"content"): string; + watch(property:"content", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + * false - don't adjust size of children + * true - if there is a single visible child widget, set it's size to however big the ContentPane is + * + */ + "doLayout": boolean; + set(property:"doLayout", value: boolean): void; + get(property:"doLayout"): boolean; + watch(property:"doLayout", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Toggles the movable aspect of the Dialog. If true, Dialog + * can be dragged by it's title. If false it will remain centered + * in the viewport. + * + */ + "draggable": boolean; + set(property:"draggable", value: boolean): void; + get(property:"draggable"): boolean; + watch(property:"draggable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The time in milliseconds it takes the dialog to fade in and out + * + */ + "duration": number; + set(property:"duration", value: number): void; + get(property:"duration"): number; + watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * Message that shows if an error occurs + * + */ + "errorMessage": string; + set(property:"errorMessage", value: string): void; + get(property:"errorMessage"): string; + watch(property:"errorMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Extract visible content from inside of .... . + * I.e., strip and (and it's contents) from the href + * + */ + "extractContent": boolean; + set(property:"extractContent", value: boolean): void; + get(property:"extractContent"): boolean; + watch(property:"extractContent", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The href of the content that displays now. + * Set this at construction if you want to load data externally when the + * pane is shown. (Set preload=true to load it immediately.) + * Changing href after creation doesn't have any effect; Use set('href', ...); + * + */ + "href": string; + set(property:"href", value: string): void; + get(property:"href"): string; + watch(property:"href", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Parameters to pass to xhrGet() request, for example: + * + *
+ * + */ + "ioArgs": Object; + set(property:"ioArgs", value: Object): void; + get(property:"ioArgs"): Object; + watch(property:"ioArgs", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Indicates that this widget will call resize() on it's child widgets + * when they become visible. + * + */ + "isLayoutContainer": boolean; + set(property:"isLayoutContainer", value: boolean): void; + get(property:"isLayoutContainer"): boolean; + watch(property:"isLayoutContainer", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if the ContentPane has data in it, either specified + * during initialization (via href or inline content), or set + * via set('content', ...) / set('href', ...) + * + * False if it doesn't have any content, or if ContentPane is + * still in the process of downloading href. + * + */ + "isLoaded": boolean; + set(property:"isLoaded", value: boolean): void; + get(property:"isLoaded"): boolean; + watch(property:"isLoaded", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Message that shows while downloading + * + */ + "loadingMessage": string; + set(property:"loadingMessage", value: string): void; + get(property:"loadingMessage"): string; + watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Maximum size to allow the dialog to expand to, relative to viewport size + * + */ + "maxRatio": number; + set(property:"maxRatio", value: number): void; + get(property:"maxRatio"): number; + watch(property:"maxRatio", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * This is the dojo.Deferred returned by set('href', ...) and refresh(). + * Calling onLoadDeferred.then() registers your + * callback to be called only once, when the prior set('href', ...) call or + * the initial href parameter to the constructor finishes loading. + * + * This is different than an onLoad() handler which gets called any time any href + * or content is loaded. + * + */ + "onLoadDeferred": Object; + set(property:"onLoadDeferred", value: Object): void; + get(property:"onLoadDeferred"): Object; + watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * True if Dialog is currently displayed on screen. + * + */ + "open": boolean; + set(property:"open", value: boolean): void; + get(property:"open"): boolean; + watch(property:"open", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Parse content and create the widgets, if any. + * + */ + "parseOnLoad": boolean; + set(property:"parseOnLoad", value: boolean): void; + get(property:"parseOnLoad"): boolean; + watch(property:"parseOnLoad", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, + * will search for data-dojo-type (or dojoType). For backwards compatibility + * reasons defaults to dojo._scopeName (which is "dojo" except when + * multi-version support is used, when it will be something like dojo16, dojo20, etc.) + * + */ + "parserScope": string; + set(property:"parserScope", value: string): void; + get(property:"parserScope"): string; + watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Force load of data on initialization even if pane is hidden. + * + */ + "preload": boolean; + set(property:"preload", value: boolean): void; + get(property:"preload"): boolean; + watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Prevent caching of data from href's by appending a timestamp to the href. + * + */ + "preventCache": boolean; + set(property:"preventCache", value: boolean): void; + get(property:"preventCache"): boolean; + watch(property:"preventCache", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to re-focus the element which had focus before being opened. + * False will disable refocusing. Default: true + * + */ + "refocus": boolean; + set(property:"refocus", value: boolean): void; + get(property:"refocus"): boolean; + watch(property:"refocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Refresh (re-download) content when pane goes from hidden to shown + * + */ + "refreshOnShow": boolean; + set(property:"refreshOnShow", value: boolean): void; + get(property:"refreshOnShow"): boolean; + watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Will be "Error" if one or more of the child widgets has an invalid value, + * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", + * which indicates that the form is ready to be submitted. + * + */ + "state": string; + set(property:"state", value: string): void; + get(property:"state"): string; + watch(property:"state", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "stopParser": boolean; + set(property:"stopParser", value: boolean): void; + get(property:"stopParser"): boolean; + watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Cancels an in-flight download of content + * + */ + cancel(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * You can call this function directly, ex. in the event that you + * programmatically add a widget to the form after the form has been + * initialized. + * + * @param inStartup + */ + connectChildren(inStartup: boolean): void; + /** + * + * @param params + * @param srcNodeRef + */ + create(params: any, srcNodeRef: any): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * + */ + destroy(): void; + /** + * Destroy all the widgets inside the ContentPane and empty containerNode + * + * @param preserveDom + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy the ContentPane and its contents + * + * @param preserveDom + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Deprecated method. Applications no longer need to call this. Remove for 2.0. + * + */ + disconnectChildren(): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Callback when the user hits the submit button. + * Override this method to handle Dialog execution. + * After the user has pressed the submit button, the Dialog + * first calls onExecute() to notify the container to hide the + * dialog and restore focus to wherever it used to be. + * + * Then this method is called. + * + * @param formContents + */ + execute(formContents: Object): void; + /** + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * + */ + getValues(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Hide the dialog + * + */ + hide(): any; + /** + * Function that should grab the content specified via href. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + */ + ioMethod(args: Object): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * Returns true if all of the widgets are valid. + * Deprecated, will be removed in 2.0. Use get("state") instead. + * + */ + isValid: {(): boolean}; + /** + * + * @param params + * @param node + * @param ctor + */ + markupFactory(params: any, node: any, ctor: any): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * [Re]download contents of href and display + * cancels any currently in-flight requests + * posts "loading..." message + * sends XHR to download new data + * + */ + refresh(): any; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * + */ + reset(): void; + /** + * See dijit/layout/_LayoutWidget.resize() for description. + * Although ContentPane doesn't extend _LayoutWidget, it does implement + * the same API. + * + * @param changeSize + * @param resultSize + */ + resize(changeSize: any, resultSize: any): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: String): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: HTMLElement): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: NodeList): void; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: String): any; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: URL): any; + /** + * + * @param val + */ + setValues(val: any): any; + /** + * Display the dialog + * + */ + show(): any; + /** + * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * returns if the form is valid - same as isValid - but + * provides a few additional (ui-specific) features: + * + * it will highlight any sub-widgets that are not valid + * it will call focus() on the first invalid sub-widget + * + */ + validate(): any; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Called when user has pressed the Dialog's cancel button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onCancel(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Called on DOM faults, require faults etc. in content. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * By default (if this method is not overriden), it returns + * nothing, so the error message is just printed to the console. + * + * @param error + */ + onContentError(error: Error): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when download is finished. + * + */ + onDownloadEnd(): void; + /** + * Called when download error occurs. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * Default behavior (if this method is not overriden) is to display + * the error message inside the pane. + * + * @param error + */ + onDownloadError(error: Error): any; + /** + * Called before download starts. + * The string returned by this function will be the html + * that tells the user we are loading something. + * Override with your own function if you want to change text. + * + */ + onDownloadStart(): any; + /** + * Called when user has pressed the dialog's OK button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onExecute(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Event hook, is called after everything is loaded and widgetified + * + * @param data + */ + onLoad(data: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + /** + * Event hook, is called before old content is cleared + * + */ + onUnload(): void; + /** + * Stub function to connect to if you want to do something + * (like disable/enable a submit button) when the valid + * state changes on the form as a whole. + * + * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. + * + * @param isValid + */ + onValidStateChange(isValid: boolean): void; + } + module Dialog { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Dialog._DialogBase.html + * + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified, replace srcNodeRef with my generated DOM tree. + */ + class _DialogBase extends dijit._TemplatedMixin implements dijit.form._FormMixin, dijit._DialogMixin, dijit._CssStateMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to focus on the first dialog element after opening the dialog. + * False will disable autofocusing. Default: true + * + */ + "autofocus": boolean; + /** + * + */ + "baseClass": string; + /** + * Dialog show [x] icon to close itself, and ESC key will close the dialog. + * + */ + "closable": boolean; + /** + * + */ + "cssStateNodes": Object; + /** + * Don't change this parameter from the default value. + * This ContentPane parameter doesn't make sense for Dialog, since Dialog + * is never a child of a layout container, nor can you specify the size of + * Dialog in order to control the size of an inner widget. + * + */ + "doLayout": boolean; + /** + * Toggles the movable aspect of the Dialog. If true, Dialog + * can be dragged by it's title. If false it will remain centered + * in the viewport. + * + */ + "draggable": boolean; + /** + * The time in milliseconds it takes the dialog to fade in and out + * + */ + "duration": number; + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + /** + * Maximum size to allow the dialog to expand to, relative to viewport size + * + */ + "maxRatio": number; + /** + * True if Dialog is currently displayed on screen. + * + */ + "open": boolean; + /** + * A Toggle to modify the default focus behavior of a Dialog, which + * is to re-focus the element which had focus before being opened. + * False will disable refocusing. Default: true + * + */ + "refocus": boolean; + /** + * + */ + "searchContainerNode": boolean; + /** + * Will be "Error" if one or more of the child widgets has an invalid value, + * "Incomplete" if not all of the required child widgets are filled in. Otherwise, "", + * which indicates that the form is ready to be submitted. + * + */ + "state": string; + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + /** + * + */ + "templateString": string; + /** + * Construct the UI for this widget from a template, setting this.domNode. + * + */ + buildRendering(): void; + /** + * You can call this function directly, ex. in the event that you + * programmatically add a widget to the form after the form has been + * initialized. + * + * @param inStartup + */ + connectChildren(inStartup: boolean): void; + /** + * + */ + destroy(): void; + /** + * + */ + destroyRendering(): void; + /** + * Deprecated method. Applications no longer need to call this. Remove for 2.0. + * + */ + disconnectChildren(): void; + /** + * Callback when the user hits the submit button. + * Override this method to handle Dialog execution. + * After the user has pressed the submit button, the Dialog + * first calls onExecute() to notify the container to hide the + * dialog and restore focus to wherever it used to be. + * + * Then this method is called. + * + * @param formContents + */ + execute(formContents: Object): void; + /** + * + */ + focus(): void; + /** + * + */ + getValues(): any; + /** + * Hide the dialog + * + */ + hide(): any; + /** + * Returns true if all of the widgets are valid. + * Deprecated, will be removed in 2.0. Use get("state") instead. + * + */ + isValid: {(): boolean}; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * + */ + reset(): void; + /** + * + * @param val + */ + setValues(val: any): any; + /** + * Display the dialog + * + */ + show(): any; + /** + * + */ + startup(): void; + /** + * returns if the form is valid - same as isValid - but + * provides a few additional (ui-specific) features: + * + * it will highlight any sub-widgets that are not valid + * it will call focus() on the first invalid sub-widget + * + */ + validate(): any; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * Called when user has pressed the Dialog's cancel button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onCancel(): void; + /** + * Called when user has pressed the dialog's OK button, to notify container. + * Developer shouldn't override or connect to this method; + * it's a private communication device between the TooltipDialog + * and the thing that opened it (ex: dijit/form/DropDownButton) + * + */ + onExecute(): void; + /** + * Called when data has been loaded from an href. + * Unlike most other callbacks, this function can be connected to (via dojo.connect) + * but should not be overridden. + * + */ + onLoad(): void; + /** + * Stub function to connect to if you want to do something + * (like disable/enable a submit button) when the valid + * state changes on the form as a whole. + * + * Deprecated. Will be removed in 2.0. Use watch("state", ...) instead. + * + * @param isValid + */ + onValidStateChange(isValid: boolean): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Dialog._DialogLevelManager.html + * + * Controls the various active "levels" on the page, starting with the + * stuff initially visible on the page (at z-index 0), and then having an entry for + * each Dialog shown. + * + */ + interface _DialogLevelManager { + /** + * Called when the specified dialog is hidden/destroyed, after the fade-out + * animation ends, in order to reset page focus, fix the underlay, etc. + * If the specified dialog isn't open then does nothing. + * + * Caller is responsible for either setting display:none on the dialog domNode, + * or calling dijit/popup.hide(), or removing it from the page DOM. + * + * @param dialog + */ + hide(dialog: dijit._WidgetBase): void; + /** + * Returns true if specified Dialog is the top in the task + * + * @param dialog + */ + isTop(dialog: dijit._WidgetBase): boolean; + /** + * Call right before fade-in animation for new dialog. + * Saves current focus, displays/adjusts underlay for new dialog, + * and sets the z-index of the dialog itself. + * + * New dialog will be displayed on top of all currently displayed dialogs. + * + * Caller is responsible for setting focus in new dialog after the fade-in + * animation completes. + * + * @param dialog + * @param underlayAttrs + */ + show(dialog: dijit._WidgetBase, underlayAttrs: Object): void; + } + } + + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/ColorPalette.html + * + * A keyboard accessible color-picking widget + * Grid showing various colors, so the user can pick a certain color. + * Can be used standalone, or as a popup. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class ColorPalette extends dijit._Widget implements dijit._TemplatedMixin, dijit._PaletteMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * CSS class applied to each cell in the palette + * + */ + "cellClass": string; + set(property:"cellClass", value: string): void; + get(property:"cellClass"): string; + watch(property:"cellClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Number of milliseconds before a held key or button becomes typematic + * + */ + "defaultTimeout": number; + set(property:"defaultTimeout", value: number): void; + get(property:"defaultTimeout"): number; + watch(property:"defaultTimeout", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Constructor for Object created for each cell of the palette. + * dyeClass should implement the dijit/_PaletteMixin.__Dye interface. + * + */ + "dyeClass": Function; + set(property:"dyeClass", value: Function): void; + get(property:"dyeClass"): Function; + watch(property:"dyeClass", callback:{(property?:string, oldValue?:Function, newValue?: Function):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Size of grid, either "7x10" or "3x4". + * + */ + "palette": string; + set(property:"palette", value: string): void; + get(property:"palette"): string; + watch(property:"palette", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Widget tab index. + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * The template of this widget. + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Fraction of time used to change the typematic timer between events + * 1.0 means that each typematic event fires at defaultTimeout intervals + * Less than 1.0 means that each typematic event fires at an increasing faster rate + * + */ + "timeoutChangeRate": number; + set(property:"timeoutChangeRate", value: number): void; + get(property:"timeoutChangeRate"): number; + watch(property:"timeoutChangeRate", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Currently selected color/emoticon/etc. + * + */ + "value": string; + set(property:"value", value: string): void; + get(property:"value"): string; + watch(property:"value", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Focus this widget. Puts focus on the most recently focused cell. + * + */ + focus(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Callback when a cell is selected. + * + * @param value Value corresponding to cell. + */ + onChange(value: String): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + module ColorPalette { + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/ColorPalette._Color.html + * + * Object associated with each cell in a ColorPalette palette. + * Implements dijit/Dye. + * + * @param alias English name of the color. + * @param row Vertical position in grid. + * @param col + * @param title Localized name of the color. + */ + class _Color extends dojo._base.Color { + constructor(alias: String, row: number, col: any, title: String); /** * */ @@ -4092,69 +15047,29 @@ declare module dojo { */ "g": number; /** - * Dictionary list of all CSS named colors, by name. Values are 3-item arrays with corresponding RG and B values. * */ - "named": Object; + "hcTemplate": string; /** * */ "r": number; /** - * Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, - * can reuse a previously allocated Color object for the result * - * @param start - * @param end - * @param weight - * @param obj Optional */ - blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj: dojo._base.Color): any; + "template": string; /** - * Builds a Color from a 3 or 4 element array, mapping each - * element in sequence to the rgb(a) values of the color. * - * @param a - * @param obj Optional + * @param cell + * @param blankGif */ - fromArray(a: any[], obj: dojo._base.Color): any; + fillCell(cell: HTMLElement, blankGif: String): void; /** - * Converts a hex string with a '#' prefix to a color object. - * Supports 12-bit #rgb shorthand. Optionally accepts a - * Color object to update with the parsed value. + * Note that although dijit._Color is initialized with a value like "white" getValue() always + * returns a hex value * - * @param color - * @param obj Optional */ - fromHex(color: String, obj: dojo._base.Color): any; - /** - * get rgb(a) array from css-style color declarations - * this function can handle all 4 CSS3 Color Module formats: rgb, - * rgba, hsl, hsla, including rgb(a) with percentage values. - * - * @param color - * @param obj Optional - */ - fromRgb(color: String, obj: dojo._base.Color): any; - /** - * Parses str for a color value. Accepts hex, rgb, and rgba - * style color values. - * Acceptable input values for str may include arrays of any form - * accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or - * rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, - * 10, 50)" - * - * @param str - * @param obj Optional - */ - fromString(str: String, obj: dojo._base.Color): any; - /** - * creates a greyscale color with an optional alpha - * - * @param g - * @param a Optional - */ - makeGrey(g: number, a: number): void; + getValue(): any; /** * makes sure that the object has correct attributes * @@ -4184,16 +15099,6 @@ declare module dojo { * @param color */ setColor(color: Object): Function; - /** - * Convert this Color to a CMY definition. - * - */ - toCmy(): Object; - /** - * Convert this Color to a CMYK definition. - * - */ - toCmyk(): Object; /** * Returns a css color string in rgb(a) representation * @@ -4205,16 +15110,6 @@ declare module dojo { * */ toHex(): String; - /** - * Convert this Color to an HSL definition. - * - */ - toHsl(): Object; - /** - * Convert this Color to an HSV definition. - * - */ - toHsv(): Object; /** * Returns 3 component array of rgb values * @@ -4232,12659 +15127,36050 @@ declare module dojo { */ toString(): any; } - module Color { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/Color.named.html - * - * Dictionary list of all CSS named colors, by name. Values are 3-item arrays with corresponding RG and B values. - * - */ - interface named { - /** - * - */ - aliceblue: any[]; - /** - * - */ - antiquewhite: any[]; - /** - * - */ - aqua: any[]; - /** - * - */ - aquamarine: any[]; - /** - * - */ - azure: any[]; - /** - * - */ - beige: any[]; - /** - * - */ - bisque: any[]; - /** - * - */ - black: any[]; - /** - * - */ - blanchedalmond: any[]; - /** - * - */ - blue: any[]; - /** - * - */ - blueviolet: any[]; - /** - * - */ - brown: any[]; - /** - * - */ - burlywood: any[]; - /** - * - */ - cadetblue: any[]; - /** - * - */ - chartreuse: any[]; - /** - * - */ - chocolate: any[]; - /** - * - */ - coral: any[]; - /** - * - */ - cornflowerblue: any[]; - /** - * - */ - cornsilk: any[]; - /** - * - */ - crimson: any[]; - /** - * - */ - cyan: any[]; - /** - * - */ - darkblue: any[]; - /** - * - */ - darkcyan: any[]; - /** - * - */ - darkgoldenrod: any[]; - /** - * - */ - darkgray: any[]; - /** - * - */ - darkgreen: any[]; - /** - * - */ - darkgrey: any[]; - /** - * - */ - darkkhaki: any[]; - /** - * - */ - darkmagenta: any[]; - /** - * - */ - darkolivegreen: any[]; - /** - * - */ - darkorange: any[]; - /** - * - */ - darkorchid: any[]; - /** - * - */ - darkred: any[]; - /** - * - */ - darksalmon: any[]; - /** - * - */ - darkseagreen: any[]; - /** - * - */ - darkslateblue: any[]; - /** - * - */ - darkslategray: any[]; - /** - * - */ - darkslategrey: any[]; - /** - * - */ - darkturquoise: any[]; - /** - * - */ - darkviolet: any[]; - /** - * - */ - deeppink: any[]; - /** - * - */ - deepskyblue: any[]; - /** - * - */ - dimgray: any[]; - /** - * - */ - dimgrey: any[]; - /** - * - */ - dodgerblue: any[]; - /** - * - */ - firebrick: any[]; - /** - * - */ - floralwhite: any[]; - /** - * - */ - forestgreen: any[]; - /** - * - */ - fuchsia: any[]; - /** - * - */ - gainsboro: any[]; - /** - * - */ - ghostwhite: any[]; - /** - * - */ - gold: any[]; - /** - * - */ - goldenrod: any[]; - /** - * - */ - gray: any[]; - /** - * - */ - green: any[]; - /** - * - */ - greenyellow: any[]; - /** - * - */ - grey: any[]; - /** - * - */ - honeydew: any[]; - /** - * - */ - hotpink: any[]; - /** - * - */ - indianred: any[]; - /** - * - */ - indigo: any[]; - /** - * - */ - ivory: any[]; - /** - * - */ - khaki: any[]; - /** - * - */ - lavender: any[]; - /** - * - */ - lavenderblush: any[]; - /** - * - */ - lawngreen: any[]; - /** - * - */ - lemonchiffon: any[]; - /** - * - */ - lightblue: any[]; - /** - * - */ - lightcoral: any[]; - /** - * - */ - lightcyan: any[]; - /** - * - */ - lightgoldenrodyellow: any[]; - /** - * - */ - lightgray: any[]; - /** - * - */ - lightgreen: any[]; - /** - * - */ - lightgrey: any[]; - /** - * - */ - lightpink: any[]; - /** - * - */ - lightsalmon: any[]; - /** - * - */ - lightseagreen: any[]; - /** - * - */ - lightskyblue: any[]; - /** - * - */ - lightslategray: any[]; - /** - * - */ - lightslategrey: any[]; - /** - * - */ - lightsteelblue: any[]; - /** - * - */ - lightyellow: any[]; - /** - * - */ - lime: any[]; - /** - * - */ - limegreen: any[]; - /** - * - */ - linen: any[]; - /** - * - */ - magenta: any[]; - /** - * - */ - maroon: any[]; - /** - * - */ - mediumaquamarine: any[]; - /** - * - */ - mediumblue: any[]; - /** - * - */ - mediumorchid: any[]; - /** - * - */ - mediumpurple: any[]; - /** - * - */ - mediumseagreen: any[]; - /** - * - */ - mediumslateblue: any[]; - /** - * - */ - mediumspringgreen: any[]; - /** - * - */ - mediumturquoise: any[]; - /** - * - */ - mediumvioletred: any[]; - /** - * - */ - midnightblue: any[]; - /** - * - */ - mintcream: any[]; - /** - * - */ - mistyrose: any[]; - /** - * - */ - moccasin: any[]; - /** - * - */ - navajowhite: any[]; - /** - * - */ - navy: any[]; - /** - * - */ - oldlace: any[]; - /** - * - */ - olive: any[]; - /** - * - */ - olivedrab: any[]; - /** - * - */ - orange: any[]; - /** - * - */ - orangered: any[]; - /** - * - */ - orchid: any[]; - /** - * - */ - palegoldenrod: any[]; - /** - * - */ - palegreen: any[]; - /** - * - */ - paleturquoise: any[]; - /** - * - */ - palevioletred: any[]; - /** - * - */ - papayawhip: any[]; - /** - * - */ - peachpuff: any[]; - /** - * - */ - peru: any[]; - /** - * - */ - pink: any[]; - /** - * - */ - plum: any[]; - /** - * - */ - powderblue: any[]; - /** - * - */ - purple: any[]; - /** - * - */ - red: any[]; - /** - * - */ - rosybrown: any[]; - /** - * - */ - royalblue: any[]; - /** - * - */ - saddlebrown: any[]; - /** - * - */ - salmon: any[]; - /** - * - */ - sandybrown: any[]; - /** - * - */ - seagreen: any[]; - /** - * - */ - seashell: any[]; - /** - * - */ - sienna: any[]; - /** - * - */ - silver: any[]; - /** - * - */ - skyblue: any[]; - /** - * - */ - slateblue: any[]; - /** - * - */ - slategray: any[]; - /** - * - */ - slategrey: any[]; - /** - * - */ - snow: any[]; - /** - * - */ - springgreen: any[]; - /** - * - */ - steelblue: any[]; - /** - * - */ - tan: any[]; - /** - * - */ - teal: any[]; - /** - * - */ - thistle: any[]; - /** - * - */ - tomato: any[]; - /** - * - */ - transparent: Object; - /** - * - */ - turquoise: any[]; - /** - * - */ - violet: any[]; - /** - * - */ - wheat: any[]; - /** - * - */ - white: any[]; - /** - * - */ - whitesmoke: any[]; - /** - * - */ - yellow: any[]; - /** - * - */ - yellowgreen: any[]; - } - } + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Fieldset.html + * + * An accessible fieldset that can be expanded or collapsed via + * its legend. Fieldset extends dijit.TitlePane. + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class Fieldset extends dijit.TitlePane { + constructor(params?: Object, srcNodeRef?: HTMLElement); /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/browser.html - * - * This module causes the browser-only base modules to be loaded. + * True if mouse was pressed while over this widget, and hasn't been released yet * */ - interface browser { - } + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/array.html - * - * The Javascript v1.6 array extensions. + * Object to which attach points and events will be scoped. Defaults + * to 'this'. * */ - interface array { - /** - * - */ - clearCache(): void; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: any[], callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: String, callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: any[], callback: String, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: String, callback: String, thisObject: Object): boolean; - /** - * Returns a new Array with those items from arr that match the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter - * - * @param arr the array to iterate over. - * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. - * @param thisObject Optionalmay be used to scope the call to callback - */ - filter(arr: any[], callback: Function, thisObject: Object): any[]; - /** - * Returns a new Array with those items from arr that match the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter - * - * @param arr the array to iterate over. - * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. - * @param thisObject Optionalmay be used to scope the call to callback - */ - filter(arr: any[], callback: String, thisObject: Object): any[]; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: any[], callback: Function, thisObject?: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: String, callback: Function, thisObject?: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: any[], callback: String, thisObject?: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: String, callback: String, thisObject?: Object): void; - /** - * locates the first index of the provided value in the - * passed array. If the value is not found, -1 is returned. - * This method corresponds to the JavaScript 1.6 Array.indexOf method, with two differences: - * - * when run over sparse arrays, the Dojo function invokes the callback for every index - * whereas JavaScript 1.6's indexOf skips the holes in the sparse array. - * uses equality (==) rather than strict equality (===) - * For details on this method, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf - * - * @param arr - * @param value - * @param fromIndex Optional - * @param findLast OptionalMakes indexOf() work like lastIndexOf(). Used internally; not meant for external usage. - */ - indexOf(arr: any[], value: Object, fromIndex: number, findLast: boolean): number; - /** - * locates the last index of the provided value in the passed - * array. If the value is not found, -1 is returned. - * This method corresponds to the JavaScript 1.6 Array.lastIndexOf method, with two differences: - * - * when run over sparse arrays, the Dojo function invokes the callback for every index - * whereas JavaScript 1.6's lasIndexOf skips the holes in the sparse array. - * uses equality (==) rather than strict equality (===) - * For details on this method, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/lastIndexOf - * - * @param arr - * @param value - * @param fromIndex Optional - */ - lastIndexOf(arr: any, value: any, fromIndex: number): number; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: any[], callback: Function, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: String, callback: Function, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: any[], callback: String, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: String, callback: String, thisObject: Object, Ctr: any): any[]; - /** - * Determines whether or not any item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some - * - * @param arr the array to iterate over. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - some(arr: any[], callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not any item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some - * - * @param arr the array to iterate over. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - some(arr: String, callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not any item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some - * - * @param arr the array to iterate over. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - some(arr: any[], callback: String, thisObject: Object): boolean; - /** - * Determines whether or not any item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some - * - * @param arr the array to iterate over. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - some(arr: String, callback: String, thisObject: Object): boolean; - } + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/connect.html - * - * This module defines the dojo.connect API. - * This modules also provides keyboard event handling helpers. - * This module exports an extension event for emulating Firefox's keypress handling. - * However, this extension event exists primarily for backwards compatibility and - * is not recommended. WebKit and IE uses an alternate keypress handling (only - * firing for printable characters, to distinguish from keydown events), and most - * consider the WebKit/IE behavior more desirable. + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } * */ - interface connect { - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: Object, method: String, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: any, method: String, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: Object, method: Function, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: any, method: Function, dontFix: boolean): any; - /** - * Ensure that every time obj.event() is called, a message is published - * on the topic. Returns a handle which can be passed to - * dojo.disconnect() to disable subsequent automatic publication on - * the topic. - * - * @param topic The name of the topic to publish. - * @param obj OptionalThe source object for the event function. Defaults to kernel.globalif null. - * @param event The name of the event function in obj.I.e. identifies a property obj[event]. - */ - connectPublisher(topic: String, obj: Object, event: String): any; - /** - * Remove a link created by dojo.connect. - * Removes the connection between event and the method referenced by handle. - * - * @param handle the return value of the dojo.connect call that created the connection. - */ - disconnect(handle: Object): void; - /** - * Checks an event for the copy key (meta on Mac, and ctrl anywhere else) - * - * @param e Event object to examine - */ - isCopyKey(e: Event): any; - /** - * Invoke all listener method subscribed to topic. - * - * @param topic The name of the topic to publish. - * @param args OptionalAn array of arguments. The arguments will be appliedto each topic subscriber (as first class parameters, via apply). - */ - publish(topic: String, args: any[]): any; - /** - * Attach a listener to a named topic. The listener function is invoked whenever the - * named topic is published (see: dojo.publish). - * Returns a handle which is needed to unsubscribe this listener. - * - * @param topic The topic to which to subscribe. - * @param context OptionalScope in which method will be invoked, or null for default scope. - * @param method The name of a function in context, or a function reference. This is the function thatis invoked when topic is published. - */ - subscribe(topic: String, context: Object, method: String): any; - /** - * Attach a listener to a named topic. The listener function is invoked whenever the - * named topic is published (see: dojo.publish). - * Returns a handle which is needed to unsubscribe this listener. - * - * @param topic The topic to which to subscribe. - * @param context OptionalScope in which method will be invoked, or null for default scope. - * @param method The name of a function in context, or a function reference. This is the function thatis invoked when topic is published. - */ - subscribe(topic: String, context: Object, method: Function): any; - /** - * Remove a topic listener. - * - * @param handle The handle returned from a call to subscribe. - */ - unsubscribe(handle: Object): void; - } + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/event.html - * - * This module defines dojo DOM event API. Usually you should use dojo/on, and evt.stopPropagation() + - * evt.preventDefault(), rather than this module. + * The root className to use for the various states of this widget * */ - interface event { - /** - * normalizes properties on the event object including event - * bubbling methods, keystroke normalization, and x/y positions - * - * @param evt native event object - * @param sender node to treat as "currentTarget" - */ - fix(evt: Event, sender: HTMLElement): Event; - /** - * prevents propagation and clobbers the default action of the - * passed event - * - * @param evt The event object. If omitted, window.event is used on IE. - */ - stop(evt: Event): void; - } + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/html.html - * - * This module is a stub for the core dojo DOM API. * */ - interface html { - } + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/json.html - * - * This module defines the dojo JSON API. + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. * */ - interface json { - } - - module fx { - /** - * A generic animation class that fires callbacks into its handlers - * object at various states. - * A generic animation class that fires callbacks into its handlers - * object at various states. Nearly all dojo animation functions - * return an instance of this method, usually without calling the - * .play() method beforehand. Therefore, you will likely need to - * call .play() on instances of Animation when one is - * returned. - * - * @param args The 'magic argument', mixing all the properties into thisanimation instance. - */ - interface Animation { } - } - + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/fx.html - * - * This module defines the base dojo/_base/fx implementation. + * The innerHTML of the ContentPane. + * Note that the initialization parameter / argument to set("content", ...) + * can be a String, DomNode, Nodelist, or _Widget. * */ - interface fx { - /** - * A simpler interface to animateProperty(), also returns - * an instance of Animation but begins the animation - * immediately, unlike nearly every other Dojo animation API. - * Simpler (but somewhat less powerful) version - * of animateProperty. It uses defaults for many basic properties - * and allows for positional parameters to be used in place of the - * packed "property bag" which is used for other Dojo animation - * methods. - * - * The Animation object returned will be already playing, so - * calling play() on it again is (usually) a no-op. - * - * @param node a DOM node or the id of a node to animate CSS properties on - * @param properties - * @param duration OptionalThe number of milliseconds over which the animationshould run. Defaults to the global animation default duration(350ms). - * @param easing OptionalAn easing function over which to calculate accelerationand deceleration of the animation through its duration.A default easing algorithm is provided, but you mayplug in any you wish. A large selection of easing algorithmsare available in dojo/fx/easing. - * @param onEnd OptionalA function to be called when the animation finishesrunning. - * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. - */ - anim (node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; - /** - * A simpler interface to animateProperty(), also returns - * an instance of Animation but begins the animation - * immediately, unlike nearly every other Dojo animation API. - * Simpler (but somewhat less powerful) version - * of animateProperty. It uses defaults for many basic properties - * and allows for positional parameters to be used in place of the - * packed "property bag" which is used for other Dojo animation - * methods. - * - * The Animation object returned will be already playing, so - * calling play() on it again is (usually) a no-op. - * - * @param node a DOM node or the id of a node to animate CSS properties on - * @param properties - * @param duration OptionalThe number of milliseconds over which the animationshould run. Defaults to the global animation default duration(350ms). - * @param easing OptionalAn easing function over which to calculate accelerationand deceleration of the animation through its duration.A default easing algorithm is provided, but you mayplug in any you wish. A large selection of easing algorithmsare available in dojo/fx/easing. - * @param onEnd OptionalA function to be called when the animation finishesrunning. - * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. - */ - anim (node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any ; - /** - * Returns an animation that will transition the properties of - * node defined in args depending how they are defined in - * args.properties - * Foundation of most dojo/_base/fx - * animations. It takes an object of "properties" corresponding to - * style properties, and animates them in parallel over a set - * duration. - * - * @param args An object with the following properties:properties (Object, optional): A hash map of style properties to Objects describing the transition,such as the properties of _Line with an additional 'units' propertynode (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - animateProperty (args: Object): any ; - - /** - * Returns an animation that will fade node defined in 'args' from - * its current opacity to fully opaque. - * - * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - fadeIn (args: Object): any ; - /** - * Returns an animation that will fade node defined in 'args' - * from its current opacity to fully transparent. - * - * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - fadeOut (args: Object): any ; - } + "content": string; + set(property:"content", value: string): void; + get(property:"content"): string; + watch(property:"content", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/query.html - * - * Deprecated. Use dojo/query instead. + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. * */ - interface query { - } + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/NodeList.html - * - * This module extends dojo/NodeList with the legacy connect(), coords(), - * blur(), focus(), change(), click(), error(), keydown(), keypress(), - * keyup(), load(), mousedown(), mouseenter(), mouseleave(), mousemove(), - * mouseout(), mouseover(), mouseup(), and submit() methods. + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. * */ - interface NodeList { - } + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/sniff.html - * - * Deprecated. New code should use dojo/sniff. - * This module populates the dojo browser version sniffing properties like dojo.isIE. + * Don't change this parameter from the default value. + * This ContentPane parameter doesn't make sense for TitlePane, since TitlePane + * is never a child of a layout container, nor should TitlePane try to control + * the size of an inner widget. * */ - interface sniff { - } + "doLayout": boolean; + set(property:"doLayout", value: boolean): void; + get(property:"doLayout"): boolean; + watch(property:"doLayout", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/lang.html - * - * This module defines Javascript language extensions. + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. * */ - interface lang { - /** - * Clones objects (including DOM nodes) and all children. - * Warning: do not clone cyclic structures. - * - * @param src The object to clone - */ - clone(src: any): any; - /** - * Returns a new object which "looks" to obj for properties which it - * does not have a value for. Optionally takes a bag of properties to - * seed the returned object with initially. - * This is a small implementation of the Boodman/Crockford delegation - * pattern in JavaScript. An intermediate object constructor mediates - * the prototype chain for the returned object, using it to delegate - * down to obj for property lookup when object-local lookup fails. - * This can be thought of similarly to ES4's "wrap", save that it does - * not act on types but rather on pure objects. - * - * @param obj The object to delegate to for properties not found directly on thereturn object or in props. - * @param props an object containing properties to assign to the returned object - */ - delegate(obj: Object, props: Object[]): any; - /** - * determine if an object supports a given method - * useful for longer api chains where you have to test each object in - * the chain. Useful for object and method detection. - * - * @param name Path to an object, in the form "A.B.C". - * @param obj OptionalObject to use as root of path. Defaults to'dojo.global'. Null may be passed. - */ - exists(name: String, obj: Object): boolean; - /** - * Adds all properties and methods of props to constructor's - * prototype, making them available to all instances created with - * constructor. - * - * @param ctor Target constructor to extend. - * @param props One or more objects to mix into ctor.prototype - */ - extend(ctor: Object, props: Object): Object; - /** - * Get a property from a dot-separated string, such as "A.B.C" - * Useful for longer api chains where you have to test each object in - * the chain, or when you have an object reference in string format. - * - * @param name Path to an property, in the form "A.B.C". - * @param create OptionalOptional. Defaults to false. If true, Objects will becreated at any point along the 'path' that is undefined. - * @param context OptionalOptional. Object to use as root of path. Defaults to'dojo.global'. Null may be passed. - */ - getObject(name: String, create: boolean, context: Object): any; - /** - * Returns a function that will only ever execute in the a given scope. - * This allows for easy use of object member functions - * in callbacks and other places in which the "this" keyword may - * otherwise not reference the expected scope. - * Any number of default positional arguments may be passed as parameters - * beyond "method". - * Each of these values will be used to "placehold" (similar to curry) - * for the hitched function. - * - * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. - * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. - */ - hitch(scope: Object, method: Function): any; - /** - * Returns a function that will only ever execute in the a given scope. - * This allows for easy use of object member functions - * in callbacks and other places in which the "this" keyword may - * otherwise not reference the expected scope. - * Any number of default positional arguments may be passed as parameters - * beyond "method". - * Each of these values will be used to "placehold" (similar to curry) - * for the hitched function. - * - * @param scope The scope to use when method executes. If method is a string,scope is also the object containing method. - * @param method A function to be hitched to scope, or the name of the method inscope to be hitched. - */ - hitch(scope: Object, method: String[]): any; - /** - * Returns true if it is a built-in function or some other kind of - * oddball that should report as a function but doesn't - * - * @param it - */ - isAlien(it: any): any; - /** - * Return true if it is an Array. - * Does not work on Arrays created in other windows. - * - * @param it Item to test. - */ - isArray(it: any): any; - /** - * similar to isArray() but more permissive - * Doesn't strongly test for "arrayness". Instead, settles for "isn't - * a string or number and has a length property". Arguments objects - * and DOM collections will return true when passed to - * isArrayLike(), but will return false when passed to - * isArray(). - * - * @param it Item to test. - */ - isArrayLike(it: any): any; - /** - * Return true if it is a Function - * - * @param it Item to test. - */ - isFunction(it: any): boolean; - /** - * Returns true if it is a JavaScript object (or an Array, a Function - * or null) - * - * @param it Item to test. - */ - isObject(it: any): boolean; - /** - * Return true if it is a String - * - * @param it Item to test. - */ - isString(it: any): boolean; - /** - * Copies/adds all properties of one or more sources to dest; returns dest. - * All properties, including functions (sometimes termed "methods"), excluding any non-standard extensions - * found in Object.prototype, are copied/added from sources to dest. sources are processed left to right. - * The Javascript assignment operator is used to copy/add each property; therefore, by default, mixin - * executes a so-called "shallow copy" and aggregate types are copied/added by reference. - * - * @param dest The object to which to copy/add all properties contained in source. If dest is falsy, thena new object is manufactured before copying/adding properties begins. - * @param sources One of more objects from which to draw all properties to copy into dest. sources are processedleft-to-right and if more than one of these objects contain the same property name, the right-mostvalue "wins". - */ - mixin(dest: Object, sources: Object[]): Object; - /** - * similar to hitch() except that the scope object is left to be - * whatever the execution context eventually becomes. - * Calling lang.partial is the functional equivalent of calling: - * - * lang.hitch(null, funcName, ...); - * - * @param method The function to "wrap" - */ - partial(method: Function): any; - /** - * similar to hitch() except that the scope object is left to be - * whatever the execution context eventually becomes. - * Calling lang.partial is the functional equivalent of calling: - * - * lang.hitch(null, funcName, ...); - * - * @param method The function to "wrap" - */ - partial(method: String): any; - /** - * Performs parameterized substitutions on a string. Throws an - * exception if any parameter is unmatched. - * - * @param tmpl String to be used as a template. - * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). - * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". - */ - replace(tmpl: String, map: Object, pattern: RegExp): String; - /** - * Performs parameterized substitutions on a string. Throws an - * exception if any parameter is unmatched. - * - * @param tmpl String to be used as a template. - * @param map If an object, it is used as a dictionary to look up substitutions.If a function, it is called for every substitution with following parameters:a whole match, a name, an offset, and the whole templatestring (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replacefor more details). - * @param pattern OptionalOptional regular expression objects that overrides the default pattern.Must be global and match one item. The default is: /{([^}]+)}/g,which matches patterns like that: "{xxx}", where "xxx" is any sequenceof characters, which doesn't include "}". - */ - replace(tmpl: String, map: Function, pattern: RegExp): String; - /** - * Set a property from a dot-separated string, such as "A.B.C" - * Useful for longer api chains where you have to test each object in - * the chain, or when you have an object reference in string format. - * Objects are created as needed along path. Returns the passed - * value if setting is successful or undefined if not. - * - * @param name Path to a property, in the form "A.B.C". - * @param value value or object to place at location given by name - * @param context OptionalOptional. Object to use as root of path. Defaults todojo.global. - */ - setObject(name: String, value: any, context: Object): any; - /** - * Trims whitespace from both sides of the string - * This version of trim() was selected for inclusion into the base due - * to its compact size and relatively good performance - * (see Steven Levithan's blog - * Uses String.prototype.trim instead, if available. - * The fastest but longest version of this function is located at - * lang.string.trim() - * - * @param str String to be trimmed - */ - trim(str: String): String; - } + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/unload.html - * - * This module contains the document and window unload detection API. + * Time in milliseconds to fade in/fade out * */ - interface unload { - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Object, functionName: String): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Function, functionName: String): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Object, functionName: Function): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Function, functionName: Function): void; - /** - * registers a function to be triggered when window.onunload - * fires. - * The first time that addOnWindowUnload is called Dojo - * will register a page listener to trigger your unload - * handler with. Note that registering these handlers may - * destroy "fastback" page caching in browsers that support - * it. Be careful trying to modify the DOM or access - * JavaScript properties during this phase of page unloading: - * they may not always be available. Consider - * addOnUnload() if you need to modify the DOM or do - * heavy JavaScript work since it fires at the equivalent of - * the page's "onbeforeunload" event. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Object, functionName: String): void; - /** - * registers a function to be triggered when window.onunload - * fires. - * The first time that addOnWindowUnload is called Dojo - * will register a page listener to trigger your unload - * handler with. Note that registering these handlers may - * destroy "fastback" page caching in browsers that support - * it. Be careful trying to modify the DOM or access - * JavaScript properties during this phase of page unloading: - * they may not always be available. Consider - * addOnUnload() if you need to modify the DOM or do - * heavy JavaScript work since it fires at the equivalent of - * the page's "onbeforeunload" event. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Function, functionName: String): void; - /** - * registers a function to be triggered when window.onunload - * fires. - * The first time that addOnWindowUnload is called Dojo - * will register a page listener to trigger your unload - * handler with. Note that registering these handlers may - * destroy "fastback" page caching in browsers that support - * it. Be careful trying to modify the DOM or access - * JavaScript properties during this phase of page unloading: - * they may not always be available. Consider - * addOnUnload() if you need to modify the DOM or do - * heavy JavaScript work since it fires at the equivalent of - * the page's "onbeforeunload" event. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Object, functionName: Function): void; - /** - * registers a function to be triggered when window.onunload - * fires. - * The first time that addOnWindowUnload is called Dojo - * will register a page listener to trigger your unload - * handler with. Note that registering these handlers may - * destroy "fastback" page caching in browsers that support - * it. Be careful trying to modify the DOM or access - * JavaScript properties during this phase of page unloading: - * they may not always be available. Consider - * addOnUnload() if you need to modify the DOM or do - * heavy JavaScript work since it fires at the equivalent of - * the page's "onbeforeunload" event. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Function, functionName: Function): void; - } + "duration": number; + set(property:"duration", value: number): void; + get(property:"duration"): number; + watch(property:"duration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.html - * - * API to save/set/restore the global/document scope. + * Message that shows if an error occurs * */ - interface window { - /** - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * - */ - doc: Object; - /** - * Alias for the current window. 'global' can be modified - * for temporary context shifting. See also withGlobal(). - * - */ - global: Object; - /** - * Return the body element of the specified document or of dojo/_base/window::doc. - * - * @param doc Optional - */ - body(doc: HTMLDocument): any; - /** - * changes the behavior of many core Dojo functions that deal with - * namespace and DOM lookup, changing them to work in a new global - * context (e.g., an iframe). The varibles dojo.global and dojo.doc - * are modified as a result of calling this function and the result of - * dojo.body() likewise differs. - * - * @param globalObject - * @param globalDocument - */ - setContext(globalObject: Object, globalDocument: HTMLDocument): void; - /** - * Invoke callback with documentObject as dojo/_base/window::doc. - * Invoke callback with documentObject as dojo/_base/window::doc. If provided, - * callback will be executed in the context of object thisObject - * When callback() returns or throws an error, the dojo/_base/window::doc will - * be restored to its previous state. - * - * @param documentObject - * @param callback - * @param thisObject Optional - * @param cbArguments Optional - */ - withDoc(documentObject: HTMLDocument, callback: Function, thisObject: Object, cbArguments: any[]): any; - /** - * Invoke callback with globalObject as dojo.global and - * globalObject.document as dojo.doc. - * Invoke callback with globalObject as dojo.global and - * globalObject.document as dojo.doc. If provided, globalObject - * will be executed in the context of object thisObject - * When callback() returns or throws an error, the dojo.global - * and dojo.doc will be restored to its previous state. - * - * @param globalObject - * @param callback - * @param thisObject Optional - * @param cbArguments Optional - */ - withGlobal(globalObject: Object, callback: Function, thisObject: Object, cbArguments: any[]): any; - } - module window { - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.doc.html - * - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * Use this rather than referring to 'window.document' to ensure your code runs - * correctly in managed contexts. - * - */ - interface doc { - /** - * - */ - documentElement: Object; - /** - * - */ - dojoClick: boolean; - } - /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/window.global.html - * - * Alias for the current window. 'global' can be modified - * for temporary context shifting. See also withGlobal(). - * Use this rather than referring to 'window' to ensure your code runs - * correctly in managed contexts. - * - */ - interface global { - /** - * - */ - $(): any; - /** - * - * @param start - * @param data - * @param responseCode - * @param errorMsg - */ - GoogleSearchStoreCallback_undefined_NaN(start: any, data: any, responseCode: any, errorMsg: any): void; - /** - * - */ - jQuery(): any; - /** - * - */ - swfIsInHTML(): void; - /** - * - */ - undefined_onload(): void; - } - } - + "errorMessage": string; + set(property:"errorMessage", value: string): void; + get(property:"errorMessage"): string; + watch(property:"errorMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} /** - * Permalink: http://dojotoolkit.org/api/1.9/dojo/_base/kernel.html - * - * This module is the foundational module of the dojo boot sequence; it defines the dojo object. + * Extract visible content from inside of .... . + * I.e., strip and (and it's contents) from the href * */ - interface kernel { - /** - * Browser history management resources - * - */ - back: Object; - /** - * - */ - baseUrl: string; - /** - * - */ - behavior: Object; - /** - * - */ - cldr: Object; - /** - * - */ - colors: Object; - /** - * This module defines the user configuration during bootstrap. - * - */ - config: Object; - /** - * - */ - connectPublisher: Object; - /** - * A map of available XHR transport handle types. Name matches the - * handleAs attribute passed to XHR calls. - * - */ - contentHandlers: Object; - /** - * localized formatting and parsing routines for currencies - * - */ - currency: Object; - /** - * - */ - data: Object; - /** - * - */ - date: Object; - /** - * - */ - dijit: Object; - /** - * - */ - dnd: Object; - /** - * Alias for the current document. 'doc' can be modified - * for temporary context shifting. See also withDoc(). - * - */ - doc: Object; - /** - * - */ - dojox: Object; - /** - * Effects library on top of Base animations - * - */ - fx: Object; - /** - * TODOC - * - */ - gears: Object; - /** - * Alias for the current window. 'global' can be modified - * for temporary context shifting. See also withGlobal(). - * - */ - global: Object; - /** - * TODOC - * - */ - html: Object; - /** - * This module implements the dojo/i18n! plugin and the v1.6- i18n API - * - */ - i18n: Object; - /** - * - */ - io: Object; - /** - * True if client is Adobe Air - * - */ - isAir: boolean; - /** - * Version as a Number if client is android browser. undefined otherwise. - * - */ - isAndroid: number; - /** - * - */ - isAsync: boolean; - /** - * - */ - isBrowser: boolean; - /** - * Version as a Number if client is Chrome browser. undefined otherwise. - * - */ - isChrome: number; - /** - * - */ - isCopyKey: Object; - /** - * - */ - isFF: Object; - /** - * Version as a Number if client is MSIE(PC). undefined otherwise. Corresponds to - * major detected IE version (6, 7, 8, etc.) - * - */ - isIE: number; - /** - * Version as a Number if client is iPhone, iPod, or iPad. undefined otherwise. - * - */ - isIos: number; - /** - * Version as a Number if client is a KHTML browser. undefined otherwise. Corresponds to major - * detected version. - * - */ - isKhtml: number; - /** - * True if the client runs on Mac - * - */ - isMac: boolean; - /** - * - */ - isMoz: Object; - /** - * - */ - isMozilla: Object; - /** - * Version as a Number if client is Opera. undefined otherwise. Corresponds to - * major detected version. - * - */ - isOpera: number; - /** - * - */ - isQuirks: boolean; - /** - * Version as a Number if client is Safari or iPhone. undefined otherwise. - * - */ - isSafari: number; - /** - * - */ - isSpidermonkey: boolean; - /** - * Version as a Number if client is a WebKit-derived browser (Konqueror, - * Safari, Chrome, etc.). undefined otherwise. - * - */ - isWebKit: number; - /** - * True if client is Wii - * - */ - isWii: boolean; - /** - * Definitions for common key values. Client code should test keyCode against these named constants, - * as the actual codes can vary by browser. - * - */ - keys: Object; - /** - * - */ - locale: Object; - /** - * - */ - mouseButtons: Object; - /** - * localized formatting and parsing routines for Number - * - */ - number: Object; - /** - * - */ - parser: string; - /** - * - */ - publish: Object; - /** - * - */ - query: Object; - /** - * Regular expressions and Builder resources - * - */ - regexp: Object; - /** - * - */ - rpc: Object; - /** - * - */ - scopeMap: Object; - /** - * - */ - store: Object; - /** - * String utilities for Dojo - * - */ - string: Object; - /** - * - */ - subscribe: Object; - /** - * D.O.H. Test files for Dojo unit testing. - * - */ - tests: Object; - /** - * - */ - toJsonIndentStr: string; - /** - * This module provides unified touch event handlers by exporting - * press, move, release and cancel which can also run well on desktop. - * Based on http://dvcs.w3.org/hg/webevents/raw-file/tip/touchevents.html - * Also, if the dojoClick property is set to truthy on a DOM node, dojo/touch generates - * click events immediately for this node and its descendants (except for descendants that - * have a dojoClick property set to falsy), to avoid the delay before native browser click events, - * and regardless of whether evt.preventDefault() was called in a touch.press event listener. - * - */ - touch: Object; - /** - * Version number of the Dojo Toolkit - * - */ - version: Object; - /** - * TODOC - * - */ - window: Object; - /** - * A registry to make contextual calling/searching easier. - * Objects of this class keep list of arrays in the form [name, check, - * wrap, directReturn] that are used to determine what the contextual - * result of a set of checked arguments is. All check/wrap functions - * in this registry should be of the same arity. - * - * @param returnWrappers Optional - */ - AdapterRegistry(returnWrappers: boolean): void; - /** - * Adds the specified classes to the end of the class list on the - * passed node. Will not re-apply duplicate classes. - * - * @param node String ID or DomNode reference to add a class string too - * @param classStr A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(node: String, classStr: String): void; - /** - * Adds the specified classes to the end of the class list on the - * passed node. Will not re-apply duplicate classes. - * - * @param node String ID or DomNode reference to add a class string too - * @param classStr A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(node: HTMLElement, classStr: String): void; - /** - * Adds the specified classes to the end of the class list on the - * passed node. Will not re-apply duplicate classes. - * - * @param node String ID or DomNode reference to add a class string too - * @param classStr A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(node: String, classStr: any[]): void; - /** - * Adds the specified classes to the end of the class list on the - * passed node. Will not re-apply duplicate classes. - * - * @param node String ID or DomNode reference to add a class string too - * @param classStr A String class name to add, or several space-separated class names,or an array of class names. - */ - addClass(node: HTMLElement, classStr: any[]): void; - /** - * Add a function to execute on DOM content loaded and all requested modules have arrived and been evaluated. - * In most cases, the domReady plug-in should suffice and this method should not be needed. - * - * When called in a non-browser environment, just checks that all requested modules have arrived and been - * evaluated. - * - * @param priority OptionalThe order in which to exec this callback relative to other callbacks, defaults to 1000 - * @param context The context in which to run execute callback, or a callback if not using context - * @param callback OptionalThe function to execute. - */ - addOnLoad(priority: number, context: any, callback: Function): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Object, functionName: String): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Function, functionName: String): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Object, functionName: Function): void; - /** - * registers a function to be triggered when the page unloads. - * The first time that addOnUnload is called Dojo will - * register a page listener to trigger your unload handler - * with. - * - * In a browser environment, the functions will be triggered - * during the window.onbeforeunload event. Be careful of doing - * too much work in an unload handler. onbeforeunload can be - * triggered if a link to download a file is clicked, or if - * the link is a javascript: link. In these cases, the - * onbeforeunload event fires, but the document is not - * actually destroyed. So be careful about doing destructive - * operations in a dojo.addOnUnload callback. - * - * Further note that calling dojo.addOnUnload will prevent - * browsers from using a "fast back" cache to make page - * loading via back button instantaneous. - * - * @param obj Optional - * @param functionName Optional - */ - addOnUnload(obj: Function, functionName: Function): void; - /** - * registers a function to be triggered when window.onunload fires. - * Be careful trying to modify the DOM or access JavaScript properties - * during this phase of page unloading: they may not always be available. - * Consider dojo.addOnUnload() if you need to modify the DOM or do heavy - * JavaScript work. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Object, functionName: String): void; - /** - * registers a function to be triggered when window.onunload fires. - * Be careful trying to modify the DOM or access JavaScript properties - * during this phase of page unloading: they may not always be available. - * Consider dojo.addOnUnload() if you need to modify the DOM or do heavy - * JavaScript work. - * - * @param obj Optional - * @param functionName Optional - */ - addOnWindowUnload(obj: Object, functionName: Function): void; - /** - * A simpler interface to animateProperty(), also returns - * an instance of Animation but begins the animation - * immediately, unlike nearly every other Dojo animation API. - * Simpler (but somewhat less powerful) version - * of animateProperty. It uses defaults for many basic properties - * and allows for positional parameters to be used in place of the - * packed "property bag" which is used for other Dojo animation - * methods. - * - * The Animation object returned will be already playing, so - * calling play() on it again is (usually) a no-op. - * - * @param node a DOM node or the id of a node to animate CSS properties on - * @param properties - * @param duration OptionalThe number of milliseconds over which the animationshould run. Defaults to the global animation default duration(350ms). - * @param easing OptionalAn easing function over which to calculate accelerationand deceleration of the animation through its duration.A default easing algorithm is provided, but you mayplug in any you wish. A large selection of easing algorithmsare available in dojo/fx/easing. - * @param onEnd OptionalA function to be called when the animation finishesrunning. - * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. - */ - anim(node: HTMLElement, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; - /** - * A simpler interface to animateProperty(), also returns - * an instance of Animation but begins the animation - * immediately, unlike nearly every other Dojo animation API. - * Simpler (but somewhat less powerful) version - * of animateProperty. It uses defaults for many basic properties - * and allows for positional parameters to be used in place of the - * packed "property bag" which is used for other Dojo animation - * methods. - * - * The Animation object returned will be already playing, so - * calling play() on it again is (usually) a no-op. - * - * @param node a DOM node or the id of a node to animate CSS properties on - * @param properties - * @param duration OptionalThe number of milliseconds over which the animationshould run. Defaults to the global animation default duration(350ms). - * @param easing OptionalAn easing function over which to calculate accelerationand deceleration of the animation through its duration.A default easing algorithm is provided, but you mayplug in any you wish. A large selection of easing algorithmsare available in dojo/fx/easing. - * @param onEnd OptionalA function to be called when the animation finishesrunning. - * @param delay OptionalThe number of milliseconds to delay beginning theanimation by. The default is 0. - */ - anim(node: String, properties: Object, duration: number, easing: Function, onEnd: Function, delay: number): any; - /** - * Returns an animation that will transition the properties of - * node defined in args depending how they are defined in - * args.properties - * Foundation of most dojo/_base/fx - * animations. It takes an object of "properties" corresponding to - * style properties, and animates them in parallel over a set - * duration. - * - * @param args An object with the following properties:properties (Object, optional): A hash map of style properties to Objects describing the transition,such as the properties of _Line with an additional 'units' propertynode (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - animateProperty(args: Object): any; - /** - * A generic animation class that fires callbacks into its handlers - * object at various states. - * A generic animation class that fires callbacks into its handlers - * object at various states. Nearly all dojo animation functions - * return an instance of this method, usually without calling the - * .play() method beforehand. Therefore, you will likely need to - * call .play() on instances of Animation when one is - * returned. - * - * @param args The 'magic argument', mixing all the properties into thisanimation instance. - */ - Animation(args: Object): void; - /** - * Gets or sets an attribute on an HTML element. - * Handles normalized getting and setting of attributes on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the attribute on - * @param name the name of the attribute to get or set. - * @param value OptionalThe value to set for the attribute - */ - attr(node: HTMLElement, name: String, value: String): any; - /** - * Gets or sets an attribute on an HTML element. - * Handles normalized getting and setting of attributes on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the attribute on - * @param name the name of the attribute to get or set. - * @param value OptionalThe value to set for the attribute - */ - attr(node: String, name: String, value: String): any; - /** - * Gets or sets an attribute on an HTML element. - * Handles normalized getting and setting of attributes on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the attribute on - * @param name the name of the attribute to get or set. - * @param value OptionalThe value to set for the attribute - */ - attr(node: HTMLElement, name: Object, value: String): any; - /** - * Gets or sets an attribute on an HTML element. - * Handles normalized getting and setting of attributes on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the attribute on - * @param name the name of the attribute to get or set. - * @param value OptionalThe value to set for the attribute - */ - attr(node: String, name: Object, value: String): any; - /** - * Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend, - * can reuse a previously allocated Color object for the result - * - * @param start - * @param end - * @param weight - * @param obj Optional - */ - blendColors(start: dojo._base.Color, end: dojo._base.Color, weight: number, obj: dojo._base.Color): any; - /** - * Return the body element of the specified document or of dojo/_base/window::doc. - * - * @param doc Optional - */ - body(doc: HTMLDocument): any; - /** - * Returns DOM node with matching id attribute or falsy value (ex: null or undefined) - * if not found. If id is a DomNode, this function is a no-op. - * - * @param id A string to match an HTML id attribute or a reference to a DOM Node - * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. - */ - byId(id: String, doc: HTMLDocument): any; - /** - * Returns DOM node with matching id attribute or falsy value (ex: null or undefined) - * if not found. If id is a DomNode, this function is a no-op. - * - * @param id A string to match an HTML id attribute or a reference to a DOM Node - * @param doc OptionalDocument to work in. Defaults to the current value ofdojo/_base/window.doc. Can be used to retrievenode references from other documents. - */ - byId(id: HTMLElement, doc: HTMLDocument): any; - /** - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - cache(module: String, url: String, value: String): any; - /** - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - cache(module: Object, url: String, value: String): any; - /** - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - cache(module: String, url: String, value: Object): any; - /** - * A getter and setter for storing the string content associated with the - * module and url arguments. - * If module is a string that contains slashes, then it is interpretted as a fully - * resolved path (typically a result returned by require.toUrl), and url should not be - * provided. This is the preferred signature. If module is a string that does not - * contain slashes, then url must also be provided and module and url are used to - * call dojo.moduleUrl() to generate a module URL. This signature is deprecated. - * If value is specified, the cache value for the moduleUrl will be set to - * that value. Otherwise, dojo.cache will fetch the moduleUrl and store it - * in its internal cache and return that cached value for the URL. To clear - * a cache value pass null for value. Since XMLHttpRequest (XHR) is used to fetch the - * the URL contents, only modules on the same domain of the page can use this capability. - * The build system can inline the cache values though, to allow for xdomain hosting. - * - * @param module dojo/cldr/supplemental - * @param url The rest of the path to append to the path derived from the module argument. Ifmodule is an object, then this second argument should be the "value" argument instead. - * @param value OptionalIf a String, the value to use in the cache for the module/url combination.If an Object, it can have two properties: value and sanitize. The value propertyshould be the value to use in the cache, and sanitize can be set to true or false,to indicate if XML declarations should be removed from the value and if the HTMLinside a body tag in the value should be extracted as the real value. The value argumentor the value property on the value argument are usually only used by the build systemas it inlines cache content. - */ - cache(module: Object, url: String, value: Object): any; - /** - * - */ - clearCache(): void; - /** - * Takes a named string, hex string, array of rgb or rgba values, - * an object with r, g, b, and a properties, or another Color object - * and creates a new Color instance to work from. - * - * @param color - */ - Color(color: any[]): void; - /** - * Takes a named string, hex string, array of rgb or rgba values, - * an object with r, g, b, and a properties, or another Color object - * and creates a new Color instance to work from. - * - * @param color - */ - Color(color: String): void; - /** - * Takes a named string, hex string, array of rgb or rgba values, - * an object with r, g, b, and a properties, or another Color object - * and creates a new Color instance to work from. - * - * @param color - */ - Color(color: Object): void; - /** - * Builds a Color from a 3 or 4 element array, mapping each - * element in sequence to the rgb(a) values of the color. - * - * @param a - * @param obj Optional - */ - colorFromArray(a: any[], obj: dojo._base.Color): any; - /** - * Converts a hex string with a '#' prefix to a color object. - * Supports 12-bit #rgb shorthand. Optionally accepts a - * Color object to update with the parsed value. - * - * @param color - * @param obj Optional - */ - colorFromHex(color: String, obj: dojo._base.Color): any; - /** - * get rgb(a) array from css-style color declarations - * this function can handle all 4 CSS3 Color Module formats: rgb, - * rgba, hsl, hsla, including rgb(a) with percentage values. - * - * @param color - * @param obj Optional - */ - colorFromRgb(color: String, obj: dojo._base.Color): any; - /** - * Parses str for a color value. Accepts hex, rgb, and rgba - * style color values. - * Acceptable input values for str may include arrays of any form - * accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or - * rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10, - * 10, 50)" - * - * @param str - * @param obj Optional - */ - colorFromString(str: String, obj: dojo._base.Color): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: Object, method: String, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: any, method: String, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: Object, method: Function, dontFix: boolean): any; - /** - * dojo.connect is a deprecated event handling and delegation method in - * Dojo. It allows one function to "listen in" on the execution of - * any other, triggering the second whenever the first is called. Many - * listeners may be attached to a function, and source functions may - * be either regular function calls or DOM events. - * Connects listeners to actions, so that after event fires, a - * listener is called with the same arguments passed to the original - * function. - * - * Since dojo.connect allows the source of events to be either a - * "regular" JavaScript function or a DOM event, it provides a uniform - * interface for listening to all the types of events that an - * application is likely to deal with though a single, unified - * interface. DOM programmers may want to think of it as - * "addEventListener for everything and anything". - * - * When setting up a connection, the event parameter must be a - * string that is the name of the method/event to be listened for. If - * obj is null, kernel.global is assumed, meaning that connections - * to global methods are supported but also that you may inadvertently - * connect to a global by passing an incorrect object name or invalid - * reference. - * - * dojo.connect generally is forgiving. If you pass the name of a - * function or method that does not yet exist on obj, connect will - * not fail, but will instead set up a stub method. Similarly, null - * arguments may simply be omitted such that fewer than 4 arguments - * may be required to set up a connection See the examples for details. - * - * The return value is a handle that is needed to - * remove this connection with dojo.disconnect. - * - * @param obj OptionalThe source object for the event function.Defaults to kernel.global if null.If obj is a DOM node, the connection is delegatedto the DOM event manager (unless dontFix is true). - * @param event String name of the event function in obj.I.e. identifies a property obj[event]. - * @param context The object that method will receive as "this".If context is null and method is a function, then methodinherits the context of event.If method is a string then context must be the sourceobject object for method (context[method]). If context is null,kernel.global is used. - * @param method A function reference, or name of a function in context.The function identified by method fires after event does.method receives the same arguments as the event.See context argument comments for information on method's scope. - * @param dontFix OptionalIf obj is a DOM node, set dontFix to true to prevent delegationof this connection to the DOM event manager. - */ - connect(obj: Object, event: String, context: any, method: Function, dontFix: boolean): any; - /** - * Getter/setter for the content-box of node. - * Returns an object in the expected format of box (regardless if box is passed). - * The object might look like: - * { l: 50, t: 200, w: 300: h: 150 } - * for a node offset from its parent 50px to the left, 200px from - * the top with a content width of 300px and a content-height of - * 150px. Note that the content box may have a much larger border - * or margin box, depending on the box model currently in use and - * CSS values set/inherited for node. - * While the getter will return top and left values, the - * setter only accepts setting the width and height. - * - * @param node id or reference to DOM Node to get/set box for - * @param box OptionalIf passed, denotes that dojo.contentBox() shouldupdate/set the content box for node. Box is an object in theabove format, but only w (width) and h (height) are supported.All properties are optional if passed. - */ - contentBox(node: HTMLElement, box: Object): any; - /** - * Getter/setter for the content-box of node. - * Returns an object in the expected format of box (regardless if box is passed). - * The object might look like: - * { l: 50, t: 200, w: 300: h: 150 } - * for a node offset from its parent 50px to the left, 200px from - * the top with a content width of 300px and a content-height of - * 150px. Note that the content box may have a much larger border - * or margin box, depending on the box model currently in use and - * CSS values set/inherited for node. - * While the getter will return top and left values, the - * setter only accepts setting the width and height. - * - * @param node id or reference to DOM Node to get/set box for - * @param box OptionalIf passed, denotes that dojo.contentBox() shouldupdate/set the content box for node. Box is an object in theabove format, but only w (width) and h (height) are supported.All properties are optional if passed. - */ - contentBox(node: String, box: Object): any; - /** - * Get or set a cookie. - * If one argument is passed, returns the value of the cookie - * For two or more arguments, acts as a setter. - * - * @param name Name of the cookie - * @param value OptionalValue for the cookie - * @param props OptionalProperties for the cookie - */ - cookie(name: String, value: String, props: Object): any; - /** - * Deprecated: Use position() for border-box x/y/w/h - * or marginBox() for margin-box w/h/l/t. - * - * Returns an object that measures margin-box (w)idth/(h)eight - * and absolute position x/y of the border-box. Also returned - * is computed (l)eft and (t)op values in pixels from the - * node's offsetParent as returned from marginBox(). - * Return value will be in the form: - * - * { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 } - * Does not act as a setter. If includeScroll is passed, the x and - * - * y params are affected as one would expect in dojo.position(). - * - * @param node - * @param includeScroll Optional - */ - coords(node: HTMLElement, includeScroll: boolean): any; - /** - * Deprecated: Use position() for border-box x/y/w/h - * or marginBox() for margin-box w/h/l/t. - * - * Returns an object that measures margin-box (w)idth/(h)eight - * and absolute position x/y of the border-box. Also returned - * is computed (l)eft and (t)op values in pixels from the - * node's offsetParent as returned from marginBox(). - * Return value will be in the form: - * - * { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 } - * Does not act as a setter. If includeScroll is passed, the x and - * - * y params are affected as one would expect in dojo.position(). - * - * @param node - * @param includeScroll Optional - */ - coords(node: String, includeScroll: boolean): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: HTMLElement, attrs: Object, refNode: HTMLElement, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: String, attrs: Object, refNode: HTMLElement, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: HTMLElement, attrs: Object, refNode: String, pos: String): any; - /** - * Create an element, allowing for optional attribute decoration - * and placement. - * A DOM Element creation function. A shorthand method for creating a node or - * a fragment, and allowing for a convenient optional attribute setting step, - * as well as an optional DOM placement reference. - * - * Attributes are set by passing the optional object through dojo.setAttr. - * See dojo.setAttr for noted caveats and nuances, and API if applicable. - * - * Placement is done via dojo.place, assuming the new node to be the action - * node, passing along the optional reference node and position. - * - * @param tag A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),or an existing DOM node to process. - * @param attrs An object-hash of attributes to set on the newly created node.Can be null, if you don't want to set any attributes/styles.See: dojo.setAttr for a description of available attributes. - * @param refNode OptionalOptional reference node. Used by dojo.place to place the newly creatednode somewhere in the dom relative to refNode. Can be a DomNode referenceor String ID of a node. - * @param pos OptionalOptional positional reference. Defaults to "last" by way of dojo.place,though can be set to "first","after","before","last", "replace" or "only"to further control the placement of the new node relative to the refNode.'refNode' is required if a 'pos' is specified. - */ - create(tag: String, attrs: Object, refNode: String, pos: String): any; - /** - * Create a feature-rich constructor from compact notation. - * Create a constructor using a compact notation for inheritance and - * prototype extension. - * - * Mixin ancestors provide a type of multiple inheritance. - * Prototypes of mixin ancestors are copied to the new class: - * changes to mixin prototypes will not affect classes to which - * they have been mixed in. - * - * Ancestors can be compound classes created by this version of - * declare(). In complex cases all base classes are going to be - * linearized according to C3 MRO algorithm - * (see http://www.python.org/download/releases/2.3/mro/ for more - * details). - * - * "className" is cached in "declaredClass" property of the new class, - * if it was supplied. The immediate super class will be cached in - * "superclass" property of the new class. - * - * Methods in "props" will be copied and modified: "nom" property - * (the declared name of the method) will be added to all copied - * functions to help identify them for the internal machinery. Be - * very careful, while reusing methods: if you use the same - * function under different names, it can produce errors in some - * cases. - * - * It is possible to use constructors created "manually" (without - * declare()) as bases. They will be called as usual during the - * creation of an instance, their methods will be chained, and even - * called by "this.inherited()". - * - * Special property "-chains-" governs how to chain methods. It is - * a dictionary, which uses method names as keys, and hint strings - * as values. If a hint string is "after", this method will be - * called after methods of its base classes. If a hint string is - * "before", this method will be called before methods of its base - * classes. - * - * If "constructor" is not mentioned in "-chains-" property, it will - * be chained using the legacy mode: using "after" chaining, - * calling preamble() method before each constructor, if available, - * and calling postscript() after all constructors were executed. - * If the hint is "after", it is chained as a regular method, but - * postscript() will be called after the chain of constructors. - * "constructor" cannot be chained "before", but it allows - * a special hint string: "manual", which means that constructors - * are not going to be chained in any way, and programmer will call - * them manually using this.inherited(). In the latter case - * postscript() will be called after the construction. - * - * All chaining hints are "inherited" from base classes and - * potentially can be overridden. Be very careful when overriding - * hints! Make sure that all chained methods can work in a proposed - * manner of chaining. - * - * Once a method was chained, it is impossible to unchain it. The - * only exception is "constructor". You don't need to define a - * method in order to supply a chaining hint. - * - * If a method is chained, it cannot use this.inherited() because - * all other methods in the hierarchy will be called automatically. - * - * Usually constructors and initializers of any kind are chained - * using "after" and destructors of any kind are chained as - * "before". Note that chaining assumes that chained methods do not - * return any value: any returned value will be discarded. - * - * @param className OptionalThe optional name of the constructor (loosely, a "class")stored in the "declaredClass" property in the created prototype.It will be used as a global name for a created constructor. - * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). - * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". - */ - declare(className: String, superclass: Function, props: Object): dojo._base.declare.__DeclareCreatedObject; - /** - * Create a feature-rich constructor from compact notation. - * Create a constructor using a compact notation for inheritance and - * prototype extension. - * - * Mixin ancestors provide a type of multiple inheritance. - * Prototypes of mixin ancestors are copied to the new class: - * changes to mixin prototypes will not affect classes to which - * they have been mixed in. - * - * Ancestors can be compound classes created by this version of - * declare(). In complex cases all base classes are going to be - * linearized according to C3 MRO algorithm - * (see http://www.python.org/download/releases/2.3/mro/ for more - * details). - * - * "className" is cached in "declaredClass" property of the new class, - * if it was supplied. The immediate super class will be cached in - * "superclass" property of the new class. - * - * Methods in "props" will be copied and modified: "nom" property - * (the declared name of the method) will be added to all copied - * functions to help identify them for the internal machinery. Be - * very careful, while reusing methods: if you use the same - * function under different names, it can produce errors in some - * cases. - * - * It is possible to use constructors created "manually" (without - * declare()) as bases. They will be called as usual during the - * creation of an instance, their methods will be chained, and even - * called by "this.inherited()". - * - * Special property "-chains-" governs how to chain methods. It is - * a dictionary, which uses method names as keys, and hint strings - * as values. If a hint string is "after", this method will be - * called after methods of its base classes. If a hint string is - * "before", this method will be called before methods of its base - * classes. - * - * If "constructor" is not mentioned in "-chains-" property, it will - * be chained using the legacy mode: using "after" chaining, - * calling preamble() method before each constructor, if available, - * and calling postscript() after all constructors were executed. - * If the hint is "after", it is chained as a regular method, but - * postscript() will be called after the chain of constructors. - * "constructor" cannot be chained "before", but it allows - * a special hint string: "manual", which means that constructors - * are not going to be chained in any way, and programmer will call - * them manually using this.inherited(). In the latter case - * postscript() will be called after the construction. - * - * All chaining hints are "inherited" from base classes and - * potentially can be overridden. Be very careful when overriding - * hints! Make sure that all chained methods can work in a proposed - * manner of chaining. - * - * Once a method was chained, it is impossible to unchain it. The - * only exception is "constructor". You don't need to define a - * method in order to supply a chaining hint. - * - * If a method is chained, it cannot use this.inherited() because - * all other methods in the hierarchy will be called automatically. - * - * Usually constructors and initializers of any kind are chained - * using "after" and destructors of any kind are chained as - * "before". Note that chaining assumes that chained methods do not - * return any value: any returned value will be discarded. - * - * @param className OptionalThe optional name of the constructor (loosely, a "class")stored in the "declaredClass" property in the created prototype.It will be used as a global name for a created constructor. - * @param superclass May be null, a Function, or an Array of Functions. This argumentspecifies a list of bases (the left-most one is the most deepestbase). - * @param props An object whose properties are copied to the created prototype.Add an instance-initialization function by making it a propertynamed "constructor". - */ - declare(className: String, superclass: Function[], props: Object): dojo._base.declare.__DeclareCreatedObject; - /** - * Deprecated. This module defines the legacy dojo/_base/Deferred API. - * New code should use dojo/Deferred instead. - * The Deferred API is based on the concept of promises that provide a - * generic interface into the eventual completion of an asynchronous action. - * The motivation for promises fundamentally is about creating a - * separation of concerns that allows one to achieve the same type of - * call patterns and logical data flow in asynchronous code as can be - * achieved in synchronous code. Promises allows one - * to be able to call a function purely with arguments needed for - * execution, without conflating the call with concerns of whether it is - * sync or async. One shouldn't need to alter a call's arguments if the - * implementation switches from sync to async (or vice versa). By having - * async functions return promises, the concerns of making the call are - * separated from the concerns of asynchronous interaction (which are - * handled by the promise). - * - * The Deferred is a type of promise that provides methods for fulfilling the - * promise with a successful result or an error. The most important method for - * working with Dojo's promises is the then() method, which follows the - * CommonJS proposed promise API. An example of using a Dojo promise: - * - * var resultingPromise = someAsyncOperation.then(function(result){ - * ... handle result ... - * }, - * function(error){ - * ... handle error ... - * }); - * The .then() call returns a new promise that represents the result of the - * execution of the callback. The callbacks will never affect the original promises value. - * - * The Deferred instances also provide the following functions for backwards compatibility: - * - * addCallback(handler) - * addErrback(handler) - * callback(result) - * errback(result) - * Callbacks are allowed to return promises themselves, so - * you can build complicated sequences of events with ease. - * - * The creator of the Deferred may specify a canceller. The canceller - * is a function that will be called if Deferred.cancel is called - * before the Deferred fires. You can use this to implement clean - * aborting of an XMLHttpRequest, etc. Note that cancel will fire the - * deferred with a CancelledError (unless your canceller returns - * another kind of error), so the errbacks should be prepared to - * handle that error for cancellable Deferreds. - * - * @param canceller Optional - */ - Deferred(canceller: Function): void; - /** - * Deprecated, use dojo/promise/all instead. - * Provides event handling for a group of Deferred objects. - * DeferredList takes an array of existing deferreds and returns a new deferred of its own - * this new deferred will typically have its callback fired when all of the deferreds in - * the given list have fired their own deferreds. The parameters fireOnOneCallback and - * fireOnOneErrback, will fire before all the deferreds as appropriate - * - * @param list The list of deferreds to be synchronizied with this DeferredList - * @param fireOnOneCallback OptionalWill cause the DeferredLists callback to be fired as soon as anyof the deferreds in its list have been fired instead of waiting untilthe entire list has finished - * @param fireOnOneErrback Optional - * @param consumeErrors Optional - * @param canceller OptionalA deferred canceller function, see dojo.Deferred - */ - DeferredList(list: any[], fireOnOneCallback: boolean, fireOnOneErrback: boolean, consumeErrors: boolean, canceller: Function): void; - /** - * Log a debug message to indicate that a behavior has been - * deprecated. - * - * @param behaviour The API or behavior being deprecated. Usually in the formof "myApp.someFunction()". - * @param extra OptionalText to append to the message. Often provides advice on anew function or facility to achieve the same goal duringthe deprecation period. - * @param removal OptionalText to indicate when in the future the behavior will beremoved. Usually a version number. - */ - deprecated(behaviour: String, extra: String, removal: String): void; - /** - * - * @param node - */ - destroy(node: any): void; - /** - * Remove a link created by dojo.connect. - * Removes the connection between event and the method referenced by handle. - * - * @param handle the return value of the dojo.connect call that created the connection. - */ - disconnect(handle: Object): void; - /** - * Returns an object with {node, x, y} with corresponding offsets. - * - * @param doc OptionalOptional document to query. If unspecified, use win.doc. - */ - docScroll(doc: HTMLDocument): Object; - /** - * - * @param node - */ - empty(node: any): void; - /** - * A legacy method created for use exclusively by internal Dojo methods. Do not use this method - * directly unless you understand its possibly-different implications on the platforms your are targeting. - * Makes an attempt to evaluate scriptText in the global scope. The function works correctly for browsers - * that support indirect eval. - * - * As usual, IE does not. On IE, the only way to implement global eval is to - * use execScript. Unfortunately, execScript does not return a value and breaks some current usages of dojo.eval. - * This implementation uses the technique of executing eval in the scope of a function that is a single scope - * frame below the global scope; thereby coming close to the global scope. Note carefully that - * - * dojo.eval("var pi = 3.14;"); - * - * will define global pi in non-IE environments, but define pi only in a temporary local scope for IE. If you want - * to define a global variable using dojo.eval, write something like - * - * dojo.eval("window.pi = 3.14;") - * - * @param scriptText The text to evaluation. - */ - eval(scriptText: any): any; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: any[], callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: String, callback: Function, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: any[], callback: String, thisObject: Object): boolean; - /** - * Determines whether or not every item in arr satisfies the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every - * - * @param arr the array to iterate on. If a string, operates on individual characters. - * @param callback a function is invoked with three arguments: item, index,and array and returns true if the condition is met. - * @param thisObject Optionalmay be used to scope the call to callback - */ - every(arr: String, callback: String, thisObject: Object): boolean; - /** - * - * @param exitcode - */ - exit(exitcode: any): void; - /** - * Marks code as experimental. - * This can be used to mark a function, file, or module as - * experimental. Experimental code is not ready to be used, and the - * APIs are subject to change without notice. Experimental code may be - * completed deleted without going through the normal deprecation - * process. - * - * @param moduleName The name of a module, or the name of a module file or a specificfunction - * @param extra Optionalsome additional message for the user - */ - experimental(moduleName: String, extra: String): void; - /** - * Returns an animation that will fade node defined in 'args' from - * its current opacity to fully opaque. - * - * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - fadeIn(args: Object): any; - /** - * Returns an animation that will fade node defined in 'args' - * from its current opacity to fully transparent. - * - * @param args An object with the following properties:node (DOMNode|String): The node referenced in the animationduration (Integer, optional): Duration of the animation in milliseconds.easing (Function, optional): An easing function. - */ - fadeOut(args: Object): any; - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: HTMLElement): Object; - /** - * Serialize a form field to a JavaScript object. - * Returns the value encoded in a form field as - * as a string or an array of strings. Disabled form elements - * and unchecked radio and checkboxes are skipped. Multi-select - * elements are returned as an array of string values. - * - * @param inputNode - */ - fieldToObject(inputNode: String): Object; - /** - * Returns a new Array with those items from arr that match the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter - * - * @param arr the array to iterate over. - * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. - * @param thisObject Optionalmay be used to scope the call to callback - */ - filter(arr: any[], callback: Function, thisObject: Object): any[]; - /** - * Returns a new Array with those items from arr that match the - * condition implemented by callback. - * This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter - * - * @param arr the array to iterate over. - * @param callback a function that is invoked with three arguments (item,index, array). The return of this function is expected tobe a boolean which determines whether the passed-in itemwill be included in the returned array. - * @param thisObject Optionalmay be used to scope the call to callback - */ - filter(arr: any[], callback: String, thisObject: Object): any[]; - /** - * normalizes properties on the event object including event - * bubbling methods, keystroke normalization, and x/y positions - * - * @param evt native event object - * @param sender node to treat as "currentTarget" - */ - fixEvent(evt: Event, sender: HTMLElement): Event; - /** - * In RTL direction, scrollLeft should be a negative value, but IE - * returns a positive one. All codes using documentElement.scrollLeft - * must call this function to fix this error, otherwise the position - * will offset to right when there is a horizontal scrollbar. - * - * @param scrollLeft - * @param doc OptionalOptional document to query. If unspecified, use win.doc. - */ - fixIeBiDiScrollLeft(scrollLeft: number, doc: HTMLDocument): number; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: any[], callback: Function, thisObject: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: String, callback: Function, thisObject: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: any[], callback: String, thisObject: Object): void; - /** - * for every item in arr, callback is invoked. Return values are ignored. - * If you want to break out of the loop, consider using array.every() or array.some(). - * forEach does not allow breaking out of the loop over the items in arr. - * This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach - * - * @param arr - * @param callback - * @param thisObject Optional - */ - forEach(arr: String, callback: String, thisObject: Object): void; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - formToJson(formNode: HTMLElement, prettyPrint: boolean): String; - /** - * Create a serialized JSON string from a form node or string - * ID identifying the form to serialize - * - * @param formNode - * @param prettyPrint Optional - */ - formToJson(formNode: String, prettyPrint: boolean): String; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - formToObject(formNode: HTMLElement): Object; - /** - * Serialize a form node to a JavaScript object. - * Returns the values encoded in an HTML form as - * string properties in an object which it then returns. Disabled form - * elements, buttons, and other non-value form elements are skipped. - * Multi-select elements are returned as an array of string values. - * - * @param formNode - */ - formToObject(formNode: String): Object; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - formToQuery(formNode: HTMLElement): String; - /** - * Returns a URL-encoded string representing the form passed as either a - * node or string ID identifying the form to serialize - * - * @param formNode - */ - formToQuery(formNode: String): String; - /** - * Parses a JavaScript expression and returns a JavaScript value. - * Throws for invalid JavaScript expressions. It does not use a strict JSON parser. It - * always delegates to eval(). The content passed to this method must therefore come - * from a trusted source. - * It is recommend that you use dojo/json's parse function for an - * implementation uses the (faster) native JSON parse when available. - * - * @param js a string literal of a JavaScript expression, for instance:'{ "foo": [ "bar", 1, { "baz": "thud" } ] }' - */ - fromJson(js: String): any; - /** - * Gets an attribute on an HTML element. - * Handles normalized getting of attributes on DOM Nodes. - * - * @param node id or reference to the element to get the attribute on - * @param name the name of the attribute to get. - */ - getAttr(node: HTMLElement, name: String): any; - /** - * Gets an attribute on an HTML element. - * Handles normalized getting of attributes on DOM Nodes. - * - * @param node id or reference to the element to get the attribute on - * @param name the name of the attribute to get. - */ - getAttr(node: String, name: String): any; - /** - * returns an object with properties useful for noting the border - * dimensions. - * l/t/r/b = the sum of left/top/right/bottom border (respectively) - * w = the sum of the left and right border - * h = the sum of the top and bottom border - * The w/h are used for calculating boxes. - * Normally application code will not need to invoke this - * directly, and will use the ...box... functions instead. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getBorderExtents(node: HTMLElement, computedStyle: Object): Object; - /** - * Returns a "computed style" object. - * Gets a "computed style" object which can be used to gather - * information about the current state of the rendered node. - * - * Note that this may behave differently on different browsers. - * Values may have different formats and value encodings across - * browsers. - * - * Note also that this method is expensive. Wherever possible, - * reuse the returned object. - * - * Use the dojo/dom-style.get() method for more consistent (pixelized) - * return values. - * - * @param node A reference to a DOM node. Does NOT support taking anID string for speed reasons. - */ - getComputedStyle(node: HTMLElement): void; - /** - * Returns an object that encodes the width, height, left and top - * positions of the node's content box, irrespective of the - * current box model. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getContentBox(node: HTMLElement, computedStyle: Object): Object; - /** - * returns the offset in x and y from the document body to the - * visual edge of the page for IE - * The following values in IE contain an offset: - * - * event.clientX - * event.clientY - * node.getBoundingClientRect().left - * node.getBoundingClientRect().top - * But other position related values do not contain this offset, - * - * such as node.offsetLeft, node.offsetTop, node.style.left and - * node.style.top. The offset is always (2, 2) in LTR direction. - * When the body is in RTL direction, the offset counts the width - * of left scroll bar's width. This function computes the actual - * offset. - * - * @param doc OptionalOptional document to query. If unspecified, use win.doc. - */ - getIeDocumentElementOffset(doc: HTMLDocument): Object; - /** - * - * @param moduleName - * @param bundleName - * @param locale - */ - getL10nName(moduleName: any, bundleName: any, locale: any): String; - /** - * returns an object that encodes the width, height, left and top - * positions of the node's margin box. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getMarginBox(node: HTMLElement, computedStyle: Object): Object; - /** - * returns object with properties useful for box fitting with - * regards to box margins (i.e., the outer-box). - * - * l/t = marginLeft, marginTop, respectively - * w = total width, margin inclusive - * h = total height, margin inclusive - * The w/h are used for calculating boxes. - * Normally application code will not need to invoke this - * directly, and will use the ...box... functions instead. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getMarginExtents(node: HTMLElement, computedStyle: Object): Object; - /** - * returns an object that encodes the width and height of - * the node's margin box - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getMarginSize(node: HTMLElement, computedStyle: Object): Object; - /** - * returns an object that encodes the width and height of - * the node's margin box - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getMarginSize(node: String, computedStyle: Object): Object; - /** - * Returns an effective value of a property or an attribute. - * - * @param node id or reference to the element to remove the attribute from - * @param name the name of the attribute - */ - getNodeProp(node: HTMLElement, name: String): any; - /** - * Returns an effective value of a property or an attribute. - * - * @param node id or reference to the element to remove the attribute from - * @param name the name of the attribute - */ - getNodeProp(node: String, name: String): any; - /** - * Returns object with properties useful for box fitting with - * regards to padding. - * l/t/r/b = the sum of left/top/right/bottom padding and left/top/right/bottom border (respectively) - * w = the sum of the left and right padding and border - * h = the sum of the top and bottom padding and border - * The w/h are used for calculating boxes. - * Normally application code will not need to invoke this - * directly, and will use the ...box... functions instead. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getPadBorderExtents(node: HTMLElement, computedStyle: Object): Object; - /** - * Returns object with special values specifically useful for node - * fitting. - * Returns an object with w, h, l, t properties: - * - * l/t/r/b = left/top/right/bottom padding (respectively) - * w = the total of the left and right padding - * h = the total of the top and bottom padding - * If 'node' has position, l/t forms the origin for child nodes. - * - * The w/h are used for calculating boxes. - * Normally application code will not need to invoke this - * directly, and will use the ...box... functions instead. - * - * @param node - * @param computedStyle OptionalThis parameter accepts computed styles object.If this parameter is omitted, the functions will calldojo/dom-style.getComputedStyle to get one. It is a better way, callingdojo/dom-style.getComputedStyle once, and then pass the reference to thiscomputedStyle parameter. Wherever possible, reuse the returnedobject of dojo/dom-style.getComputedStyle(). - */ - getPadExtents(node: HTMLElement, computedStyle: Object): Object; - /** - * Gets a property on an HTML element. - * Handles normalized getting of properties on DOM nodes. - * - * @param node id or reference to the element to get the property on - * @param name the name of the property to get. - */ - getProp(node: HTMLElement, name: String): any; - /** - * Gets a property on an HTML element. - * Handles normalized getting of properties on DOM nodes. - * - * @param node id or reference to the element to get the property on - * @param name the name of the property to get. - */ - getProp(node: String, name: String): any; - /** - * Accesses styles on a node. - * Getting the style value uses the computed style for the node, so the value - * will be a calculated value, not just the immediate node.style value. - * Also when getting values, use specific style names, - * like "borderBottomWidth" instead of "border" since compound values like - * "border" are not necessarily reflected as expected. - * If you want to get node dimensions, use dojo/dom-geometry.getMarginBox(), - * dojo/dom-geometry.getContentBox() or dojo/dom-geometry.getPosition(). - * - * @param node id or reference to node to get style for - * @param name Optionalthe style property to get - */ - getStyle(node: HTMLElement, name: String): any; - /** - * Accesses styles on a node. - * Getting the style value uses the computed style for the node, so the value - * will be a calculated value, not just the immediate node.style value. - * Also when getting values, use specific style names, - * like "borderBottomWidth" instead of "border" since compound values like - * "border" are not necessarily reflected as expected. - * If you want to get node dimensions, use dojo/dom-geometry.getMarginBox(), - * dojo/dom-geometry.getContentBox() or dojo/dom-geometry.getPosition(). - * - * @param node id or reference to node to get style for - * @param name Optionalthe style property to get - */ - getStyle(node: String, name: String): any; - /** - * Returns true if the requested attribute is specified on the - * given element, and false otherwise. - * - * @param node id or reference to the element to check - * @param name the name of the attribute - */ - hasAttr(node: HTMLElement, name: String): boolean; - /** - * Returns true if the requested attribute is specified on the - * given element, and false otherwise. - * - * @param node id or reference to the element to check - * @param name the name of the attribute - */ - hasAttr(node: String, name: String): boolean; - /** - * Returns whether or not the specified classes are a portion of the - * class list currently applied to the node. - * - * @param node String ID or DomNode reference to check the class for. - * @param classStr A string class name to look for. - */ - hasClass(node: String, classStr: String): boolean; - /** - * Returns whether or not the specified classes are a portion of the - * class list currently applied to the node. - * - * @param node String ID or DomNode reference to check the class for. - * @param classStr A string class name to look for. - */ - hasClass(node: HTMLElement, classStr: String): boolean; - /** - * Gets or sets the hash string in the browser URL. - * Handles getting and setting of location.hash. - * - * If no arguments are passed, acts as a getter. - * If a string is passed, acts as a setter. - * - * @param hash Optionalthe hash is set - #string. - * @param replace OptionalIf true, updates the hash value in the current historystate instead of creating a new history state. - */ - hash(hash: String, replace: boolean): any; - /** - * locates the first index of the provided value in the - * passed array. If the value is not found, -1 is returned. - * This method corresponds to the JavaScript 1.6 Array.indexOf method, with two differences: - * - * when run over sparse arrays, the Dojo function invokes the callback for every index - * whereas JavaScript 1.6's indexOf skips the holes in the sparse array. - * uses equality (==) rather than strict equality (===) - * For details on this method, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf - * - * @param arr - * @param value - * @param fromIndex Optional - * @param findLast OptionalMakes indexOf() work like lastIndexOf(). Used internally; not meant for external usage. - */ - indexOf(arr: any[], value: Object, fromIndex: number, findLast: boolean): number; - /** - * Returns true if the current language is left-to-right, and false otherwise. - * - * @param doc OptionalOptional document to query. If unspecified, use win.doc. - */ - isBodyLtr(doc: HTMLDocument): boolean; - /** - * Returns true if node is a descendant of ancestor - * - * @param node string id or node reference to test - * @param ancestor string id or node reference of potential parent to test against - */ - isDescendant(node: HTMLElement, ancestor: HTMLElement): boolean; - /** - * Returns true if node is a descendant of ancestor - * - * @param node string id or node reference to test - * @param ancestor string id or node reference of potential parent to test against - */ - isDescendant(node: String, ancestor: HTMLElement): boolean; - /** - * Returns true if node is a descendant of ancestor - * - * @param node string id or node reference to test - * @param ancestor string id or node reference of potential parent to test against - */ - isDescendant(node: HTMLElement, ancestor: String): boolean; - /** - * Returns true if node is a descendant of ancestor - * - * @param node string id or node reference to test - * @param ancestor string id or node reference of potential parent to test against - */ - isDescendant(node: String, ancestor: String): boolean; - /** - * locates the last index of the provided value in the passed - * array. If the value is not found, -1 is returned. - * This method corresponds to the JavaScript 1.6 Array.lastIndexOf method, with two differences: - * - * when run over sparse arrays, the Dojo function invokes the callback for every index - * whereas JavaScript 1.6's lasIndexOf skips the holes in the sparse array. - * uses equality (==) rather than strict equality (===) - * For details on this method, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/lastIndexOf - * - * @param arr - * @param value - * @param fromIndex Optional - */ - lastIndexOf(arr: any, value: any, fromIndex: number): number; - /** - * - * @param f - */ - loadInit(f: any): void; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: any[], callback: Function, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: String, callback: Function, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: any[], callback: String, thisObject: Object, Ctr: any): any[]; - /** - * applies callback to each element of arr and returns - * an Array with the results - * This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when - * run over sparse arrays, this implementation passes the "holes" in the sparse array to - * the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array. - * For more details, see: - * https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map - * - * @param arr the array to iterate on. If a string, operates onindividual characters. - * @param callback a function is invoked with three arguments, (item, index,array), and returns a value - * @param thisObject Optionalmay be used to scope the call to callback - * @param Ctr - */ - map(arr: String, callback: String, thisObject: Object, Ctr: any): any[]; - /** - * Getter/setter for the margin-box of node. - * Getter/setter for the margin-box of node. - * Returns an object in the expected format of box (regardless - * if box is passed). The object might look like: - * { l: 50, t: 200, w: 300: h: 150 } - * for a node offset from its parent 50px to the left, 200px from - * the top with a margin width of 300px and a margin-height of - * 150px. - * - * @param node id or reference to DOM Node to get/set box for - * @param box OptionalIf passed, denotes that dojo.marginBox() shouldupdate/set the margin box for node. Box is an object in theabove format. All properties are optional if passed. - */ - marginBox(node: HTMLElement, box: Object): any; - /** - * Getter/setter for the margin-box of node. - * Getter/setter for the margin-box of node. - * Returns an object in the expected format of box (regardless - * if box is passed). The object might look like: - * { l: 50, t: 200, w: 300: h: 150 } - * for a node offset from its parent 50px to the left, 200px from - * the top with a margin width of 300px and a margin-height of - * 150px. - * - * @param node id or reference to DOM Node to get/set box for - * @param box OptionalIf passed, denotes that dojo.marginBox() shouldupdate/set the margin box for node. Box is an object in theabove format. All properties are optional if passed. - */ - marginBox(node: String, box: Object): any; - /** - * Returns a URL relative to a module. - * - * @param module dojo/dom-class - * @param url Optional - */ - moduleUrl(module: String, url: String): String; - /** - * Array-like object which adds syntactic - * sugar for chaining, common iteration operations, animation, and - * node manipulation. NodeLists are most often returned as the - * result of dojo/query() calls. - * NodeList instances provide many utilities that reflect - * core Dojo APIs for Array iteration and manipulation, DOM - * manipulation, and event handling. Instead of needing to dig up - * functions in the dojo package, NodeLists generally make the - * full power of Dojo available for DOM manipulation tasks in a - * simple, chainable way. - * - * @param array - */ - NodeList(array: any): any[]; - /** - * takes a name/value mapping object and returns a string representing - * a URL-encoded version of that object. - * - * @param map - */ - objectToQuery(map: Object): any; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: HTMLElement, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: HTMLElement, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: String, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: String, position: String): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: HTMLElement, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: HTMLElement, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: HTMLElement, refNode: String, position: number): HTMLElement; - /** - * Attempt to insert node into the DOM, choosing from various positioning options. - * Returns the first argument resolved to a DOM node. - * - * @param node id or node reference, or HTML fragment starting with "<" to place relative to refNode - * @param refNode id or node reference to use as basis for placement - * @param position Optionalstring noting the position of node relative to refNode or anumber indicating the location in the childNodes collection of refNode.Accepted string values are:beforeafterreplaceonlyfirstlast"first" and "last" indicate positions as children of refNode, "replace" replaces refNode,"only" replaces all children. position defaults to "last" if not specified - */ - place(node: String, refNode: String, position: number): HTMLElement; - /** - * require one or more modules based on which host environment - * Dojo is currently operating in - * This method takes a "map" of arrays which one can use to - * optionally load dojo modules. The map is indexed by the - * possible dojo.name values, with two additional values: - * "default" and "common". The items in the "default" array will - * be loaded if none of the other items have been choosen based on - * dojo.name, set by your host environment. The items in the - * "common" array will always be loaded, regardless of which - * list is chosen. - * - * @param modMap - */ - platformRequire(modMap: Object): void; - /** - * If the context stack contains elements, ensure that - * subsequent code executes in the previous context to the - * current context. The current context set ([global, - * document]) is returned. - * - */ - popContext(): void; - /** - * Gets the position and size of the passed element relative to - * the viewport (if includeScroll==false), or relative to the - * document root (if includeScroll==true). - * Returns an object of the form: - * { x: 100, y: 300, w: 20, h: 15 }. - * If includeScroll==true, the x and y values will include any - * document offsets that may affect the position relative to the - * viewport. - * Uses the border-box model (inclusive of border and padding but - * not margin). Does not act as a setter. - * - * @param node - * @param includeScroll Optional - */ - position(node: HTMLElement, includeScroll: boolean): Object; - /** - * Gets the position and size of the passed element relative to - * the viewport (if includeScroll==false), or relative to the - * document root (if includeScroll==true). - * Returns an object of the form: - * { x: 100, y: 300, w: 20, h: 15 }. - * If includeScroll==true, the x and y values will include any - * document offsets that may affect the position relative to the - * viewport. - * Uses the border-box model (inclusive of border and padding but - * not margin). Does not act as a setter. - * - * @param node - * @param includeScroll Optional - */ - position(node: String, includeScroll: boolean): Object; - /** - * Gets or sets a property on an HTML element. - * Handles normalized getting and setting of properties on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the property on - * @param name the name of the property to get or set. - * @param value OptionalThe value to set for the property - */ - prop(node: HTMLElement, name: String, value: String): any; - /** - * Gets or sets a property on an HTML element. - * Handles normalized getting and setting of properties on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the property on - * @param name the name of the property to get or set. - * @param value OptionalThe value to set for the property - */ - prop(node: String, name: String, value: String): any; - /** - * Gets or sets a property on an HTML element. - * Handles normalized getting and setting of properties on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the property on - * @param name the name of the property to get or set. - * @param value OptionalThe value to set for the property - */ - prop(node: HTMLElement, name: Object, value: String): any; - /** - * Gets or sets a property on an HTML element. - * Handles normalized getting and setting of properties on DOM - * Nodes. If 2 arguments are passed, and a the second argument is a - * string, acts as a getter. - * - * If a third argument is passed, or if the second argument is a - * map of attributes, acts as a setter. - * - * When passing functions as values, note that they will not be - * directly assigned to slots on the node, but rather the default - * behavior will be removed and the new behavior will be added - * using dojo.connect(), meaning that event handler properties - * will be normalized and that some caveats with regards to - * non-standard behaviors for onsubmit apply. Namely that you - * should cancel form submission using dojo.stopEvent() on the - * passed event object instead of returning a boolean value from - * the handler itself. - * - * @param node id or reference to the element to get or set the property on - * @param name the name of the property to get or set. - * @param value OptionalThe value to set for the property - */ - prop(node: String, name: Object, value: String): any; - /** - * - * @param mid - */ - provide(mid: any): void; - /** - * causes subsequent calls to Dojo methods to assume the - * passed object and, optionally, document as the default - * scopes to use. A 2-element array of the previous global and - * document are returned. - * dojo.pushContext treats contexts as a stack. The - * auto-detected contexts which are initially provided using - * dojo.setContext() require authors to keep state in order to - * "return" to a previous context, whereas the - * dojo.pushContext and dojo.popContext methods provide a more - * natural way to augment blocks of code to ensure that they - * execute in a different window or frame without issue. If - * called without any arguments, the default context (the - * context when Dojo is first loaded) is instead pushed into - * the stack. If only a single string is passed, a node in the - * intitial context's document is looked up and its - * contextWindow and contextDocument properties are used as - * the context to push. This means that iframes can be given - * an ID and code can be executed in the scope of the iframe's - * document in subsequent calls easily. - * - * @param g OptionalThe global context. If a string, the id of the frame tosearch for a context and document. - * @param d OptionalThe document element to execute subsequent code with. - */ - pushContext(g: Object, d: HTMLDocument): void; - /** - * causes subsequent calls to Dojo methods to assume the - * passed object and, optionally, document as the default - * scopes to use. A 2-element array of the previous global and - * document are returned. - * dojo.pushContext treats contexts as a stack. The - * auto-detected contexts which are initially provided using - * dojo.setContext() require authors to keep state in order to - * "return" to a previous context, whereas the - * dojo.pushContext and dojo.popContext methods provide a more - * natural way to augment blocks of code to ensure that they - * execute in a different window or frame without issue. If - * called without any arguments, the default context (the - * context when Dojo is first loaded) is instead pushed into - * the stack. If only a single string is passed, a node in the - * intitial context's document is looked up and its - * contextWindow and contextDocument properties are used as - * the context to push. This means that iframes can be given - * an ID and code can be executed in the scope of the iframe's - * document in subsequent calls easily. - * - * @param g OptionalThe global context. If a string, the id of the frame tosearch for a context and document. - * @param d OptionalThe document element to execute subsequent code with. - */ - pushContext(g: String, d: HTMLDocument): void; - /** - * Create an object representing a de-serialized query section of a - * URL. Query keys with multiple values are returned in an array. - * - * @param str - */ - queryToObject(str: String): Object; - /** - * Sends an HTTP POST request to the server. In addition to the properties - * listed for the dojo.__XhrArgs type, the following property is allowed: - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - rawXhrPost(args: Object): any; - /** - * Sends an HTTP PUT request to the server. In addition to the properties - * listed for the dojo.__XhrArgs type, the following property is allowed: - * - * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. - */ - rawXhrPut(args: Object): any; - /** - * Add a function to execute on DOM content loaded and all requested modules have arrived and been evaluated. - * In most cases, the domReady plug-in should suffice and this method should not be needed. - * - * When called in a non-browser environment, just checks that all requested modules have arrived and been - * evaluated. - * - * @param priority OptionalThe order in which to exec this callback relative to other callbacks, defaults to 1000 - * @param context The context in which to run execute callback, or a callback if not using context - * @param callback OptionalThe function to execute. - */ - ready(priority: number, context: any, callback: Function): void; - /** - * Maps a module name to a path - * An unregistered module is given the default path of ../[module], - * relative to Dojo root. For example, module acme is mapped to - * ../acme. If you want to use a different module name, use - * dojo.registerModulePath. - * - * @param moduleName - * @param prefix + "extractContent": boolean; + set(property:"extractContent", value: boolean): void; + get(property:"extractContent"): boolean; + watch(property:"extractContent", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The href of the content that displays now. + * Set this at construction if you want to load data externally when the + * pane is shown. (Set preload=true to load it immediately.) + * Changing href after creation doesn't have any effect; Use set('href', ...); + * + */ + "href": string; + set(property:"href", value: string): void; + get(property:"href"): string; + watch(property:"href", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Parameters to pass to xhrGet() request, for example: + * + *
+ * + */ + "ioArgs": Object; + set(property:"ioArgs", value: Object): void; + get(property:"ioArgs"): Object; + watch(property:"ioArgs", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Indicates that this widget will call resize() on it's child widgets + * when they become visible. + * + */ + "isLayoutContainer": boolean; + set(property:"isLayoutContainer", value: boolean): void; + get(property:"isLayoutContainer"): boolean; + watch(property:"isLayoutContainer", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if the ContentPane has data in it, either specified + * during initialization (via href or inline content), or set + * via set('content', ...) / set('href', ...) + * + * False if it doesn't have any content, or if ContentPane is + * still in the process of downloading href. + * + */ + "isLoaded": boolean; + set(property:"isLoaded", value: boolean): void; + get(property:"isLoaded"): boolean; + watch(property:"isLoaded", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Message that shows while downloading + * + */ + "loadingMessage": string; + set(property:"loadingMessage", value: string): void; + get(property:"loadingMessage"): string; + watch(property:"loadingMessage", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is the dojo.Deferred returned by set('href', ...) and refresh(). + * Calling onLoadDeferred.then() registers your + * callback to be called only once, when the prior set('href', ...) call or + * the initial href parameter to the constructor finishes loading. + * + * This is different than an onLoad() handler which gets called any time any href + * or content is loaded. + * + */ + "onLoadDeferred": Object; + set(property:"onLoadDeferred", value: Object): void; + get(property:"onLoadDeferred"): Object; + watch(property:"onLoadDeferred", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Whether fieldset is opened or closed. + * + */ + "open": boolean; + set(property:"open", value: boolean): void; + get(property:"open"): boolean; + watch(property:"open", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Parse content and create the widgets, if any. + * + */ + "parseOnLoad": boolean; + set(property:"parseOnLoad", value: boolean): void; + get(property:"parseOnLoad"): boolean; + watch(property:"parseOnLoad", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Flag passed to parser. Root for attribute names to search for. If scopeName is dojo, + * will search for data-dojo-type (or dojoType). For backwards compatibility + * reasons defaults to dojo._scopeName (which is "dojo" except when + * multi-version support is used, when it will be something like dojo16, dojo20, etc.) + * + */ + "parserScope": string; + set(property:"parserScope", value: string): void; + get(property:"parserScope"): string; + watch(property:"parserScope", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Force load of data on initialization even if pane is hidden. + * + */ + "preload": boolean; + set(property:"preload", value: boolean): void; + get(property:"preload"): boolean; + watch(property:"preload", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Prevent caching of data from href's by appending a timestamp to the href. + * + */ + "preventCache": boolean; + set(property:"preventCache", value: boolean): void; + get(property:"preventCache"): boolean; + watch(property:"preventCache", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Refresh (re-download) content when pane goes from hidden to shown + * + */ + "refreshOnShow": boolean; + set(property:"refreshOnShow", value: boolean): void; + get(property:"refreshOnShow"): boolean; + watch(property:"refreshOnShow", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * + */ + "stopParser": boolean; + set(property:"stopParser", value: boolean): void; + get(property:"stopParser"): boolean; + watch(property:"stopParser", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Tabindex setting for the title (so users can tab to the title then + * use space/enter to open/close the title pane) + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Content of the legend tag. Overrides tag if not empty. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Whether pane can be opened or closed by clicking the title bar. + * + */ + "toggleable": boolean; + set(property:"toggleable", value: boolean): void; + get(property:"toggleable"): boolean; + watch(property:"toggleable", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Makes the given widget a child of this widget. + * Inserts specified child widget's dom node as a child of this widget's + * container node, and possibly does other processing (such as layout). + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * + */ + buildRendering(): void; + /** + * Cancels an in-flight download of content + * + */ + cancel(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * + * @param params + * @param srcNodeRef + */ + create(params: any, srcNodeRef: any): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * + */ + destroy(): void; + /** + * Destroy all the widgets inside the ContentPane and empty containerNode + * + * @param preserveDom + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy the ContentPane and its contents + * + * @param preserveDom + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Function that should grab the content specified via href. + * + * @param args An object with the following properties:handleAs (String, optional): Acceptable values are: text (default), json, json-comment-optional,json-comment-filtered, javascript, xml. See dojo/_base/xhr.contentHandlerssync (Boolean, optional): false is default. Indicates whether the request shouldbe a synchronous (blocking) request.headers (Object, optional): Additional HTTP headers to send in the request.failOk (Boolean, optional): false is default. Indicates whether a request should beallowed to fail (and therefore no console error message inthe event of a failure)contentType (String|Boolean): "application/x-www-form-urlencoded" is default. Set to false toprevent a Content-Type header from being sent, or to a stringto send a different Content-Type.load: This function will becalled on a successful HTTP response code.error: This function willbe called when the request fails due to a network or server error, the urlis invalid, etc. It will also be called if the load or handle callback throws anexception, unless djConfig.debugAtAllCosts is true. This allows deployed applicationsto continue to run even when a logic error happens in the callback, while makingit easier to troubleshoot while in debug mode.handle: This function willbe called at the end of every request, whether or not an error occurs.url (String): URL to server endpoint.content (Object, optional): Contains properties with string values. Theseproperties will be serialized as name1=value2 andpassed in the request.timeout (Integer, optional): Milliseconds to wait for the response. If this timepasses, the then error callbacks are called.form (DOMNode, optional): DOM node for a form. Used to extract the form valuesand send to the server.preventCache (Boolean, optional): Default is false. If true, then a"dojo.preventCache" parameter is sent in the requestwith a value that changes with each request(timestamp). Useful only with GET-type requests.rawBody (String, optional): Sets the raw body for an HTTP request. If this is used, then the contentproperty is ignored. This is mostly useful for HTTP methods that havea body to their requests, like PUT or POST. This property can be used insteadof postData and putData for dojo/_base/xhr.rawXhrPost and dojo/_base/xhr.rawXhrPut respectively.ioPublish (Boolean, optional): Set this explicitly to false to prevent publishing of topics related toIO operations. Otherwise, if djConfig.ioPublish is set to true, topicswill be published via dojo/topic.publish() for different phases of an IO operation.See dojo/main.__IoPublish for a list of topics that are published. + */ + ioMethod(args: Object): any; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param params + * @param node + * @param ctor + */ + markupFactory(params: any, node: any, ctor: any): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * + */ + postMixInProperties(): void; + /** + * [Re]download contents of href and display + * cancels any currently in-flight requests + * posts "loading..." message + * sends XHR to download new data + * + */ + refresh(): any; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * See dijit/layout/_LayoutWidget.resize() for description. + * Although ContentPane doesn't extend _LayoutWidget, it does implement + * the same API. + * + * @param changeSize + * @param resultSize + */ + resize(changeSize: any, resultSize: any): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: String): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: HTMLElement): void; + /** + * Deprecated. Use set('content', ...) instead. + * + * @param data + */ + setContent(data: NodeList): void; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: String): any; + /** + * Deprecated. Use set('href', ...) instead. + * + * @param href + */ + setHref(href: URL): any; + /** + * Deprecated. Use set('title', ...) instead. + * + * @param title + */ + setTitle(title: String): void; + /** + * Call startup() on all children including non _Widget ones like dojo/dnd/Source objects + * + */ + startup(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Called when this widget is being displayed as a popup (ex: a Calendar popped + * up from a DateTextBox), and it is hidden. + * This is called from the dijit.popup code, and should not be called directly. + * + * Also used as a parameter for children of dijit/layout/StackContainer or subclasses. + * Callback if a user tries to close the child. Child will be closed if this function returns true. + * + */ + onClose(): boolean; + /** + * Called on DOM faults, require faults etc. in content. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * By default (if this method is not overriden), it returns + * nothing, so the error message is just printed to the console. + * + * @param error + */ + onContentError(error: Error): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * Called when download is finished. + * + */ + onDownloadEnd(): void; + /** + * Called when download error occurs. + * + * In order to display an error message in the pane, return + * the error message from this method, as an HTML string. + * + * Default behavior (if this method is not overriden) is to display + * the error message inside the pane. + * + * @param error + */ + onDownloadError(error: Error): any; + /** + * Called before download starts. + * The string returned by this function will be the html + * that tells the user we are loading something. + * Override with your own function if you want to change text. + * + */ + onDownloadStart(): any; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Event hook, is called after everything is loaded and widgetified + * + * @param data + */ + onLoad(data: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + /** + * Event hook, is called before old content is cleared + * + */ + onUnload(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/DropDownMenu.html + * + * A menu, without features for context menu (Meaning, drop down menu) + * + * @param params Hash of initialization parameters for widget, including scalar values (like title, duration etc.)and functions, typically callbacks like onClick.The hash can contain any of the widget's properties, excluding read-only properties. + * @param srcNodeRef OptionalIf a srcNodeRef (DOM node) is specified:use srcNodeRef.innerHTML as my contentsif this is a behavioral widget then apply behavior to that srcNodeRefotherwise, replace srcNodeRef with my generated DOM tree + */ + class DropDownMenu extends dijit._MenuBase implements dijit._OnDijitClickMixin { + constructor(params?: Object, srcNodeRef?: HTMLElement); + /** + * This Menu has been clicked (mouse or via space/arrow key) or opened as a submenu, + * so mere mouseover will open submenus. Focusing a menu via TAB does NOT automatically make it active + * since TAB is a navigation operation and not a selection one. + * For Windows apps, pressing the ALT key focuses the menubar menus (similar to TAB navigation) but the + * menu is not active (ie no dropdown) until an item is clicked. + * + */ + "activated": boolean; + set(property:"activated", value: boolean): void; + get(property:"activated"): boolean; + watch(property:"activated", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * True if mouse was pressed while over this widget, and hasn't been released yet + * + */ + "active": boolean; + set(property:"active", value: boolean): void; + get(property:"active"): boolean; + watch(property:"active", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Object to which attach points and events will be scoped. Defaults + * to 'this'. + * + */ + "attachScope": Object; + set(property:"attachScope", value: Object): void; + get(property:"attachScope"): Object; + watch(property:"attachScope", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Deprecated. Instead of attributeMap, widget should have a _setXXXAttr attribute + * for each XXX attribute to be mapped to the DOM. + * + * 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 set('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 innerText + * title: { node: "titleNode", type: "innerText" } + * Maps this.title to this.titleNode.innerText + * + * 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" } + * + */ + "attributeMap": Object; + set(property:"attributeMap", value: Object): void; + get(property:"attributeMap"): Object; + watch(property:"attributeMap", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * A toggle to control whether or not a Menu gets focused when opened as a drop down from a MenuBar + * or DropDownButton/ComboButton. Note though that it always get focused when opened via the keyboard. + * + */ + "autoFocus": boolean; + set(property:"autoFocus", value: boolean): void; + get(property:"autoFocus"): boolean; + watch(property:"autoFocus", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * + */ + "baseClass": string; + set(property:"baseClass", value: string): void; + get(property:"baseClass"): string; + watch(property:"baseClass", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "class": string; + set(property:"class", value: string): void; + get(property:"class"): string; + watch(property:"class", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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: + * + *
+ * here's a plain DOM node + * and a widget + * and another plain DOM node + *
+ * containerNode would point to: + * + * here's a plain DOM node + * and a widget + * and another plain DOM node + * In templated widgets, "containerNode" is set via a + * data-dojo-attach-point 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. + * + */ + "containerNode": HTMLElement; + set(property:"containerNode", value: HTMLElement): void; + get(property:"containerNode"): HTMLElement; + watch(property:"containerNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * Subclasses may define a cssStateNodes property that lists sub-nodes within the widget that + * need CSS classes applied on mouse hover/press and focus. + * + * Each entry in this optional hash is a an attach-point name (like "upArrowButton") mapped to a CSS class name + * (like "dijitUpArrowButton"). Example: + * + * { + * "upArrowButton": "dijitUpArrowButton", + * "downArrowButton": "dijitDownArrowButton" + * } + * The above will set the CSS class dijitUpArrowButton to the this.upArrowButton DOMNode when it + * + * is hovered, etc. + * + */ + "cssStateNodes": Object; + set(property:"cssStateNodes", value: Object): void; + get(property:"cssStateNodes"): Object; + watch(property:"cssStateNodes", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * Bi-directional support, as defined by the HTML DIR + * attribute. Either left-to-right "ltr" or right-to-left "rtl". If undefined, widgets renders in page's + * default direction. + * + */ + "dir": string; + set(property:"dir", value: string): void; + get(property:"dir"): string; + watch(property:"dir", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * This is our visible representation of the widget! Other DOM + * Nodes may by assigned to other properties, usually through the + * template system's data-dojo-attach-point syntax, but the domNode + * property is the canonical "top level" node in widget UI. + * + */ + "domNode": HTMLElement; + set(property:"domNode", value: HTMLElement): void; + get(property:"domNode"): HTMLElement; + watch(property:"domNode", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * This widget or a widget it contains has focus, or is "active" because + * it was recently clicked. + * + */ + "focused": boolean; + set(property:"focused", value: boolean): void; + get(property:"focused"): boolean; + watch(property:"focused", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * The currently focused child widget, or null if there isn't one + * + */ + "focusedChild": Object; + set(property:"focusedChild", value: Object): void; + get(property:"focusedChild"): Object; + watch(property:"focusedChild", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * True if cursor is over this widget + * + */ + "hovering": boolean; + set(property:"hovering", value: boolean): void; + get(property:"hovering"): boolean; + watch(property:"hovering", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * 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. + * + */ + "id": string; + set(property:"id", value: string): void; + get(property:"id"): string; + watch(property:"id", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Rarely used. Overrides the default Dojo locale used to render this widget, + * as defined by the HTML LANG attribute. + * Value must be among the list of locales specified during by the Dojo bootstrap, + * formatted according to RFC 3066 (like en-us). + * + */ + "lang": string; + set(property:"lang", value: string): void; + get(property:"lang"): string; + watch(property:"lang", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * If multiple characters are typed where each keystroke happens within + * multiCharSearchDuration of the previous keystroke, + * search for nodes matching all the keystrokes. + * + * For example, typing "ab" will search for entries starting with + * "ab" unless the delay between "a" and "b" is greater than multiCharSearchDuration. + * + */ + "multiCharSearchDuration": number; + set(property:"multiCharSearchDuration", value: number): void; + get(property:"multiCharSearchDuration"): number; + watch(property:"multiCharSearchDuration", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * The document this widget belongs to. If not specified to constructor, will default to + * srcNodeRef.ownerDocument, or if no sourceRef specified, then to the document global + * + */ + "ownerDocument": Object; + set(property:"ownerDocument", value: Object): void; + get(property:"ownerDocument"): Object; + watch(property:"ownerDocument", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to menu that displayed me + * + */ + "parentMenu": Object; + set(property:"parentMenu", value: Object): void; + get(property:"parentMenu"): Object; + watch(property:"parentMenu", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * For a passive (unclicked) Menu, number of milliseconds before hovering (without clicking) will cause + * the popup to open. Default is Infinity, meaning you need to click the menu to open it. + * + */ + "passivePopupDelay": number; + set(property:"passivePopupDelay", value: number): void; + get(property:"passivePopupDelay"): number; + watch(property:"passivePopupDelay", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * After a menu has been activated (by clicking on it etc.), number of milliseconds before hovering + * (without clicking) another MenuItem causes that MenuItem's popup to automatically open. + * + */ + "popupDelay": number; + set(property:"popupDelay", value: number): void; + get(property:"popupDelay"): number; + watch(property:"popupDelay", callback:{(property?:string, oldValue?:number, newValue?: number):void}) :{unwatch():void} + /** + * + */ + "searchContainerNode": boolean; + set(property:"searchContainerNode", value: boolean): void; + get(property:"searchContainerNode"): boolean; + watch(property:"searchContainerNode", callback:{(property?:string, oldValue?:boolean, newValue?: boolean):void}) :{unwatch():void} + /** + * Currently selected (a.k.a. highlighted) MenuItem, or null if no MenuItem is selected. + * If a submenu is open, will be set to MenuItem that displayed the submenu. OTOH, if + * this Menu is in passive mode (i.e. hasn't been clicked yet), will be null, because + * "selected" is not merely "hovered". + * + */ + "selected": Object; + set(property:"selected", value: Object): void; + get(property:"selected"): Object; + watch(property:"selected", callback:{(property?:string, oldValue?:Object, newValue?: Object):void}) :{unwatch():void} + /** + * pointer to original DOM node + * + */ + "srcNodeRef": HTMLElement; + set(property:"srcNodeRef", value: HTMLElement): void; + get(property:"srcNodeRef"): HTMLElement; + watch(property:"srcNodeRef", callback:{(property?:string, oldValue?:HTMLElement, newValue?: HTMLElement):void}) :{unwatch():void} + /** + * HTML style attributes as cssText string or name/value hash + * + */ + "style": string; + set(property:"style", value: string): void; + get(property:"style"): string; + watch(property:"style", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * 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. + * + */ + "tabIndex": string; + set(property:"tabIndex", value: string): void; + get(property:"tabIndex"): string; + watch(property:"tabIndex", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * Path to template (HTML file) for this widget relative to dojo.baseUrl. + * Deprecated: use templateString with require([... "dojo/text!..."], ...) instead + * + */ + "templatePath": string; + set(property:"templatePath", value: string): void; + get(property:"templatePath"): string; + watch(property:"templatePath", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + */ + "templateString": string; + set(property:"templateString", value: string): void; + get(property:"templateString"): string; + watch(property:"templateString", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * HTML title attribute. + * + * For form widgets this specifies a tooltip to display when hovering over + * the widget (just like the native HTML title attribute). + * + * For TitlePane or for when this widget is a child of a TabContainer, AccordionContainer, + * etc., it's used to specify the tab label, accordion pane title, etc. In this case it's + * interpreted as HTML. + * + */ + "title": string; + set(property:"title", value: string): void; + get(property:"title"): string; + watch(property:"title", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * When this widget's title attribute is used to for a tab label, accordion pane title, etc., + * this specifies the tooltip to appear when the mouse is hovered over that text. + * + */ + "tooltip": string; + set(property:"tooltip", value: string): void; + get(property:"tooltip"): string; + watch(property:"tooltip", callback:{(property?:string, oldValue?:string, newValue?: string):void}) :{unwatch():void} + /** + * + * @param widget + * @param insertIndex Optional + */ + addChild(widget: dijit._WidgetBase, insertIndex: number): void; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: String, value: Object): any; + /** + * This method is deprecated, use get() or set() directly. + * + * @param name The property to get or set. If an object is passed here and nota string, its keys are used as names of attributes to be setand the value of the object as values to set in the widget. + * @param value OptionalOptional. If provided, attr() operates as a setter. If omitted,the current value of the named property is returned. + */ + attr(name: Object, value: Object): any; + /** + * Construct the UI for this widget, setting this.domNode. + * Most widgets will mixin dijit._TemplatedMixin, which implements this method. + * + */ + buildRendering(): void; + /** + * Selector (passed to on.selector()) used to identify MenuItem child widgets, but exclude inert children + * like MenuSeparator. If subclass overrides to a string (ex: "> *"), the subclass must require dojo/query. + * + * @param node + */ + childSelector(node: HTMLElement): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: String): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: String, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: Object, event: Function, method: Function): any; + /** + * Deprecated, will be removed in 2.0, use this.own(on(...)) or this.own(aspect.after(...)) instead. + * + * Connects specified obj/event to specified method of this object + * and registers for disconnect() on widget destroy. + * + * Provide widget-specific analog to dojo.connect, except with the + * implicit use of this widget as the target object. + * Events connected with this.connect are disconnected upon + * destruction. + * + * @param obj + * @param event + * @param method + */ + connect(obj: any, event: Function, method: Function): any; + /** + * Deprecated. You can call this in postCreate() to attach the keyboard handlers to the container, + * but the preferred method is to override _onLeftArrow() and _onRightArrow(), or + * _onUpArrow() and _onDownArrow(), to call focusPrev() and focusNext(). + * + * @param prevKeyCodes Key codes for navigating to the previous child. + * @param nextKeyCodes Key codes for navigating to the next child. + */ + connectKeyNavHandlers(prevKeyCodes: dojo.keys, nextKeyCodes: dojo.keys): void; + /** + * Wrapper to setTimeout to avoid deferred functions executing + * after the originating widget has been destroyed. + * Returns an object handle with a remove method (that returns null) (replaces clearTimeout). + * + * @param fcn Function reference. + * @param delay OptionalDelay, defaults to 0. + */ + defer(fcn: Function, delay: number): Object; + /** + * Destroy this widget, but not its descendants. Descendants means widgets inside of + * this.containerNode. Will also destroy any resources (including widgets) registered via this.own(). + * + * This method will also destroy internal widgets such as those created from a template, + * assuming those widgets exist inside of this.domNode but outside of this.containerNode. + * + * For 2.0 it's planned that this method will also destroy descendant widgets, so apps should not + * depend on the current ability to destroy a widget without destroying its descendants. Generally + * they should use destroyRecursive() for widgets with children. + * + * @param preserveDom If true, this method will leave the original DOM structure alone.Note: This will not yet work with _TemplatedMixin widgets + */ + destroy(preserveDom?: boolean): void; + /** + * Recursively destroy the children of this widget and their + * descendants. + * + * @param preserveDom OptionalIf true, the preserveDom attribute is passed to all descendantwidget's .destroy() method. Not for use with _Templatedwidgets. + */ + destroyDescendants(preserveDom?: boolean): void; + /** + * Destroy this widget and its 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 is removed from the manager object. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structurealone of descendant Widgets. Note: This will NOT work withdijit._TemplatedMixin widgets. + */ + destroyRecursive(preserveDom?: boolean): void; + /** + * Destroys the DOM nodes associated with this widget. + * + * @param preserveDom OptionalIf true, this method will leave the original DOM structure aloneduring tear-down. Note: this will not work with _Templatedwidgets yet. + */ + destroyRendering(preserveDom?: boolean): void; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Disconnects handle created by connect. + * + * @param handle + */ + disconnect(handle: any): void; + /** + * Used by widgets to signal that a synthetic event occurred, ex: + * + * myWidget.emit("attrmodified-selectedChildWidget", {}). + * Emits an event on this.domNode named type.toLowerCase(), based on eventObj. + * Also calls onType() method, if present, and returns value from that method. + * By default passes eventObj to callback, but will pass callbackArgs instead, if specified. + * Modifies eventObj by adding missing parameters (bubbles, cancelable, widget). + * + * @param type + * @param eventObj Optional + * @param callbackArgs Optional + */ + emit(type: String, eventObj: Object, callbackArgs: any[]): any; + /** + * Default focus() implementation: focus the first child. + * + */ + focus(): void; + /** + * Focus specified child widget. + * + * @param widget Reference to container's child widget + * @param last If true and if widget has multiple focusable nodes, focus thelast one instead of the first one + */ + focusChild(widget: dijit._WidgetBase, last: boolean): void; + /** + * Focus the first focusable child in the container. + * + */ + focusFirstChild(): void; + /** + * Focus the last focusable child in the container. + * + */ + focusLastChild(): void; + /** + * Focus the next widget + * + */ + focusNext(): void; + /** + * Focus the last focusable node in the previous widget + * (ex: go to the ComboButton icon section rather than button section) + * + */ + focusPrev(): void; + /** + * Get a property from a widget. + * Get a named property from a widget. The property may + * potentially be retrieved via a getter method. If no getter is defined, this + * just retrieves the object's property. + * + * For example, if the widget has properties foo and bar + * and a method named _getFooAttr(), calling: + * myWidget.get("foo") would be equivalent to calling + * widget._getFooAttr() and myWidget.get("bar") + * would be equivalent to the expression + * widget.bar2 + * + * @param name The property to get. + */ + get(name: any): any; + /** + * Returns all direct children of this widget, i.e. all widgets underneath this.containerNode whose parent + * is this widget. Note that it does not return all descendants, but rather just direct children. + * Analogous to Node.childNodes, + * except containing widgets rather than DOMNodes. + * + * The result intentionally excludes internally created widgets (a.k.a. supporting widgets) + * outside of this.containerNode. + * + * Note that the array returned is a simple array. Application code should not assume + * existence of methods like forEach(). + * + */ + getChildren(): any[]; + /** + * Returns all the widgets 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. + * + */ + getDescendants(): any[]; + /** + * Gets the index of the child in this container or -1 if not found + * + * @param child + */ + getIndexOfChild(child: dijit._WidgetBase): any; + /** + * Returns the parent widget of this widget. + * + */ + getParent(): any; + /** + * Returns true if widget has child widgets, i.e. if this.containerNode contains widgets. + * + */ + hasChildren(): boolean; + /** + * Return true if this widget can currently be focused + * and false if not + * + */ + isFocusable(): any; + /** + * Return this widget's explicit or implicit orientation (true for LTR, false for RTL) + * + */ + isLeftToRight(): any; + /** + * + * @param type protected + * @param func + */ + on(type: String, func: Function): any; + /** + * + * @param type protected + * @param func + */ + on(type: Function, func: Function): any; + /** + * Track specified handles and remove/destroy them when this instance is destroyed, unless they were + * already removed/destroyed manually. + * + */ + own(): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: String): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: String, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: HTMLElement, position: number): any; + /** + * Place this widget somewhere in the DOM based + * on standard domConstruct.place() conventions. + * A convenience function provided in all _Widgets, providing a simple + * shorthand mechanism to put an existing (or newly created) Widget + * somewhere in the dom, and allow chaining. + * + * @param reference Widget, DOMNode, or id of widget or DOMNode + * @param position OptionalIf reference is a widget (or id of widget), and that widget has an ".addChild" method,it will be called passing this widget instance into that method, supplying the optionalposition index passed. In this case position (if specified) should be an integer.If reference is a DOMNode (or id matching a DOMNode but not a widget),the position argument can be a numeric index or a string"first", "last", "before", or "after", same as dojo/dom-construct::place(). + */ + placeAt(reference: dijit._WidgetBase, position: number): any; + /** + * + */ + postCreate(): void; + /** + * 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. + * + */ + postMixInProperties(): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: dijit._WidgetBase): void; + /** + * 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 (ie, removeChild(5) removes the sixth widget). + * + * @param widget + */ + removeChild(widget: number): void; + /** + * Set a property on a widget + * Sets named properties on a widget which may potentially be handled by a + * setter in the widget. + * + * For example, if the widget has properties foo and bar + * and a method named _setFooAttr(), calling + * myWidget.set("foo", "Howdy!") would be equivalent to calling + * widget._setFooAttr("Howdy!") and myWidget.set("bar", 3) + * would be equivalent to the statement widget.bar = 3; + * + * set() may also be called with a hash of name/value pairs, ex: + * + * myWidget.set({ + * foo: "Howdy", + * bar: 3 + * }); + * This is equivalent to calling set(foo, "Howdy") and set(bar, 3) + * + * @param name The property to set. + * @param value The value to set in the property. + */ + set(name: any, value: any): any; + /** + * Deprecated. Use set() instead. + * + * @param attr + * @param value + */ + setAttribute(attr: String, value: any): void; + /** + * Processing after the DOM fragment is added to the document + * Called after a widget and its children have been created and added to the page, + * and all related widgets have finished their create() cycle, up through postCreate(). + * + * Note that startup() may be called while the widget is still hidden, for example if the widget is + * inside a hidden dijit/Dialog or an unselected tab of a dijit/layout/TabContainer. + * For widgets that need to do layout, it's best to put that layout code inside resize(), and then + * extend dijit/layout/_LayoutWidget so that resize() is called when the widget is visible. + * + */ + startup(): void; + /** + * + */ + startupKeyNavChildren(): void; + /** + * Deprecated, will be removed in 2.0, use this.own(topic.subscribe()) instead. + * + * Subscribes to the specified topic and calls the specified method + * of this object and registers for unsubscribe() on widget destroy. + * + * Provide widget-specific analog to dojo.subscribe, except with the + * implicit use of this widget as the target object. + * + * @param t The topic + * @param method The callback + */ + subscribe(t: String, method: Function): any; + /** + * 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 reversible + * serialization. + * + */ + toString(): string; + /** + * Deprecated. Override destroy() instead to implement custom widget tear-down + * behavior. + * + */ + uninitialize(): boolean; + /** + * Deprecated, will be removed in 2.0, use handle.remove() instead. + * + * Unsubscribes handle created by this.subscribe. + * Also removes handle from this widget's list of subscriptions + * + * @param handle + */ + unsubscribe(handle: Object): void; + /** + * Watches a property for changes + * + * @param name OptionalIndicates the property to watch. This is optional (the callback may be theonly parameter), and if omitted, all the properties will be watched + * @param callback The function to execute when the property changes. This will be called afterthe property has been changed. The callback will be called with the |this|set to the instance, the first argument as the name of the property, thesecond argument as the old value and the third argument as the new value. + */ + watch(property: string, callback:{(property?:string, oldValue?:any, newValue?: any):void}) :{unwatch():void}; + /** + * Static method to get a template based on the templatePath or + * templateString key + */ + getCachedTemplate(): any; + /** + * 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. + * + */ + onBlur(): void; + /** + * 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. + * + * @param closeAll + */ + onCancel(closeAll: boolean): void; + /** + * Connect to this function to receive notifications of mouse click events. + * + * @param event mouse Event + */ + onClick(event: any): void; + /** + * Connect to this function to receive notifications of mouse double click events. + * + * @param event mouse Event + */ + onDblClick(event: any): void; + /** + * 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. + * + */ + onExecute(): void; + /** + * Called when the widget becomes "active" because + * it or a widget inside of it either has focus, or has recently + * been clicked. + * + */ + onFocus(): void; + /** + * Called when another widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate hide of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onHide(): void; + /** + * Called when cursor is over a MenuItem. + * + * @param item + */ + onItemHover(item: dijit.MenuItem): void; + /** + * Callback fires when mouse exits a MenuItem + * + * @param item + */ + onItemUnhover(item: dijit.MenuItem): void; + /** + * Attach point for notification about when a menu item has been searched for + * via the keyboard search mechanism. + * + * @param item + * @param evt + * @param searchString + * @param numMatches + */ + onKeyboardSearch(item: dijit.MenuItem, evt: Event, searchString: String, numMatches: number): void; + /** + * Connect to this function to receive notifications of keys being pressed down. + * + * @param event key Event + */ + onKeyDown(event: any): void; + /** + * Connect to this function to receive notifications of printable keys being typed. + * + * @param event key Event + */ + onKeyPress(event: any): void; + /** + * Connect to this function to receive notifications of keys being released. + * + * @param event key Event + */ + onKeyUp(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is pressed down. + * + * @param event mouse Event + */ + onMouseDown(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto this widget. + * + * @param event mouse Event + */ + onMouseEnter(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of this widget. + * + * @param event mouse Event + */ + onMouseLeave(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves over nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseMove(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves off of nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOut(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse moves onto nodes contained within this widget. + * + * @param event mouse Event + */ + onMouseOver(event: any): void; + /** + * Connect to this function to receive notifications of when the mouse button is released. + * + * @param event mouse Event + */ + onMouseUp(event: any): void; + /** + * Called when this widget becomes the selected pane in a + * dijit/layout/TabContainer, dijit/layout/StackContainer, + * dijit/layout/AccordionContainer, etc. + * + * Also called to indicate display of a dijit.Dialog, dijit.TooltipDialog, or dijit.TitlePane. + * + */ + onShow(): void; + } + /** + * Permalink: http://dojotoolkit.org/api/1.9/dijit/Editor.html + * + * A rich text Editing widget + * This widget provides basic WYSIWYG editing features, based on the browser's + * underlying rich text editing capability, accompanied by a toolbar (dijit.Toolbar). + * A plugin model is available to extend the editor's capabilities as well as the + * the options available in the toolbar. Content generation may vary across + * browsers, and clipboard operations may have different results, to name + * a few limitations. Note: this widget should not be used with the HTML + *