UNPKG

typescript-closure-tools

Version:

Command-line tools to convert closure-style JSDoc annotations to typescript, and to convert typescript sources to closure externs files

848 lines (847 loc) 2.24 MB
// Type definitions for ExtJS 4.2.1 // Project: http://www.sencha.com/products/extjs/ // Definitions by: Brian Kotek <https://github.com/brian428/> // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module Ext { export interface IAbstractComponent extends Ext.IBase,Ext.util.IPositionable,Ext.util.IObservable,Ext.util.IAnimate,Ext.util.IElementContainer,Ext.util.IRenderable,Ext.state.IStateful { /** [Config Option] (String/Object) */ autoEl?: any; /** [Config Option] (Ext.ComponentLoader/Object/String/Boolean) */ autoLoad?: any; /** [Config Option] (Boolean/String/HTMLElement/Ext.Element) */ autoRender?: any; /** [Config Option] (Boolean) */ autoShow?: boolean; /** [Config Option] (String) */ baseCls?: string; /** [Config Option] (Number/String/Boolean) */ border?: any; /** [Config Option] (Object[]) */ childEls?: any[]; /** [Config Option] (String) */ cls?: string; /** [Config Option] (String) */ componentCls?: string; /** [Config Option] (String/Object) */ componentLayout?: any; /** [Config Option] (String) */ contentEl?: string; /** [Config Option] (Object) */ data?: any; /** [Config Option] (Boolean) */ disabled?: boolean; /** [Config Option] (String) */ disabledCls?: string; /** [Config Option] (Boolean) */ draggable?: boolean; /** [Config Option] (Boolean) */ floating?: boolean; /** [Config Option] (Boolean) */ frame?: boolean; /** [Config Option] (Number) */ height?: number; /** [Config Option] (Boolean) */ hidden?: boolean; /** [Config Option] (String) */ hideMode?: string; /** [Config Option] (String/Object) */ html?: any; /** [Config Option] (String) */ id?: string; /** [Config Option] (String) */ itemId?: string; /** [Config Option] (Ext.ComponentLoader/Object) */ loader?: any; /** [Config Option] (Number/String) */ margin?: any; /** [Config Option] (Number) */ maxHeight?: number; /** [Config Option] (Number) */ maxWidth?: number; /** [Config Option] (Number) */ minHeight?: number; /** [Config Option] (Number) */ minWidth?: number; /** [Config Option] (String) */ overCls?: string; /** [Config Option] (Number/String) */ padding?: any; /** [Config Option] (Ext.AbstractPlugin[]/Ext.AbstractPlugin/Object[]/Object/Ext.enums.Plugin[]/Ext.enums.Plugin) */ plugins?: any; /** [Config Option] (Object) */ renderData?: any; /** [Config Option] (Object) */ renderSelectors?: any; /** [Config Option] (String/HTMLElement/Ext.Element) */ renderTo?: any; /** [Config Option] (Ext.XTemplate/String/String[]) */ renderTpl?: any; /** [Config Option] (Boolean) */ rtl?: boolean; /** [Config Option] (Boolean/Number) */ shrinkWrap?: any; /** [Config Option] (String/Object) */ style?: any; /** [Config Option] (Ext.XTemplate/Ext.Template/String/String[]) */ tpl?: any; /** [Config Option] (String) */ tplWriteMode?: string; /** [Config Option] (String) */ ui?: string; /** [Config Option] (Number) */ width?: number; /** [Config Option] (Ext.enums.Widget) */ xtype?: Ext.enums.IWidget; /** [Property] (Boolean) */ _isLayoutRoot?: boolean; /** [Property] (String) */ contentPaddingProperty?: string; /** [Property] (Object) */ frameSize?: any; /** [Property] (Boolean) */ isComponent?: boolean; /** [Property] (Boolean) */ maskOnDisable?: boolean; /** [Property] (Ext.Container) */ ownerCt?: Ext.IContainer; /** [Property] (Boolean) */ rendered?: boolean; /** [Method] Adds each argument passed to this method to the childEls array */ addChildEls?(): void; /** [Method] Adds a CSS class to the top level element representing this component * @param cls String/String[] The CSS class name to add. * @returns Ext.Component Returns the Component to allow method chaining. */ addClass?( cls?:any ): Ext.IComponent; /** [Method] Adds a CSS class to the top level element representing this component * @param cls String/String[] The CSS class name to add. * @returns Ext.Component Returns the Component to allow method chaining. */ addCls?( cls?:any ): Ext.IComponent; /** [Method] Adds a cls to the uiCls array which will also call addUIClsToElement and adds to all elements of this component * @param classes String/String[] A string or an array of strings to add to the uiCls. * @param skip Object (Boolean) skip true to skip adding it to the class and do it later (via the return). */ addClsWithUI?( classes?:any, skip?:any ): void; /** [Method] Adds the specified events to the list of events which this Observable may fire * @param eventNames Object/String... Either an object with event names as properties with a value of true. For example: this.addEvents({ storeloaded: true, storecleared: true }); Or any number of event names as separate parameters. For example: this.addEvents('storeloaded', 'storecleared'); */ addEvents?( eventNames?:any ): void; /** [Method] Appends an event handler to this object * @param element Object * @param listeners Object * @param scope Object * @param options Object * @returns Object Only when the destroyable option is specified. A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example: this.btnListeners = = myButton.on({ destroyable: true mouseover: function() { console.log('mouseover'); }, mouseout: function() { console.log('mouseout'); }, click: function() { console.log('click'); } }); And when those listeners need to be removed: Ext.destroy(this.btnListeners); or this.btnListeners.destroy(); */ addListener?( element?:any, listeners?:any, scope?:any, options?:any ): any; /** [Method] Adds listeners to any Observable object or Ext Element which are automatically removed when this Component is destr * @param item Ext.util.Observable/Ext.Element The item to which to add a listener/listeners. * @param ename Object/String The event name, or an object containing event name properties. * @param fn Function If the ename parameter was an event name, this is the handler function. * @param scope Object If the ename parameter was an event name, this is the scope (this reference) in which the handler function is executed. * @param options Object If the ename parameter was an event name, this is the addListener options. * @returns Object Only when the destroyable option is specified. A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example: this.btnListeners = = myButton.mon({ destroyable: true mouseover: function() { console.log('mouseover'); }, mouseout: function() { console.log('mouseout'); }, click: function() { console.log('click'); } }); And when those listeners need to be removed: Ext.destroy(this.btnListeners); or this.btnListeners.destroy(); */ addManagedListener?( item?:any, ename?:any, fn?:any, scope?:any, options?:any ): any; /** [Method] Save a property to the given state object if it is not its default or configured value * @param state Object The state object. * @param propName String The name of the property on this object to save. * @param value String The value of the state property (defaults to this[propName]). * @returns Boolean The state object or a new object if state was null and the property was saved. */ addPropertyToState?( state?:any, propName?:string, value?:string ): boolean; /** [Method] Add events that will trigger the state to be saved * @param events String/String[] The event name or an array of event names. */ addStateEvents?( events?:any ): void; /** [Method] Method which adds a specified UI uiCls to the components element * @param ui String The UI to remove from the element. */ addUIClsToElement?( ui?:string ): void; /** [Method] Called by the layout system after the Component has been laid out * @param width Number The width that was set * @param height Number The height that was set * @param oldWidth Number/undefined The old width, or undefined if this was the initial layout. * @param oldHeight Number/undefined The old height, or undefined if this was the initial layout. */ afterComponentLayout?( width?:number, height?:number, oldWidth?:any, oldHeight?:any ): void; /** [Method] Allows addition of behavior after rendering is complete */ afterRender?(): void; /** [Method] Template method called after a Component has been positioned * @param x Number * @param y Number */ afterSetPosition?( x?:number, y?:number ): void; /** [Method] Aligns the element with another element relative to the specified anchor points * @param element Ext.util.Positionable/HTMLElement/String The Positionable, HTMLElement, or id of the element to align to. * @param position String The position to align to * @param offsets Number[] Offset the positioning by [x, y] * @param animate Boolean/Object true for the default animation or a standard Element animation config object * @returns Ext.util.Positionable this */ alignTo?( element?:any, position?:string, offsets?:number[], animate?:any ): Ext.util.IPositionable; /** [Method] Anchors an element to another element and realigns it when the window is resized * @param element Ext.util.Positionable/HTMLElement/String The Positionable, HTMLElement, or id of the element to align to. * @param position String The position to align to * @param offsets Number[] Offset the positioning by [x, y] * @param animate Boolean/Object true for the default animation or a standard Element animation config object * @param monitorScroll Boolean/Number True to monitor body scroll and reposition. If this parameter is a number, it is used as the buffer delay in milliseconds. * @param callback Function The function to call after the animation finishes * @returns Ext.util.Positionable this */ anchorTo?( element?:any, position?:string, offsets?:number[], animate?:any, monitorScroll?:any, callback?:any ): Ext.util.IPositionable; /** [Method] Performs custom animation on this object. ... */ animate?: any; /** [Method] Applies the state to the object * @param state Object The state */ applyState?( state?:any ): void; /** [Method] Template method to do any pre blur processing * @param e Ext.EventObject The event object */ beforeBlur?( e?:Ext.IEventObject ): void; /** [Method] Occurs before componentLayout is run * @param adjWidth Number The box-adjusted width that was set. * @param adjHeight Number The box-adjusted height that was set. */ beforeComponentLayout?( adjWidth?:number, adjHeight?:number ): void; /** [Method] Invoked before the Component is destroyed */ beforeDestroy?(): void; /** [Method] Template method to do any pre focus processing * @param e Ext.EventObject The event object */ beforeFocus?( e?:Ext.IEventObject ): void; /** [Method] Occurs before componentLayout is run */ beforeLayout?(): void; /** [Method] Calculates the new x y position to move this Positionable into a constrain region * @param constrainTo String/HTMLElement/Ext.Element/Ext.util.Region The Element or Region into which this Component is to be constrained. Defaults to the element into which this Positionable was rendered, or this Component's {@link Ext.Component.constrainTo. * @param proposedPosition Number[] A proposed [X, Y] position to test for validity and to coerce into constraints instead of using this Positionable's current position. * @param local Boolean The proposedPosition is local (relative to floatParent if a floating Component) * @param proposedSize Number[] A proposed [width, height] size to use when calculating constraints instead of using this Positionable's current size. * @returns Number[] If the element needs to be translated, the new [X, Y] position within constraints if possible, giving priority to keeping the top and left edge in the constrain region. Otherwise, false. */ calculateConstrainedPosition?( constrainTo?:any, proposedPosition?:number[], local?:boolean, proposedSize?:number[] ): number[]; /** [Method] Removes all listeners for this object including the managed listeners */ clearListeners?(): void; /** [Method] Removes all managed listeners for this object */ clearManagedListeners?(): void; /** [Method] Destroys the Component */ destroy?(): void; /** [Method] Disable the component * @param silent Boolean Passing true will suppress the disable event from being fired. */ disable?( silent?:boolean ): void; /** [Method] Handles autoRender */ doAutoRender?(): void; /** [Method] This method needs to be called whenever you change something on this component that requires the Component s layout t * @returns Ext.container.Container this */ doComponentLayout?(): Ext.container.IContainer; /** [Method] Enable the component * @param silent Boolean Passing true will suppress the enable event from being fired. */ enable?( silent?:boolean ): void; /** [Method] Enables events fired by this Observable to bubble up an owner hierarchy by calling this getBubbleTarget if present * @param eventNames String/String[] The event name to bubble, or an Array of event names. */ enableBubble?( eventNames?:any ): void; /** [Method] Ensures that this component is attached to document body * @param runLayout Boolean True to run the component's layout. */ ensureAttachedToBody?( runLayout?:boolean ): void; /** [Method] Retrieves plugin from this component s collection by its ptype * @param ptype String The Plugin's ptype as specified by the class's alias configuration. * @returns Ext.AbstractPlugin plugin instance. */ findPlugin?( ptype?:string ): Ext.IAbstractPlugin; /** [Method] Fires the specified event with the passed parameters minus the event name plus the options object passed to addList * @param eventName String The name of the event to fire. * @param args Object... Variable number of parameters are passed to handlers. * @returns Boolean returns false if any of the handlers return false otherwise it returns true. */ fireEvent?( eventName:string, ...args:any[] ): boolean; /** [Method] Fires the specified event with the passed parameter list * @param eventName String The name of the event to fire. * @param args Object[] An array of parameters which are passed to handlers. * @returns Boolean returns false if any of the handlers return false otherwise it returns true. */ fireEventArgs?( eventName?:string, args?:any[] ): boolean; /** [Method] Forces this component to redo its componentLayout */ forceComponentLayout?(): void; /** [Method] Returns the current animation if this object has any effects actively running or queued else returns false * @returns Ext.fx.Anim/Boolean Anim if element has active effects, else false */ getActiveAnimation?(): any; /** [Method] Gets the x y coordinates to align this element with another element * @param element Ext.util.Positionable/HTMLElement/String The Positionable, HTMLElement, or id of the element to align to. * @param position String The position to align to * @param offsets Number[] Offset the positioning by [x, y] * @returns Number[] [x, y] */ getAlignToXY?( element?:any, position?:string, offsets?:number[] ): number[]; /** [Method] Gets the x y coordinates specified by the anchor position on the element * @param anchor String The specified anchor position. See alignTo for details on supported anchor positions. * @param local Boolean True to get the local (element top/left-relative) anchor position instead of page coordinates * @param size Object An object containing the size to use for calculating anchor position {width: (target width), height: (target height)} (defaults to the element's current size) * @returns Number[] [x, y] An array containing the element's x and y coordinates */ getAnchorXY?( anchor?:string, local?:boolean, size?:any ): number[]; /** [Method] Return an object defining the area of this Element which can be passed to setBox to set another Element s size locati * @param contentBox Boolean If true a box for the content of the element is returned. * @param local Boolean If true the element's left and top relative to its offsetParent are returned instead of page x/y. * @returns Object box An object in the format: { x: &lt;Element's X position&gt;, y: &lt;Element's Y position&gt;, left: &lt;Element's X position (an alias for x)&gt;, top: &lt;Element's Y position (an alias for y)&gt;, width: &lt;Element's width&gt;, height: &lt;Element's height&gt;, bottom: &lt;Element's lower bound&gt;, right: &lt;Element's rightmost bound&gt; } The returned object may also be addressed as an Array where index 0 contains the X position and index 1 contains the Y position. The result may also be used for setXY */ getBox?( contentBox?:boolean, local?:boolean ): any; /** [Method] Provides the link for Observable s fireEvent method to bubble up the ownership hierarchy * @returns Ext.container.Container the Container which owns this Component. */ getBubbleTarget?(): Ext.container.IContainer; /** [Method] Returns the X Y vector by which this Positionable s element must be translated to make a best attempt to constrain * @param constrainTo Ext.util.Positionable/HTMLElement/String/Ext.util.Region The Positionable, HTMLElement, element id, or Region into which the element is to be constrained. * @param proposedPosition Number[] A proposed [X, Y] position to test for validity and to produce a vector for instead of using the element's current position * @param proposedSize Number[] A proposed [width, height] size to constrain instead of using the element's current size * @returns Number[]/Boolean If the element needs to be translated, an [X, Y] vector by which this element must be translated. Otherwise, false. */ getConstrainVector?( constrainTo?:any, proposedPosition?:number[], proposedSize?:number[] ): any; /** [Method] Retrieves the top level element representing this component * @returns Ext.dom.Element */ getEl?(): Ext.dom.IElement; /** [Method] Gets the current height of the component s underlying element * @returns Number */ getHeight?(): number; /** [Method] Retrieves the id of this component * @returns String */ getId?(): string; /** [Method] This function takes the position argument passed to onRender and returns a DOM element that you can use in the insert * @param position String/Number/Ext.dom.Element/HTMLElement Index, element id or element you want to put this component before. * @returns HTMLElement DOM element that you can use in the insertBefore */ getInsertPosition?( position?:any ): HTMLElement; /** [Method] Returns the value of itemId assigned to this component or when that is not set returns the value of id * @returns String */ getItemId?(): string; /** [Method] Gets the Ext ComponentLoader for this Component * @returns Ext.ComponentLoader The loader instance, null if it doesn't exist. */ getLoader?(): Ext.IComponentLoader; /** [Method] Overridden in Ext rtl AbstractComponent * @returns Number The local x coordinate */ getLocalX?(): number; /** [Method] Overridden in Ext rtl AbstractComponent * @returns Number[] The local XY position of the element */ getLocalXY?(): number[]; /** [Method] Returns the y coordinate of this element reletive to its offsetParent * @returns Number The local y coordinate */ getLocalY?(): number; /** [Method] Returns the offsets of this element from the passed element * @param offsetsTo Ext.util.Positionable/HTMLElement/String The Positionable, HTMLElement, or element id to get get the offsets from. * @returns Number[] The XY page offsets (e.g. [100, -200]) */ getOffsetsTo?( offsetsTo?:any ): number[]; /** [Method] Retrieves a plugin from this component s collection by its pluginId * @param pluginId String * @returns Ext.AbstractPlugin plugin instance. */ getPlugin?( pluginId?:string ): Ext.IAbstractPlugin; /** [Method] Returns a region object that defines the area of this element * @returns Ext.util.Region A Region containing "top, left, bottom, right" properties. */ getRegion?(): Ext.util.IRegion; /** [Method] Gets the current size of the component s underlying element * @returns Object An object containing the element's size {width: (element width), height: (element height)} */ getSize?(): any; /** [Method] Returns an object that describes how this component s width and height are managed * @param ownerCtSizeModel Object * @returns Object The size model for this component. */ getSizeModel?( ownerCtSizeModel?:any ): any; /** [Method] The supplied default state gathering method for the AbstractComponent class * @returns Object */ getState?(): any; /** [Method] Returns the content region of this element * @returns Ext.util.Region A Region containing "top, left, bottom, right" member data. */ getViewRegion?(): Ext.util.IRegion; /** [Method] Gets the current width of the component s underlying element * @returns Number */ getWidth?(): number; /** [Method] Gets the current X position of the DOM element based on page coordinates * @returns Number The X position of the element */ getX?(): number; /** [Method] Returns this Component s xtype hierarchy as a slash delimited string * @returns String The xtype hierarchy string */ getXTypes?(): string; /** [Method] Gets the current position of the DOM element based on page coordinates * @returns Number[] The XY position of the element */ getXY?(): number[]; /** [Method] Gets the current Y position of the DOM element based on page coordinates * @returns Number The Y position of the element */ getY?(): number; /** [Method] Returns the current animation if this object has any effects actively running or queued else returns false * @returns Ext.fx.Anim/Boolean Anim if element has active effects, else false */ hasActiveFx?(): any; /** [Method] Checks if the specified CSS class exists on this element s DOM node * @param className String The CSS class to check for. * @returns Boolean true if the class exists, else false. */ hasCls?( className?:string ): boolean; /** [Method] Checks to see if this object has any listeners for a specified event or whether the event bubbles * @param eventName String The name of the event to check for * @returns Boolean true if the event is being listened for or bubbles, else false */ hasListener?( eventName?:string ): boolean; /** [Method] Checks if there is currently a specified uiCls * @param cls String The cls to check. */ hasUICls?( cls?:string ): void; /** [Method] Initialize any events on this component */ initEvents?(): void; /** [Method] Initialized the renderData to be used when rendering the renderTpl * @returns Object Object with keys and values that are going to be applied to the renderTpl */ initRenderData?(): any; /** [Method] Tests whether this Component matches the selector string * @param selector String The selector string to test against. * @returns Boolean true if this Component matches the selector. */ is?( selector?:string ): boolean; /** [Method] Determines whether this component is the descendant of a particular container * @param container Ext.Container * @returns Boolean true if the component is the descendant of a particular container, otherwise false. */ isDescendantOf?( container?:Ext.IContainer ): boolean; /** [Method] Method to determine whether this Component is currently disabled * @returns Boolean the disabled state of this Component. */ isDisabled?(): boolean; /** [Method] Method to determine whether this Component is draggable * @returns Boolean the draggable state of this component. */ isDraggable?(): boolean; /** [Method] Method to determine whether this Component is droppable * @returns Boolean the droppable state of this component. */ isDroppable?(): boolean; /** [Method] Method to determine whether this Component is floating * @returns Boolean the floating state of this component. */ isFloating?(): boolean; /** [Method] Method to determine whether this Component is currently set to hidden * @returns Boolean the hidden state of this Component. */ isHidden?(): boolean; /** [Method] Determines whether this Component is the root of a layout */ isLayoutRoot?(): void; /** [Method] Returns true if layout is suspended for this component * @returns Boolean true layout of this component is suspended. */ isLayoutSuspended?(): boolean; /** [Method] Returns true if this component is visible * @param deep Boolean Pass true to interrogate the visibility status of all parent Containers to determine whether this Component is truly visible to the user. Generally, to determine whether a Component is hidden, the no argument form is needed. For example when creating dynamically laid out UIs in a hidden Container before showing them. * @returns Boolean true if this component is visible, false otherwise. */ isVisible?( deep?:boolean ): boolean; /** [Method] Tests whether or not this Component is of a specific xtype * @param xtype String The xtype to check for this Component * @param shallow Boolean true to check whether this Component is directly of the specified xtype, false to check whether this Component is descended from the xtype. * @returns Boolean true if this component descends from the specified xtype, false otherwise. */ isXType?( xtype?:string, shallow?:boolean ): boolean; /** [Method] Shorthand for addManagedListener * @param item Ext.util.Observable/Ext.Element The item to which to add a listener/listeners. * @param ename Object/String The event name, or an object containing event name properties. * @param fn Function If the ename parameter was an event name, this is the handler function. * @param scope Object If the ename parameter was an event name, this is the scope (this reference) in which the handler function is executed. * @param options Object If the ename parameter was an event name, this is the addListener options. * @returns Object Only when the destroyable option is specified. A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example: this.btnListeners = = myButton.mon({ destroyable: true mouseover: function() { console.log('mouseover'); }, mouseout: function() { console.log('mouseout'); }, click: function() { console.log('click'); } }); And when those listeners need to be removed: Ext.destroy(this.btnListeners); or this.btnListeners.destroy(); */ mon?( item?:any, ename?:any, fn?:any, scope?:any, options?:any ): any; /** [Method] Move the element relative to its current position * @param direction String Possible values are: "l" (or "left") "r" (or "right") "t" (or "top", or "up") "b" (or "bottom", or "down") * @param distance Number How far to move the element in pixels * @param animate Boolean/Object true for the default animation or a standard Element animation config object */ move?( direction?:string, distance?:number, animate?:any ): void; /** [Method] Shorthand for removeManagedListener * @param item Ext.util.Observable/Ext.Element The item from which to remove a listener/listeners. * @param ename Object/String The event name, or an object containing event name properties. * @param fn Function If the ename parameter was an event name, this is the handler function. * @param scope Object If the ename parameter was an event name, this is the scope (this reference) in which the handler function is executed. */ mun?( item?:any, ename?:any, fn?:any, scope?:any ): void; /** [Method] Returns the next node in the Component tree in tree traversal order * @param selector String A ComponentQuery selector to filter the following nodes. * @returns Ext.Component The next node (or the next node which matches the selector). Returns null if there is no matching node. */ nextNode?( selector?:string ): Ext.IComponent; /** [Method] Returns the next sibling of this Component * @param selector String A ComponentQuery selector to filter the following items. * @returns Ext.Component The next sibling (or the next sibling which matches the selector). Returns null if there is no matching sibling. */ nextSibling?( selector?:string ): Ext.IComponent; /** [Method] Shorthand for addListener * @param eventName String/Object The name of the event to listen for. May also be an object who's property names are event names. * @param fn Function The method the event invokes, or if scope is specified, the name* of the method within the specified scope. Will be called with arguments given to Ext.util.Observable.fireEvent plus the options parameter described below. * @param scope Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event. * @param options Object An object containing handler configuration. Note: Unlike in ExtJS 3.x, the options object will also be passed as the last argument to every event handler. This object may contain any of the following properties: * @returns Object Only when the destroyable option is specified. A Destroyable object. An object which implements the destroy method which removes all listeners added in this call. For example: this.btnListeners = = myButton.on({ destroyable: true mouseover: function() { console.log('mouseover'); }, mouseout: function() { console.log('mouseout'); }, click: function() { console.log('click'); } }); And when those listeners need to be removed: Ext.destroy(this.btnListeners); or this.btnListeners.destroy(); */ on?( eventName?:any, fn?:any, scope?:any, options?:any ): any; /** [Method] Method to manage awareness of when components are added to their respective Container firing an added event * @param container Ext.container.Container Container which holds the component. * @param pos Number Position at which the component was added. */ onAdded?( container?:Ext.container.IContainer, pos?:number ): void; /** [Method] Allows addition of behavior to the disable operation */ onDisable?(): void; /** [Method] Allows addition of behavior to the enable operation */ onEnable?(): void; /** [Method] Called after the component is moved this method is empty by default but can be implemented by any subclass that need * @param x Number The new x position. * @param y Number The new y position. */ onPosition?( x?:number, y?:number ): void; /** [Method] Method to manage awareness of when components are removed from their respective Container firing a removed event * @param destroying Boolean Will be passed as true if the Container performing the remove operation will delete this Component upon remove. */ onRemoved?( destroying?:boolean ): void; /** [Method] Template method called when this Component s DOM structure is created * @param parentNode Ext.core.Element The parent Element in which this Component's encapsulating element is contained. * @param containerIdx Number The index within the parent Container's child collection of this Component. */ onRender?( parentNode?:Ext.core.IElement, containerIdx?:number ): void; /** [Method] Allows addition of behavior to the resize operation * @param width Object * @param height Object * @param oldWidth Object * @param oldHeight Object */ onResize?( width?:any, height?:any, oldWidth?:any, oldHeight?:any ): void; /** [Method] Template method to do any post blur processing * @param e Ext.EventObject The event object */ postBlur?( e?:Ext.IEventObject ): void; /** [Method] Returns the previous node in the Component tree in tree traversal order * @param selector String A ComponentQuery selector to filter the preceding nodes. * @returns Ext.Component The previous node (or the previous node which matches the selector). Returns null if there is no matching node. */ previousNode?( selector?:string ): Ext.IComponent; /** [Method] Returns the previous sibling of this Component * @param selector String A ComponentQuery selector to filter the preceding items. * @returns Ext.Component The previous sibling (or the previous sibling which matches the selector). Returns null if there is no matching sibling. */ previousSibling?( selector?:string ): Ext.IComponent; /** [Method] Called by Component doAutoRender Register a Container configured floating true with this Component s ZIndexManager * @param cmp Object */ registerFloatingItem?( cmp?:any ): void; /** [Method] Relays selected events from the specified Observable as if the events were fired by this * @param origin Object The Observable whose events this object is to relay. * @param events String[] Array of event names to relay. * @param prefix String A common prefix to prepend to the event names. For example: this.relayEvents(this.getStore(), ['load', 'clear'], 'store'); Now the grid will forward 'load' and 'clear' events of store as 'storeload' and 'storeclear'. * @returns Object A Destroyable object. An object which implements the destroy method which, when destroyed, removes all relayers. For example: this.storeRelayers = this.relayEvents(this.getStore(), ['load', 'clear'], 'store'); Can be undone by calling Ext.destroy(this.storeRelayers); or this.store.relayers.destroy(); */ relayEvents?( origin?:any, events?:string[], prefix?:string ): any; /** [Method] Remove any anchor to this element * @returns Ext.util.Positionable this */ removeAnchor?(): Ext.util.IPositionable; /** [Method] Removes items in the childEls array based on the return value of a supplied test function * @param testFn Function The test function. */ removeChildEls?( testFn?:any ): void; /** [Method] Removes a CSS class from the top level element representing this component * @param cls String/String[] The CSS class name to remove. * @returns Ext.Component Returns the Component to allow method chaining. */ removeCls?( cls?:any ): Ext.IComponent; /** [Method] Removes a cls to the uiCls array which will also call removeUIClsFromElement and removes it from all elements of thi * @param cls String/String[] A string or an array of strings to remove to the uiCls. */ removeClsWithUI?( cls?:any ): void; /** [Method] Removes an event handler * @param eventName String The type of event the handler was associated with. * @param fn Function The handler to remove. This must be a reference to the function passed into the Ext.util.Observable.addListener call. * @param scope Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to Ext.util.Observable.addListener or the listener will not be removed. */ removeListener?( eventName?:string, fn?:any, scope?:any ): void; /** [Method] Removes listeners that were added by the mon method * @param item Ext.util.Observable/Ext.Element The item from which to remove a listener/listeners. * @param ename Object/String The event name, or an object containing event name properties. * @param fn Function If the ename parameter was an event name, this is the handler function. * @param scope Object If the ename parameter was an event name, this is the scope (this reference) in which the handler function is executed. */ removeManagedListener?( item?:any, ename?:any, fn?:any, scope?:any ): void; /** [Method] Method which removes a specified UI uiCls from the components element * @param ui String The UI to add to the element. */ removeUIClsFromElement?( ui?:string ): void; /** [Method] Renders the Component into the passed HTML element * @param container Ext.Element/HTMLElement/String The element this Component should be rendered into. If it is being created from existing markup, this should be omitted. * @param position String/Number The element ID or DOM node index within the container before which this component will be inserted (defaults to appending to the end of the container) */ render?( container?:any, position?:any ): void; /** [Method] Resumes firing of the named event s * @param eventName String... Multiple event names to resume. */ resumeEvent?( ...eventName:any[] ): void; /** [Method] Resumes firing events see suspendEvents */ resumeEvents?(): void; /** [Method] Conditionally saves a single property from this object to the given state object * @param propName String The name of the property to save. * @param state Object The state object in to which to save the property. * @param stateName String The name to use for the property in state. * @returns Boolean True if the property was saved, false if not. */ savePropToState?( propName?:string, state?:any, stateName?:string ): boolean; /** [Method] Gathers additional named properties of the instance and adds their current values to the passed state object * @param propNames String/String[] The name (or array of names) of the property to save. * @param state Object The state object in to which to save the property values. * @returns Object state */ savePropsToState?( propNames?:any, state?:any ): any; /** [Method] Saves the state of the object to the persistence store */ saveState?(): void; /** [Method] Ensures that all effects queued after sequenceFx is called on this object are run in sequence * @returns Object this */ sequenceFx?(): any; /** [Method] * @param border String/Number The border, see border. If a falsey value is passed the border will be removed. */ setBorder?( border?:any ): void; /** [Method] Sets the element s box * @param box Object The box to fill {x, y, width, height} * @param animate Boolean/Object true for the default animation or a standard Element animation config object * @returns Ext.util.Positionable this */ setBox?( box?:any, animate?:any ): Ext.util.IPositionable; /** [Method] Enable or disable the component * @param disabled Boolean true to disable. */ setDisabled?( disabled?:boolean ): void; /** [Method] Sets the dock position of this component in its parent panel * @param dock Object The dock position. * @param layoutParent Boolean true to re-layout parent. * @returns Ext.Component this */ setDocked?( dock?:any, layoutParent?:boolean ): Ext.IComponent; /** [Method] Sets the height of the component * @param height Number The new height to set. This may be one of: A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels). A String used to set the CSS height style. undefined to leave the height unchanged. * @returns Ext.Component this */ setHeight?( height?:number ): Ext.IComponent; /** [Method] Overridden in Ext rtl AbstractComponent * @param x Object * @returns Ext.util.Positionable this */ setLocalX?( x?:any ): Ext.util.IPositionable; /** [Method] Overridden in Ext rtl AbstractComponent * @param x Object * @param y Object * @returns Ext.util.Positionable this */ setLocalXY?( x?:any, y?:any ): Ext.util.IPositionable; /** [Method] Sets the local y coordinate of this element using CSS style * @param y Object * @returns Ext.util.Positionable this */ setLocalY?( y?:any ): Ext.util.IPositionable; /** [Method] Sets the margin on the target element * @param margin Number/String The margin to set. See the margin config. */ setMargin?( margin?:any ): void; /** [Method] Sets the element s position and size to the specified region * @param region Ext.util.Region The region to fill * @param animate Boolean/Object true for the default animation or a standard Element animation config object * @returns Ext.util.Positionable this */ setRegion?( region?:Ext.util.IRegion, animate?:any ): Ext.util.IPositionable; /** [Method] Sets the width and height of this Component * @param width Number/String/Object The new width to set. This may be one of: A Number specifying the new width in the Element's Ext.Element.defaultUnits (by default, pixels). A String used to set the CSS width style. A size object in the format {width: widthValue, height: heightValue}. undefined to leave the width unchanged. * @param height Number/String The new height to set (not required if a size object is passed as the first arg). This may be one of: A Number specifying the new height in the Element's Ext.Element.defaultUnits (by default, pixels). A String used to set the CSS height style. Animation may not be used. undefined to leave the height unchanged. * @returns Ext.Component this */ setSize?( width?:any, height?:any ): Ext.IComponent; /** [Method] Sets the UI for the component * @param ui String The new UI for the component. */ setUI?( ui?:string ): void; /** [Method] Convenience function to hide or show this component by Boolean * @param visible Boolean true to show, false to hide. * @returns Ext.Component this */ setVisible?( visible?:boolean ): Ext.IComponent; /** [Method] Sets the width of the component * @param width Number The new width to setThis may be one of: A Number specifying the new width in the Element's Ext.Element.defaultUnits (by default, pixels). A String used to set the CSS width style. * @returns Ext.Component this */ setWidth?( width?:number ): Ext.IComponent; /** [Method] Sets the X position of the DOM element based on page coordinates * @param x Object * @param animate Object * @returns Ext.util.Positionable this */ setX?( x?:any, animate?:any ): Ext.util.IPositionable; /** [Method] Sets the position of the DOM element in page coordinates * @param xy Object * @param animate Object * @returns Ext.util.Positionable this */ setXY?( xy?:any, animate?:any ): Ext.util.IPositionable; /** [Method] Sets the Y position of the DOM element based on page coordinates * @param y Object * @param animate Object * @returns Ext.util.Positionable this */ setY?( y?:any, animate?:any ): Ext.util.IPositionable; /** [Method] Stops any running effects and clears this object s internal effects queue if it contains any additional effects that * @returns Ext.Element The Element */ stopAnimation?(): Ext.IElement; /** [Method] Stops any running effects and clears this object s internal effects queue if it contains any additional effects that * @returns Ext.Element The Element */ stopFx?(): Ext.IElement; /** [Method] Suspends firing of the named event s * @param eventName String... Multiple event names to suspend. */ suspendEvent?( ...eventName:any[] ): void; /** [Method] Suspends the firing of all events * @param queueSuspended Boolean Pass as true to queue up suspended events to be fired after the resumeEvents call instead of discarding all suspended events. */ suspendEvents?( queueSuspended?:boolean ): void; /** [Method] Ensures that all effects queued after syncFx is called on this object are run concurrently * @returns Object this */ syncFx?(): any; /** [Method] Translates the passed page coordinates into left top css values for the element * @param x Number/Array The page x or an array containing [x, y] * @param y Number The page y, required if x is not an array * @returns Object An object with left and top properties. e.g. {left: (value), top: (value)} */ translatePoints?( x?:any, y?:number ): any; /** [Method] Shorthand for removeListener * @param eventName String The type of event the handler was associated with. * @param fn Function The handler to remove. This must be a reference to the function passed into the Ext.util.Observable.addListener call. * @param scope Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to Ext.util.Observable.addListener or the listener will not be removed. */ un?( eventName?:string, fn?:any, scope?:any ): void; /** [Method] Navigates up the ownership hierarchy searching for an ancestor Container which matches any passed simple selector or * @param selector String/Ext.Component The simple selector component or actual component to test. If not passed the immediate owner/activater is returned. * @param limit String/Number/Ext.Component This may be a selector upon which to stop the upward scan, or a limit of teh number of steps, or Component reference to stop on. * @returns Ext.container.Container The matching ancestor Container (or undefined if no match was found). */ up?( selector?:any, limit?:any ): Ext.container.IContainer; /** [Method] Update the content area of a component * @param htmlOrData String/Object If this component has been configured with a template via the tpl config then it will use this argument as data to populate the template. If this component was not configured with a template, the components content area will be updated via Ext.Element update. * @param loadScripts Boolean Only legitimate when using the html configuration. * @param callback Function Only legitimate when using the html configuration. Callback to execute when scripts have finished loading. */ update?( htmlOrData?:any, loadScripts?:boolean, callback?:any ): void; /** [Method] Updates this component s layout * @param options Object An object with layout options. */ updateLayout?( options?:any ): void; } export class AbstractComponent { /** [Method] Add methods properties to the prototype of this class * @param members Object */ static addMembers( members?:any ): void; /** [Method] Add override static properties of this class * @param members Object * @returns Ext.Base this */ static addStatics( members?:any ): Ext.IBase; /** [Method] Cancels layout of a component * @param comp Ext.Component */ static cancelLayout( comp?:Ext.IComponent ): void; /** [Method] Create a new instance of this Class * @returns Object the created instance. */ static create(): any; /** [Method] Create aliases for existing prototype methods * @param alias String/Object The new method name, or an object to set multiple aliases. See flexSetter * @param origin String/Object The original method name */ static createAlias( alias?:any, origin?:any ): void; /** [Method] Performs all pending layouts that were scheduled while suspendLayouts was in effect */ static flushLayouts(): void; /** [Method] Get the current class name in string format * @returns String className */ static getName(): string; /** [Method] Adds members to class */ static implement(): void; /** [Method] Override members of this class * @param members Object The properties to add to this class. This should be specified as an object literal containing one or more properties. * @returns Ext.Base this class */ static override( members?:any ): Ext.IBase; /** [Method] Resumes layout activity in the whole framework * @param flush Boolean true to perform all the pending layouts. This can also be achieved by calling flushLayouts directly. */ static resumeLayouts( flush?:boolean ): void; /** [Method] Stops layouts from happening in the whole framework */ static suspendLayouts(): void; /** [Method] Updates layout of a component * @param comp Ext.Component The component to update. * @param defer Boolean true to just queue the layout if this component. */ static updateLayout( comp?:Ext.IComponent, defer?:boolean ): void; } } declare module Ext { export interface IAbstractManager extends Ext.IBase { /** [Property] (Ext.util.HashMap) */ all?: Ext.util.IHashMap; /** [Method] Creates and returns an instance of whatever this manager manages based on the supplied type and config object * @param config Object The config object * @param defaultType String If no type is discovered in the config object, we fall back to this type * @returns Object The instance of whatever this manager is managing */ create?( config?:any, defaultType?:string ): any; /** [Method] Executes the specified function once for each item in the collection * @param fn Function The function to execute. * @param scope Object The scope to execute in. Defaults to this. */ each?( fn?:any, scope?:any ): void; /** [Method] Returns an item by id * @param id String The id of the item * @returns Object The item, undefined if not found. */ get?( id?:string ): any; /** [Method] Gets the number of items in the collection * @returns Number The number of items in the collection. */ getCount?(): number; /** [Method] Checks if an item type is registered * @param type String The mnemonic string by which the class may be looked up * @returns Boolean Whether the type is registered. */ isRegistered?( type?:string ): boolean; /** [Method] Registers a function that will be called when an item with the specified id is added to the manager * @param id String The item id * @param fn Function The callback function. Called with a single parameter, the item. * @param scope Object The scope (this reference) in which the callback is executed. Defaults to the item. */ onAvailable?( id?:string, fn?:any, scope?:any ): void; /** [Method] Registers an item