Files
esengine/demo/libs/modules/eui/eui.d.ts

15048 lines
462 KiB
TypeScript
Raw Normal View History

2020-06-08 11:49:45 +08:00
declare namespace eui.sys {
/**
* @private
*
*/
class Validator extends egret.EventDispatcher {
/**
* @private
* Validator对象
*/
constructor();
/**
* @private
*/
private targetLevel;
/**
* @private
*/
private invalidatePropertiesFlag;
/**
* @private
*/
private invalidateClientPropertiesFlag;
/**
* @private
*/
private invalidatePropertiesQueue;
/**
* @private
*
*/
invalidateProperties(client: UIComponent): void;
/**
* @private
*
*/
private validateProperties();
/**
* @private
*/
private invalidateSizeFlag;
/**
* @private
*/
private invalidateClientSizeFlag;
/**
* @private
*/
private invalidateSizeQueue;
/**
* @private
*
*/
invalidateSize(client: UIComponent): void;
/**
* @private
*
*/
private validateSize();
/**
* @private
*/
private invalidateDisplayListFlag;
/**
* @private
*/
private invalidateDisplayListQueue;
/**
* @private
*
*/
invalidateDisplayList(client: UIComponent): void;
/**
* @private
*
*/
private validateDisplayList();
/**
* @private
*/
private eventDisplay;
/**
* @private
*
*/
private listenersAttached;
/**
* @private
*
*/
private attachListeners();
/**
* @private
*
*/
private doPhasedInstantiationCallBack(event?);
/**
* @private
*
*/
private doPhasedInstantiation();
/**
* @private
* 使
* @param target
*/
validateClient(target: UIComponent): void;
}
}
declare namespace eui {
/**
* Register a property for a class definition in running,
* so that the EUI can get type of property accurate when parsing a EXML.
* This need not be called directly in most of time. Only when you have a custom UI
* component need to be described in EXML, you may invoke this method explicitly.
*
* Contains no following
* When the property is the basic data type(boolean, number, string or Array), you only need set a correct initial value
* for he custom property then the EXML parser can get the correct property type in running.
*
* If you can not set the correct initial value (such as <code>null</code>), the EXML parser will treat this property as
* <code>string</code>. If there is no inital value, EUI will throw an error. But you can invoked this method to register
* a property in this case.
*
*
* @param classDefinition The class definition need to be registered.
* @param property The property need to be registered. Note that the property
* name cannot start with "_" or "$".
* @param type The type need to be registered,
* such as boolean","number","string","Array","egret.Rectangle" and so on.
* @param asDefault Whether register this property as a default property of component.
* One component can register only on default property. And the default property can be spare in an EXML.
*
* @example
* <pre>
* <s:Scroller>
* <s:viewport>
* <s:Group/>
* </e:viewport>
* </e:Scroller>
* </pre>
* Cuz <code>viewport</code> is the default property of Scroller. So you can write as follow:
* <pre>
* <s:Scroller>
* <s:Group/>
* </e:Scroller>
* </pre>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便EXML文件解析过程能获取准确的属性类型
* UI EXML中用标签描述时可能需要显式注册
* boolean,number,string,Array这四种其中之一时
* EXML解析器就能通过初始值自动分析出正确的属性类型
* (null),EXML解析器会把此属性当做string来处理
*
*
* @param classDefinition
* @param property , _ $
* @param type ,boolean","number","string","Array","egret.Rectangle"
* @param asDefault ,EXML中可以使用省略属性节点的写法
* @example
* <pre>
* <s:Scroller>
* <s:viewport>
* <s:Group/>
* </e:viewport>
* </e:Scroller>
* </pre>
* viewport Scroller
* <pre>
* <s:Scroller>
* <s:Group/>
* </e:Scroller>
* </pre>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
function registerProperty(classDefinition: any, property: string, type: string, asDefault?: boolean): void;
}
declare namespace eui {
/**
* The State class defines a view state, a particular view of a component.
*
* For example, a product thumbnail could have two view states;
* a base view state with minimal information, and a rich view state with
* additional information.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* State
*
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class State extends egret.HashObject {
/**
* Constructor.
*
* @param name The name of the view state.
* State names must be unique for a given component.
* This property must be set.
* @param overrides The overrides for this view state, as an Array of objects that implement
* the IOverride interface. These overrides are applied in order when the
* state is entered, and removed in reverse order when the state is exited.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* State实例
*
* @param name
* @param overrides IOverride
* 退
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(name: string, overrides?: IOverride[]);
/**
* The name of the view state.
* State names must be unique for a given component.
* This property must be set.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
name: string;
/**
* The overrides for this view state, as an Array of objects that implement
* the IOverride interface. These overrides are applied in order when the
* state is entered, and removed in reverse order when the state is exited.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* IOverride
* 退
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
overrides: IOverride[];
/**
* The state groups that this view state belongs to as an array of String.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* string
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
stateGroups: string[];
/**
* Initialize this state and all of its overrides.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
initialize(host: any, stage: egret.Stage): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
class StateClient {
/**
* @private
*/
$stateValues: StateValues;
/**
* @private
*
*/
states: eui.State[];
/**
* @private
* "" null
*/
currentState: string;
/**
* @private
*
*/
private commitCurrentState();
/**
* @private
*
* @param stateName
*/
hasState(stateName: string): boolean;
/**
* @private
*
*/
private initializeStates(stage);
}
/**
* @private
*/
class StateValues {
/**
* @private
*/
intialized: boolean;
/**
* @private
*/
statesMap: any;
/**
* @private
*/
states: eui.State[];
/**
* @private
*/
oldState: string;
/**
* @private
*/
explicitState: string;
/**
* @private
*/
currentState: string;
/**
* @private
*/
parent: egret.DisplayObjectContainer;
/**
* @private
*/
stateIsDirty: boolean;
}
}
declare namespace eui {
function getAssets(source: string, callback: (content: any) => void, thisObject: any): void;
function getTheme(source: string, callback: (content: any) => void): void;
/**
* The UIComponent class is the base class for all visual components, both skinnable and nonskinnable.
*
* @event egret.Event.RESIZE Dispatch when the component is resized.
* @event eui.UIEvent.MOVE Dispatch when the object has moved.
* @event eui.UIEvent.CREATION_COMPLETE Dispatch when the component has finished its construction,
* property processing, measuring, layout, and drawing.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* UIComponent
*
* @event egret.Event.RESIZE UI组件的尺寸发生改变时调度
* @event eui.UIEvent.MOVE UI组件在父级容器中的位置发生改变时调度
* @event eui.UIEvent.CREATION_COMPLETE UI组件第一次被添加到舞台并完成初始化后调度
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface UIComponent extends egret.DisplayObject {
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* Specifies whether this component is included in the layout of the
* parent container.
* If <code>false</code>, the object size and position are not affected by its parent container's
* layout.
* This value is different with <code>visible</code>. the object size and position is still affected by its parent
* container's layout when the <code>visible</code> is false.
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* false
* visible属性与此属性不同visible为false
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
includeInLayout: boolean;
/**
* The horizontal distance in pixels from the left edge of the component to the
* anchor target's left edge.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
left: any;
/**
* The horizontal distance in pixels from the right edge of the component to the
* anchor target's right edge.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
right: any;
/**
* The vertical distance in pixels from the top edge of the component to the
* anchor target's top edge.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
top: any;
/**
* The vertical distance in pixels from the bottom edge of the component to the
* anchor target's bottom edge.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
bottom: any;
/**
* The horizontal distance in pixels from the center of the component to the
* center of the anchor target's content area.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
horizontalCenter: any;
/**
* The vertical distance in pixels from the center of the component to the
* center of the anchor target's content area.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
verticalCenter: any;
/**
* Specifies the width of a component as a percentage
* of its parent's size. Allowed values are 0-100.
* Setting the <code>width</code> or <code>explicitWidth</code> properties
* resets this property to NaN.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
percentWidth: number;
/**
* Specifies the height of a component as a percentage
* of its parent's size. Allowed values are 0-100.
* Setting the <code>height</code> or <code>explicitHeight</code> properties
* resets this property to NaN.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
percentHeight: number;
/**
* Number that specifies the explicit width of the component,
* in pixels, in the component's coordinates.
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly explicitWidth: number;
/**
* Number that specifies the explicit height of the component,
* in pixels, in the component's coordinates.
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly explicitHeight: number;
/**
* The minimum recommended width of the component to be considered
* by the parent during layout. This value is in the
* component's coordinates, in pixels. The default value depends on
* the component's implementation.
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,maxWidth的值时无效
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
minWidth: number;
/**
* The maximum recommended width of the component to be considered
* by the parent during layout. This value is in the
* component's coordinates, in pixels. The default value of this property is
* set by the component developer.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
maxWidth: number;
/**
* The minimum recommended height of the component to be considered
* by the parent during layout. This value is in the
* component's coordinates, in pixels. The default value depends on
* the component's implementation.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,maxHeight的值时无效
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
minHeight: number;
/**
* The maximum recommended height of the component to be considered
* by the parent during layout. This value is in the
* component's coordinates, in pixels. The default value of this property is
* set by the component developer.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
maxHeight: number;
/**
* Set the result of measuring.
* @param width measured width
* @param height measured height
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param width
* @param height
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setMeasuredSize(width: number, height: number): void;
/**
* Marks a component so that its <code>commitProperties()</code>
* method gets called during a later screen update.<p/>
*
* Invalidation is a useful mechanism for eliminating duplicate
* work by delaying processing of changes to a component until a
* later screen update.<p/>
*
* For example, if you want to change the text color and size,
* it would be wasteful to update the color immediately after you
* change it and then update the size when it gets set.
* It is more efficient to change both properties and then render
* the text with its new size and color once.<p/>
*
* Invalidation methods rarely get called.
* In general, setting a property on a component automatically
* calls the appropriate invalidation method.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便 commitProperties() <p/>
*
* <p/>
*
*
* 使<p/>
*
* Invalidation invalidation
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
invalidateProperties(): void;
/**
* Used by layout logic to validate the properties of a component
* by calling the <code>commitProperties()</code> method.
* In general, subclassers should
* override the <code>commitProperties()</code> method and not this method.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* commitProperties()
* commitProperties()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
validateProperties(): void;
/**
* Marks a component so that its <code>measure()</code>
* method gets called during a later screen update.<p/>
*
* Invalidation is a useful mechanism for eliminating duplicate
* work by delaying processing of changes to a component until a
* later screen update.<p/>
*
* For example, if you want to change the text and font size,
* it would be wasteful to update the text immediately after you
* change it and then update the size when it gets set.
* It is more efficient to change both properties and then render
* the text with its new size once.<p/>
*
* Invalidation methods rarely get called.
* In general, setting a property on a component automatically
* calls the appropriate invalidation method.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便 measure() <p/>
*
* Invalidation <p/>
*
*
* 使<p/>
*
* Invalidation invalidation
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
invalidateSize(): void;
/**
* Validates the measured size of the component.
* @param recursive If <code>true</code>, call this method
* on the objects children.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param recursive true
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
validateSize(recursive?: boolean): void;
/**
* Marks a component so that its <code>updateDisplayList()</code>
* method gets called during a later screen update.<p/>
*
* Invalidation is a useful mechanism for eliminating duplicate
* work by delaying processing of changes to a component until a
* later screen update.<p/>
*
* For example, if you want to change the width and height,
* it would be wasteful to update the component immediately after you
* change the width and then update again with the new height.
* It is more efficient to change both properties and then render
* the component with its new size once.<p/>
*
* Invalidation methods rarely get called.
* In general, setting a property on a component automatically
* calls the appropriate invalidation method.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便 updateDisplayList() <p/>
*
* Invalidation <p/>
*
*
* 使<p/>
*
* Invalidation invalidation
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
invalidateDisplayList(): void;
/**
* Validates the position and size of children and draws other
* visuals.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
validateDisplayList(): void;
/**
* Validate and update the properties and layout of this object
* and redraw it, if necessary.<p/>
*
* Processing properties that require substantial computation are normally
* not processed until the script finishes executing.<p/>
*
* For example setting the <code>width</code> property is delayed, because it can
* require recalculating the widths of the objects children or its parent.
* Delaying the processing prevents it from being repeated
* multiple times if the script sets the <code>width</code> property more than once.
* This method lets you manually override this behavior.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* <p/>
*
* width
* width
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
validateNow(): void;
/**
* Sets the layout size of the element.
* This is the size that the element uses to draw on screen.<p/>
*
* If the <code>width</code> and/or <code>height</code> parameters are left unspecified (NaN),
* EUI sets the element's layout size to its preferred width and/or preferred height.<p/>
*
* Note that calls to the <code>setLayoutBoundSize()</code> method can affect the layout position, so
* call <code>setLayoutBoundPosition()</code> after calling <code>setLayoutBoundSize()</code>.<p/>
*
* @param layoutWidth The element's layout width.
* @param layoutHeight The element's layout height.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* width / height (NaN)) EUI /<p/>
*
* setLayoutBoundSize() setLayoutBoundSize()
* setLayoutBoundPosition()
*
* @param layoutWidth
* @param layoutHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* Sets the coordinates that the element uses to draw on screen.<p/>
*
* Note that calls to the <code>setLayoutBoundSize()</code> method can affect the layout position, so
* call <code>setLayoutBoundPosition()</code> after calling <code>setLayoutBoundSize()</code>.<p/>
*
* @param x The x-coordinate of the top-left corner of the bounding box.
* @param y The y-coordinate of the top-left corner of the bounding box.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* setLayoutBoundSize() setLayoutBoundSize()
* setLayoutBoundPosition()
*
* @param x X
* @param y Y
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* Get the layout bounds that the element uses to draw on screen.
* Commonly used in the <code>updateDisplayList()</code> method in parent container.<p/>
* Priority: layout > explicit > measure.<p/>
* The result of this method is contains <code>scale</code> and <code>rotation</code>.
*
* @param bounds the instance of <code>egret.Rectangle</code> can set result.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,<code>updateDisplayList()</code><p/>
* >> <p/>
* scale和rotation
*
* @param bounds <code>egret.Rectangle</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* Get the element's preferred bounds
* Commonly used in the <code>measure()</code> method in parent container.<p/>
* Priority: explicit > measure.<p/>
* The result of this method is contains <code>scale</code> and <code>rotation</code>.
*
* @param bounds the instance of <code>egret.Rectangle</code> can set result.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,<code>measure()</code><p/>
* > <p/>
* scale和rotation
*
* @param bounds <code>egret.Rectangle</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum UIKeys {
left = 0,
right = 1,
top = 2,
bottom = 3,
horizontalCenter = 4,
verticalCenter = 5,
percentWidth = 6,
percentHeight = 7,
explicitWidth = 8,
explicitHeight = 9,
width = 10,
height = 11,
minWidth = 12,
maxWidth = 13,
minHeight = 14,
maxHeight = 15,
measuredWidth = 16,
measuredHeight = 17,
oldPreferWidth = 18,
oldPreferHeight = 19,
oldX = 20,
oldY = 21,
oldWidth = 22,
oldHeight = 23,
invalidatePropertiesFlag = 24,
invalidateSizeFlag = 25,
invalidateDisplayListFlag = 26,
layoutWidthExplicitlySet = 27,
layoutHeightExplicitlySet = 28,
initialized = 29,
}
/**
* @private
* EUI UIComponent egret.sys.implemenetUIComponenet()
* 使super关键字访问父类方法使this.$super属性访问
*/
class UIComponentImpl extends egret.DisplayObject implements eui.UIComponent {
/**
* @private
*
*/
constructor();
/**
* @private
* UIComponentImpl
*/
private initializeUIValues();
/**
* @private
*
* super.createChildren()
*/
protected createChildren(): void;
/**
* @private
* ,createChildren()
*/
protected childrenCreated(): void;
/**
* @private
* invalidateProperties()
*/
protected commitProperties(): void;
/**
* @private
*
*/
protected measure(): void;
/**
* @private
*
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
$super: any;
$UIComponent: Object;
$includeInLayout: boolean;
/**
* @private
* falsetrue
* visible属性与此属性不同visible为false
*/
includeInLayout: boolean;
/**
* @private
*
* @param stage
* @param nestLevel
*/
$onAddToStage(stage: egret.Stage, nestLevel: number): void;
/**
* @private
*
*/
private checkInvalidateFlag(event?);
/**
* @private
*
*/
left: any;
/**
* @private
*
*/
right: any;
/**
* @private
*
*/
top: any;
/**
* @private
*
*/
bottom: any;
/**
* @private
*
*/
horizontalCenter: any;
/**
* @private
*
*/
verticalCenter: any;
/**
* @private
*
*/
percentWidth: number;
/**
* @private
*
*/
percentHeight: number;
/**
* @private
*
*/
readonly explicitWidth: number;
/**
* @private
*
*/
readonly explicitHeight: number;
/**
* @private
* ,egret.NaN,NaN将使用组件的measure()
*/
$getWidth(): number;
/**
* @private
*
* @param value
*/
$setWidth(value: number): boolean;
/**
* @private
*
*/
private validateSizeNow();
/**
* @private
* ,NaN,NaN将使用组件的measure()
*/
$getHeight(): number;
/**
* @private
*
* @param value
*/
$setHeight(value: number): boolean;
/**
* @private
* ,maxWidth的值时无效
*/
minWidth: number;
/**
* @private
*
*/
maxWidth: number;
/**
* @private
* ,maxHeight的值时无效
*/
minHeight: number;
/**
* @private
* ,
*/
maxHeight: number;
/**
* @private
*
* @param width
* @param height
*/
setMeasuredSize(width: number, height: number): void;
/**
* @private
* width,height属性
*
*/
private setActualSize(w, h);
/**
* @private
*/
protected $updateUseTransform(): void;
/**
* @private
*/
$setMatrix(matrix: egret.Matrix, needUpdateProperties?: boolean): boolean;
/**
* @private
*/
$setAnchorOffsetX(value: number): boolean;
/**
* @private
*/
$setAnchorOffsetY(value: number): boolean;
/**
* @private
*
* @param value
* @returns
*/
$setX(value: number): boolean;
/**
* @private
*
* @param value
* @returns
*/
$setY(value: number): boolean;
/**
* @private
*
*/
invalidateProperties(): void;
/**
* @private
*
*/
validateProperties(): void;
/**
* @private
*
*/
invalidateSize(): void;
/**
* @private
*
*/
validateSize(recursive?: boolean): void;
/**
* @private
*
*/
private measureSizes();
/**
* @private
*
*/
invalidateDisplayList(): void;
/**
* @private
*
*/
validateDisplayList(): void;
/**
* @private
*
*/
private updateFinalSize();
/**
* @private
*
*/
validateNow(): void;
/**
* @private
*
*/
protected invalidateParentLayout(): void;
/**
* @private
*
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @private
*
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @private
* ,updateDisplayList()
* >> ,
* scale和rotation
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @private
*
* @returns
*/
private getPreferredUWidth();
/**
* @private
*
* @returns
*/
private getPreferredUHeight();
/**
* @private
* ,measure()
* >
* scale和rotation
*/
getPreferredBounds(bounds: egret.Rectangle): void;
/**
* @private
*/
private applyMatrix(bounds, w, h);
/**
* @private
*/
private getAnchorMatrix();
}
/**
* @private
*
* @param target
* @param template
*/
function mixin(target: any, template: any): void;
/**
* @private
* UIComponent的步骤
* 1.this.initializeUIValues();
* 2.UIComponent接口定义的所有内容(protected函数)
* 3.sys.implementUIComponent()
* 4.UIComponent的方法UIComponentImpl.prototype["方法名"].call(this);
* @param descendant UIComponent子类
* @param base
*/
function implementUIComponent(descendant: any, base: any, isContainer?: boolean): void;
}
declare namespace eui {
/**
* The Group class is defines the base class for layout component.
* If the contents of the sub items are too large to scroll to show, you can wrap a Scroller component outside the
* group (Give the instance of Group to <code>viewport</code> property of Scroller component).
* The scroller component can adds a scrolling touch operation for the Group.
*
* @see http://edn.egret.com/cn/article/index/id/608 Simple container
* @defaultProperty elementsContent
* @includeExample extension/eui/components/GroupExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Group Group Scroller
* ( Group Scroller viewport )Scroller Group
*
* @see http://edn.egret.com/cn/article/index/id/608 简单容器
* @defaultProperty elementsContent
* @includeExample extension/eui/components/GroupExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class Group extends egret.DisplayObjectContainer implements IViewport {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
$Group: Object;
/**
* This property is Usually invoked in resolving an EXML for adding multiple children quickly.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* EXML 便
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
elementsContent: egret.DisplayObject[];
/**
* @private
*/
$layout: LayoutBase;
/**
* The layout object for this container.
* This object is responsible for the measurement and layout of
* the UIcomponent in the container.
*
* @default eui.BasicLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* s@default eui.BasicLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
layout: LayoutBase;
/**
* @private
*
* @param value
*/
$setLayout(value: LayoutBase): boolean;
/**
* @copy eui.IViewport#contentWidth
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
readonly contentWidth: number;
/**
* @copy eui.IViewport#contentHeight
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
readonly contentHeight: number;
/**
*
* Sets the <code>contentWidth</code> and <code>contentHeight</code>
* properties.
*
* This method is intended for layout class developers who should
* call it from <code>updateDisplayList()</code> methods.
*
* @param width The new value of <code>contentWidth</code>.
* @param height The new value of <code>contentHeight</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <code>contentWidth</code> <code>contentHeight</code>
* <code>updateDisplayList()</code>
*
* @param width <code>contentWidth</code>
* @param height <code>contentHeight</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setContentSize(width: number, height: number): void;
/**
* @copy eui.IViewport#scrollEnabled
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
scrollEnabled: boolean;
/**
* @copy eui.IViewport#scrollH
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
scrollH: number;
/**
* @copy eui.IViewport#scrollV
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
scrollV: number;
/**
* @private
*
* @returns
*/
private updateScrollRect();
/**
* The number of layout element in this container.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly numElements: number;
/**
* Returns the layout element at the specified index.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getElementAt(index: number): egret.DisplayObject;
getVirtualElementAt(index: number): egret.DisplayObject;
/**
* Set the index range of the sub Visual element in container which support virtual layout.
* This method is invalid in container which do not support virtual layout.
* This method is usually invoked before layout. Override this method to release the invisible elements.
*
* @param startIndex the start index of sub visual elementsinclude
* @param endIndex the end index of sub visual elementsinclude
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
* @param startIndex
* @param endIndex
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setVirtualElementIndicesInView(startIndex: number, endIndex: number): void;
/**
* When <code>true</code>, this property
* ensures that the entire bounds of the Group respond to
* touch events such as begin.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 穿true表示可以穿透 false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
touchThrough: boolean;
/**
* @private
*/
$hitTest(stageX: number, stageY: number): egret.DisplayObject;
/**
* @private
*/
$stateValues: sys.StateValues;
/**
* The list of state for this component.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
states: State[];
/**
* @copy eui.Component#currentState
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
currentState: string;
/**
* @copy eui.Skin#hasState()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
hasState: (stateName: string) => boolean;
/**
* @private
*
*/
private initializeStates;
/**
* @private
*
*/
private commitCurrentState;
/**
* @copy eui.Component#invalidateState()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateState(): void;
/**
* @copy eui.Component#getCurrentState()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getCurrentState(): string;
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* @copy eui.Component#createChildren()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @copy eui.Component#childrenCreated()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected childrenCreated(): void;
/**
* @copy eui.Component#commitProperties()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @copy eui.Component#measure()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @copy eui.Component#updateDisplayList()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @copy eui.Component#invalidateParentLayout()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui {
/**
* Register a property of an instance is can be bound.
* This method is ususally invoked by Watcher class.
*
* @param instance the instance to be registered.
* @param property the property of specified instance to be registered.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , Watcher
*
* @param instance
* @param property
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
function registerBindable(instance: any, property: string): void;
}
declare namespace eui.sys {
/**
* @private
*/
const enum ComponentKeys {
hostComponentKey = 0,
skinName = 1,
explicitState = 2,
enabled = 3,
stateIsDirty = 4,
skinNameExplicitlySet = 5,
explicitTouchChildren = 6,
explicitTouchEnabled = 7,
skin = 8,
}
}
declare namespace eui {
/**
* The Component class defines the base class for skinnable components.
* The skins used by a Component class are typically child classes of
* the Skin class.<p/>
*
* Associate a skin class with a component class by setting the <code>skinName</code> property of the
* component class.
* @event egret.Event.COMPLETE Dispatch when <code>skinName</code> property is set the path of external EXML file and the EXML file is resolved.
*
* @includeExample extension/eui/components/ComponentExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Component Component 使 Skin <p/>
* component skinName skin component
* @event egret.Event.COMPLETE skinName为外部exml文件路径时EXML解析后调度
*
* @includeExample extension/eui/components/ComponentExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class Component extends egret.DisplayObjectContainer implements UIComponent {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
$Component: Object;
/**
* A identifier of host component which can determine only one component names.
* Usually used for quering a default skin name in theme.
* @default null
* @see eui.Theme#getSkinName()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default null
* @see eui.Theme#getSkinName()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
hostComponentKey: string;
/**
* Identifier of skin. Valid values: class definition of skin,
* class name of skin, instance of skin, EXML or external EXML file path.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,,,EXML文件内容,EXML文件路径
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
skinName: any;
/**
* @private
* skinName
*/
$parseSkinName(): void;
/**
* @private
* @param clazz
* @param url
*/
private onExmlLoaded(clazz, url);
/**
* The instance of the skin class for this component instance.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly skin: Skin;
/**
* Setter for the skin instance.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected setSkin(skin: Skin): void;
/**
* Find the skin parts in the skin class and assign them to the properties of the component.
* You do not call this method directly. This method will be invoked automatically when using a EXML as skin.
* The ID for a tag in an EXML will be passed in as <code>partName</code>, and the instance of the tag will be
* passed in as <code>instance</code>.
* @param partName name of a skin part
* @param instance instance of a skin part
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使EXML文件作为组件皮肤
* EXML文件内声明的id名称将作为此方法的partName参数id所对应的节点对象instance参数被依次传入
* @param partName
* @param instance
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setSkinPart(partName: string, instance: any): void;
/**
* Called when a skin part is added.
* You do not call this method directly.
* EUI calls it automatically when it calls the <code>setSkinPart()</code> method.<p/>
*
* Override this function to attach behavior to the part, such as add event listener or
* assign property values cached.
* @param partName name of a skin part to add.
* @param instance instance of a skin part to add.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* EUI setSkinPart()<p/>
*
*
* @param partName
* @param instance
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected partAdded(partName: string, instance: any): void;
/**
* Called when an instance of a skin part is being removed.
* You do not call this method directly.
* EUI calls it automatically when it calls the <code>setSkinPart()</code> method.<p/>
*
* Override this function to clean behavior of the part, such as remove event listener or
* disconnect the cache reference
* @param partName name of a skin part to remove.
* @param instance instance of a skin part to remove.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* EUI setSkinPart()<p/>
*
*
* @param partName
* @param instance
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected partRemoved(partName: string, instance: any): void;
/**
* @private
*
* @param value
*/
$setTouchChildren(value: boolean): boolean;
/**
* @private
*
* @param value
*/
$setTouchEnabled(value: boolean): void;
/**
* Whether the component can accept user interaction.
* After setting the <code>enabled</code> property to <code>false</code>, components will disabled touch event
* (set <code>touchEnabled</code> and <code>touchChildren</code> to false) and set state of skin to "disabled".
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* enabled false
* ( touchEnabled touchChildren false)
* "disabled",使
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
enabled: boolean;
/**
* @private
*
* @param value
*/
$setEnabled(value: boolean): boolean;
/**
* The current view state of the component. When you use this property to set a component's state,
* EUI will explicit update state of skin and ignore the return of <code>getCurrentState()</code>.
*
* Set to <code>""</code> or <code>null</code> to reset the component back to its base state.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* getCurrentState()
*
* "" null getCurrentState()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
currentState: string;
/**
* Marks the component so that the new state of the skin is set during a later screen update.
* A subclass of SkinnableComponent must override <code>getCurrentState()</code> to return a value.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>getCurrentState()</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
invalidateState(): void;
/**
* Returns the name of the state to be applied to the skin.<p/>
* A subclass of SkinnableComponent must override this method to return a value.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected getCurrentState(): string;
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* Create child objects of the component. This is an advanced method that you might override
* when creating a subclass of Component. This method will be called once it be added to stage.
* You must invoke <code>super.createChildren()</code> to complete initialization of the parent class
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* super.createChildren()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected createChildren(): void;
/**
* Performs any final processing after child objects are created.
* This is an advanced method that you might override
* when creating a subclass of Component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Component
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected childrenCreated(): void;
/**
* Processes the properties set on the component.
* You can override this method when creating a subclass of Component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* invalidateProperties()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected commitProperties(): void;
/**
* Calculates the default size.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected measure(): void;
/**
* Draws the object and/or sizes and positions its children.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* Method to invalidate parent size and display list if
* this object affects its layout (includeInLayout is true).
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* includeInLayout true使
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui {
/**
* The DataGroup class is the base container class for data items.
* The DataGroup class converts data items to visual elements for display.
* While this container can hold visual elements, it is often used only
* to hold data items as children.
*
* @see eui.Group
* @see http://edn.egret.com/cn/article/index/id/527 Data container
* @see http://edn.egret.com/cn/article/index/id/528 Array collection
* @defaultProperty dataProvider
* @includeExample extension/eui/components/DataGroupExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* DataGroup
*
*
* @see eui.Group
* @see http://edn.egret.com/cn/article/index/id/527 数据容器
* @see http://edn.egret.com/cn/article/index/id/528 数组集合
* @defaultProperty dataProvider
* @includeExample extension/eui/components/DataGroupExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class DataGroup extends Group {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
$DataGroup: Object;
/**
* @copy eui.LayoutBase#useVirtualLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
useVirtualLayout: boolean;
/**
* @private
*
* @param value
*/
$setLayout(value: LayoutBase): boolean;
/**
* @private
* 使
*/
private onUseVirtualLayoutChanged(event?);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setVirtualElementIndicesInView(startIndex: number, endIndex: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getElementAt(index: number): egret.DisplayObject;
/**
* @inheritDoc
*
* @version Egret 2.5.2
* @version eui 1.0
* @platform Web,Native
*/
getVirtualElementAt(index: number): UIComponent;
/**
* @private
*
*/
private freeRendererByIndex(index);
/**
* @private
*
* @param renderer
*/
private doFreeRenderer(renderer);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @private
*
*/
private createVirtualRenderer(item);
/**
* @private
* rendererClass创建一个Renderer,
*/
private createOneRenderer(rendererClass);
/**
* @private
*
*/
private setItemRenderSkinName(renderer, skinName);
/**
* @private
*/
$dataProviderChanged: boolean;
/**
* @private
*/
$dataProvider: ICollection;
/**
* The data provider for this DataGroup.
* It must be an ICollection, such as ArrayCollection
*
* @see eui.ICollection
* @see eui.ArrayCollection
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使ICollection接口的数据类型 ArrayCollection
*
* @see eui.ICollection
* @see eui.ArrayCollection
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
dataProvider: ICollection;
/**
* @private
*
* @param value
*/
$setDataProvider(value: ICollection): boolean;
/**
* @private
*
*/
private removeDataProviderListener();
/**
* Called when contents within the dataProvider changes. We will catch certain
* events and update our children based on that.
*
* @param event <code>eui.CollectionEvent</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param event <code>eui.CollectionEvent</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onCollectionChange(event: CollectionEvent): void;
/**
* @private
*
*/
private itemAddedHandler(items, index);
/**
* @private
*
*/
private itemRemovedHandler(items, location);
/**
* Adds the item for the specified dataProvider item to this DataGroup.
*
* This method is called as needed by the DataGroup implementation,
* it should not be called directly.
*
* @param item The item that was added, the value of dataProvider[index].
* @param index The index where the dataProvider item was added.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
*
* @param item
* @param index
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected itemAdded(item: any, index: number): void;
/**
* Removes the itemRenderer for the specified dataProvider item from this DataGroup.
*
* This method is called as needed by the DataGroup implementation,
* it should not be called directly.
*
* @param item The item that is being removed.
* @param index The index of the item that is being removed.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
*
* @param item
* @param index
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected itemRemoved(item: any, index: number): void;
/**
* @private
*
*/
private resetRenderersIndices();
/**
* @private
*
*/
private itemUpdatedHandler(item, location);
/**
* @private
*
*/
private resetRendererItemIndex(index);
/**
* The item renderer to use for data items.
* The class must implement the IItemRenderer interface.
* If defined, the <code>itemRendererFunction</code> property
* takes precedence over this property.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* IItemRenderer <br/>
* rendererClass获取顺序itemRendererFunction > itemRenderer > ItemRenerer
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemRenderer: any;
/**
* The skinName property of the itemRenderer.This property will be passed to itemRenderer.skinName as default value,if you
* did not set it explicitly.<br>
* Note: This property is invalid if the itemRenderer is not a subclass of the Component class.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* itemRenderer时skinName,skinName
* 注意: itemRenderer Component
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemRendererSkinName: any;
/**
* Function that returns an item renderer for a
* specific item.
*
* If defined, this property
* takes precedence over the <code>itemRenderer</code> property.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* rendererClass获取顺序itemRendererFunction > itemRenderer > ItemRenerer
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemRendererFunction: (item: any) => any;
/**
* @private
*
*/
private itemToRendererClass(item);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @private
*
*/
private ensureTypicalLayoutElement();
/**
* @private
*
*/
private measureRendererSize();
/**
* @private
*
*/
private setTypicalLayoutRect(rect);
/**
* @private
*
*/
$indexToRenderer: IItemRenderer[];
/**
* @private
*
*/
private removeAllRenderers();
/**
* @private
*
*/
private createRenderers();
/**
* Updates the renderer for reuse.
* This method first prepares the item
* renderer for reuse by cleaning out any stale properties
* as well as updating it with new properties.<p/>
*
* The last thing this method should do is set the <code>data</code> property
* of the item renderer.
*
* @param renderer The item renderer.
* @param itemIndex The index of the data in the data provider.
* @param data The data object this item renderer is representing.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使<p/>
*
* data
*
* @param renderer
* @param itemIndex
* @param data
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
updateRenderer(renderer: IItemRenderer, itemIndex: number, data: any): IItemRenderer;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
readonly numElements: number;
/**
* Adds the itemRenderer for the specified dataProvider item to this DataGroup.
*
* This method is called as needed by the DataGroup implementation,
* it should not be called directly.
*
* @param renderer The renderer that was added.
* @param index The index where the dataProvider item was added.
* @param item The item that was added, the value of dataProvider[index].
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* .
*
*
*
* @param renderer
* @param index
* @param item
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected rendererAdded(renderer: IItemRenderer, index: number, item: any): void;
/**
* Removes the itemRenderer for the specified dataProvider item from this DataGroup.
*
* This method is called as needed by the DataGroup implementation,
* it should not be called directly.
*
* @param renderer The renderer that is being removed.
* @param index The index of the item that is being removed.
* @param item The item that is being removed.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
* @param renderer
* @param index
* @param item
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected rendererRemoved(renderer: IItemRenderer, index: number, item: any): void;
}
}
declare namespace eui {
/**
* The Button component is a commonly used rectangular button.
* The Button component looks like it can be pressed.
* The default skin has a text label and a icon display object.
*
* @event egret.TouchEvent.TOUCH_CANCEL canceled the touch
*
* @state up Button up state
* @state down Button down state
* @state disabled Button disabled state
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ButtonExample.ts
* @language en_US
*/
/**
* Button Button
*
* @event egret.TouchEvent.TOUCH_CANCEL
*
* @state up
* @state down
* @state disabled
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ButtonExample.ts
* @language zh_CN
*/
class Button extends Component {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* [SkinPart] A skin part that defines the label of the button.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
labelDisplay: IDisplayText;
/**
* @private
*/
private _label;
/**
* Text to appear on the Button control.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
label: string;
/**
* [SkinPart] A skin part that defines an optional icon for the button.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
iconDisplay: Image;
/**
* @private
*/
private _icon;
/**
* Icon to appear on the Button control.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
icon: string | egret.Texture;
/**
* @private
* TouchEvent.TOUCH_BEGIN
*/
private touchCaptured;
/**
* This method handles the touchCancle events
* @param The <code>egret.TouchEvent</code> object.
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param event <code>egret.TouchEvent</code>
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchCancle(event: egret.TouchEvent): void;
/**
* This method handles the touch events
* @param The <code>egret.TouchEvent</code> object.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param event <code>egret.TouchEvent</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchBegin(event: egret.TouchEvent): void;
/**
* @private
*
*/
private onStageTouchEnd(event);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getCurrentState(): string;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
/**
* This method is called when handling a <code>egret.TouchEvent.TOUCH_END</code> event
* when the user touches on the button. It is only called when the button
* is the target and when <code>touchCaptured</code> is <code>true</code>.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>egret.TouchEvent.TOUCH_END</code>
* <code>touchCaptured</code> <code>true</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected buttonReleased(): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum RangeKeys {
maximum = 0,
maxChanged = 1,
minimum = 2,
minChanged = 3,
value = 4,
changedValue = 5,
valueChanged = 6,
snapInterval = 7,
snapIntervalChanged = 8,
explicitSnapInterval = 9,
}
}
declare namespace eui {
/**
* The Range class holds a value and an allowed range for that
* value, defined by <code>minimum</code> and <code>maximum</code> properties.
*
* The <code>value</code> property
* is always constrained to be between the current <code>minimum</code> and
* <code>maximum</code>, and the <code>minimum</code>,
* and <code>maximum</code> are always constrained
* to be in the proper numerical order, such that
* <code>(minimum <= value <= maximum)</code> is <code>true</code>.
*
* If the value of the <code>snapInterval</code> property is not 0,
* then the <code>value</code> property is also constrained to be a multiple of
* <code>snapInterval</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/supportClasses/RangeExample.ts
* @language en_US
*/
/**
* ,
*
* <code>value</code><code>minimum</code>
* <code>maximum</code><code>minimum</code> <code>maximum</code>
* <code>(minimum <= value <= maximum)</code>
*
* <code>snapInterval</code>0<code>value</code><code>snapInterval</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/supportClasses/RangeExample.ts
* @language zh_CN
*/
class Range extends Component {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Range
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*/
$Range: Object;
/**
* The maximum valid <code>value</code>.<p/>
*
* Changes to the value property are constrained
* by <code>commitProperties()</code> to be less than or equal to
* maximum with the <code>nearestValidValue()</code> method.
*
* @default 100
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* <code>value</code>
* <code>nearestValidValue()</code>
*
* @default 100
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
maximum: number;
/**
* The minimum valid <code>value</code>.<p/>
*
* Changes to the value property are constrained
* by <code>commitProperties()</code> to be greater than or equal to
* minimum with the <code>nearestValidValue()</code> method.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* <code>value</code>
* <code>nearestValidValue()</code>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
minimum: number;
/**
* The current value for this range.<p/>
*
* Changes to the value property are constrained
* by <code>commitProperties()</code> to be greater than or equal to
* the <code>minimum</code> property, less than or equal to the <code>maximum</code> property, and a
* multiple of <code>snapInterval</code> with the <code>nearestValidValue()</code>
* method.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* <code>value</code><code>commitProperties()</code><code>minimum</code>
* <code>minimum</code><code>nearestValidValue()</code>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
value: number;
/**
* @private
*
* @param newValue
*/
$setValue(newValue: number): boolean;
/**
* The snapInterval property controls the valid values of the <code>value</code> property.
*
* If nonzero, valid values are the sum of the <code>minimum</code> and integer multiples
* of this property, for all sums that are less than or equal to the <code>maximum</code>.<p/>
*
* For example, if <code>minimum</code> is 10, <code>maximum</code> is 20, and this property is 3, then the
* valid values of this Range are 10, 13, 16, 19, and 20.<p/>
*
* If the value of this property is zero, then valid values are only constrained
* to be between minimum and maximum inclusive.
*
* @default 1
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* snapInterval value
* minimum maximum</p>
*
* minimum 10maximum 20 3 10131619 20.</p>
*
* minimum maximum
*
* @default 1
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
snapInterval: number;
/**
* Processes the properties set on the component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected commitProperties(): void;
/**
* @private
* size到最接近snapInterval的整数倍
*/
private nearestValidSize(size);
/**
* Returns the sum of the minimum with an integer multiple of <code>interval</code> that's
* closest to <code>value</code>, unless <code>value</code> is closer to the maximum limit,
* in which case the maximum is returned.<p/>
*
* If <code>interval</code> is equal to 0, the value is clipped to the minimum and maximum
* limits.<p/>
*
* The valid values for a range are defined by the sum of the <code>minimum</code> property
* with multiples of the <code>interval</code> and also defined to be less than or equal to the
* <code>maximum</code> property.
* The maximum need not be a multiple of <code>snapInterval</code>.<p/>
*
* For example, if <code>minimum</code> is equal to 1, <code>maximum</code> is equal to 6,
* and <code>snapInterval</code> is equal to 2, the valid
* values for the Range are 1, 3, 5, 6.
*
* Similarly, if <code>minimum</code> is equal to 2, <code>maximum</code> is equal to 9,
* and <code>snapInterval</code> is equal to 1.5, the valid
* values for the Range are 2, 3.5, 5, 6.5, 8, and 9.
*
* @param value The input value.
* @param interval The value of snapInterval or an integer multiple of snapInterval.
* @return The valid value that's closest to the input.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>minimum</code> <code>value</code> <code>interval</code>
* <code>value</code> maximum<p/>
*
* <code>interval</code> 0<p/>
*
* <code>minimum</code> <code>interval</code>
* <code>maximum</code>
* <code>snapInterval</code> <p/>
*
* <code>minimum</code> 1<code>maximum</code> 6 <code>snapInterval</code> 3
* Range 1256
*
* <code>minimum</code> 2<code>maximum</code> 9
* <code>snapInterval</code> 1.5 Range 23.556.58 9
*
*
* @param value
* @param interval snapInterval snapInterval
* @return
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected nearestValidValue(value: number, interval: number): number;
/**
* Sets the current value for the <code>value</code> property.<p/>
*
* This method assumes that the caller has already used the <code>nearestValidValue()</code> method
* to constrain the value parameter
*
* @param value The new value of the <code>value</code> property.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* 使 nearestValidValue() value
*
* @param value value属性的新值
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected setValue(value: number): void;
/**
* Draws the object and/or sizes and positions its children.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* /
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateDisplayList(w: number, h: number): void;
/**
* Update size and visible of skin parts.<p/>
* Subclasses override this method to update skin parts display based on <code>minimum</code>, <code>maximum</code>
* and <code>value</code> properties.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
* minimummaximum value
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateSkinDisplayList(): void;
}
}
declare namespace eui {
/**
* The LayoutBase class defines the base class for all Spark layouts.
* To create a custom layout that works with the Spark containers,
* you must extend <code>LayoutBase</code> or one of its subclasses.
*
* <p>Subclasses must implement the <code>updateDisplayList()</code>
* method, which positions and sizes the <code>target</code> GroupBase's elements, and
* the <code>measure()</code> method, which calculates the default
* size of the <code>target</code>.</p>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 Group <code>LayoutBase</code>
*
* <p> <code>updateDisplayList()</code>
* <code>target</code> Group <code>measure()</code>
* <code>target</code> </p>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class LayoutBase extends egret.EventDispatcher {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*/
$target: Group;
/**
* The Group container whose elements are measured, sized and positioned
* by this layout.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Group
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
target: Group;
/**
* @private
*/
$useVirtualLayout: boolean;
/**
* To configure a container to use virtual layout, set the <code>useVirtualLayout</code> property
* to <code>true</code> for the layout associated with the container.
* Only DataGroup with layout set to VerticalLayout,
* HorizontalLayout, or TileLayout supports virtual layout.
* Layout subclasses that do not support virtualization must prevent changing
* this property.
*
* @default false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 <code>useVirtualLayout</code> <code>true</code>
* VerticalLayoutHorizontalLayout TileLayout DataGroup
*
*
* @default false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
useVirtualLayout: boolean;
/**
* @private
*/
$typicalWidth: number;
/**
* @private
*/
$typicalHeight: number;
/**
* Set this size of a typical element
*
* @param width the height of element
* @param height the width of element
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param width
* @param height
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setTypicalSize(width: number, height: number): void;
/**
* Called when the <code>verticalScrollPosition</code> or
* <code>horizontalScrollPosition</code> properties change.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>verticalScrollPosition</code> <code>horizontalScrollPosition</code>
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollPositionChanged(): void;
/**
* When <code>useVirtualLayout</code> is <code>true</code>,
* this method can be used by the layout target
* to clear cached layout information when the target changes.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>useVirtualLayout</code> <code>true</code>
* 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
clearVirtualLayoutCache(): void;
/**
* Called by the target after a layout element
* has been added and before the target's size and display list are
* validated.
* Layouts that cache per element state, like virtual layouts, can
* override this method to update their cache.
*
* @param index The index of the element that was added.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
* @param index
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
elementAdded(index: number): void;
/**
* This method must is called by the target after a layout element
* has been removed and before the target's size and display list are
* validated.
* Layouts that cache per element state, like virtual layouts, can
* override this method to update their cache.
*
* @param index The index of the element that was added.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
*
* @param index
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
elementRemoved(index: number): void;
/**
* Return the indices of the element visible within this Group.
*
* @return The indices of the visible element.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Group
*
* @return
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getElementIndicesInView(): number[];
/**
* Measures the target's default size based on its content.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
measure(): void;
/**
* Sizes and positions the target's elements.
*
* @param unscaledWidth Specifies the width of the target, in pixels,
* in the targets's coordinates.
*
* @param unscaledHeight Specifies the height of the component, in pixels,
* in the target's coordinates.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param unscaledWidth
* @param unscaledHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
updateDisplayList(width: number, height: number): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum ListBaseKeys {
/**
* @private
*/
requireSelection = 0,
/**
* @private
*/
requireSelectionChanged = 1,
/**
* @private
*/
proposedSelectedIndex = 2,
/**
* @private
*/
selectedIndex = 3,
/**
* @private
*/
dispatchChangeAfterSelection = 4,
/**
* @private
*/
pendingSelectedItem = 5,
/**
* @private
*/
selectedIndexAdjusted = 6,
/**
* @private
*/
touchDownItemRenderer = 7,
/**
* @private
*/
touchCancle = 8,
}
}
declare namespace eui {
/**
* The ListBase class is the base class for list component.
* It can display items of list as vertical or horizontal such as SELECT of HTML.
* @event egret.Event.CHANGE Dispatched after the selection has changed.
* This event is dispatched when the user interacts with the control.
* @event egret.Event.CHANGING Dispatched when the selection is going to change.
* Calling the <code>preventDefault()</code> method
* on the event prevents the selection from changing.<p/>
* This event is dispatched when the user interacts with the control.
*
* @event eui.ItemTapEvent.ITEM_TAP dispatched when the user tap an item in the control.
* @event egret.TouchEvent.TOUCH_CANCEL canceled the touch
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ListBase HTML SELECT
* @event egret.Event.CHANGE ,
* @event egret.Event.CHANGING preventDefault() <p/>
*
*
* @event eui.ItemTapEvent.ITEM_TAP
* @event egret.TouchEvent.TOUCH_CANCEL
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class ListBase extends DataGroup {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*/
$ListBase: Object;
/**
* Static constant representing the value "no selection".
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static NO_SELECTION: number;
/**
* Static constant representing no proposed selection.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static NO_PROPOSED_SELECTION: number;
/**
* If <code>true</code>, a data item must always be selected in the control.
* If the value is <code>true</code>, the <code>selectedIndex</code> property
* is always set to a value between 0 and (<code>dataProvider.length</code> - 1).
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* true
* true selectedIndex 0 (dataProvider.length - 1)
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
requireSelection: boolean;
/**
* he 0-based index of the selected item, or -1 if no item is selected.
* Setting the <code>selectedIndex</code> property deselects the currently selected
* item and selects the data item at the specified index.<p/>
*
* The value is always between -1 and (<code>dataProvider.length</code> - 1).
* If items at a lower index than <code>selectedIndex</code> are
* removed from the component, the selected index is adjusted downward
* accordingly. <p/>
*
* If the selected item is removed, the selected index is set to:<p/>
*
* <ul>
* <li>-1 if <code>requireSelection == false</code> or there are no remaining items.</li>
* <li>0 if <code>requireSelection == true</code> and there is at least one item.</li>
* </ul><p/>
*
* When the user changes the <code>selectedIndex</code> property by interacting with the control,
* the control dispatches the <code>change</code> and <code>changing</code> events.
* When you change the value of the <code>selectedIndex</code> property programmatically,
* it does not dispatches the <code>change</code> and <code>changing</code> events.</p>
*
* @default -1
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 0
* -1 selectedIndex <p/>
*
* -1<code>(dataProvider.length - 1)</code>
* <code>selectedIndex</code><code>selectedIndex</code><p/>
*
* <p/>
*
* <ul>
* <li>-1: 如果 <code>requireSelection == false</code> </li>
* <li> 0: 如果 <code>requireSelection == true</code> </li>
* </ul><p/>
* selectedIndex change changing
* selectedIndex change changing
*
* @default -1
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedIndex: number;
/**
* @private
*
* @returns
*/
$getSelectedIndex(): number;
/**
* Used internally to specify whether the selectedIndex changed programmatically or due to
* user interaction.
* @param value the new index need to select.
* @param dispatchChangeEvent if true, the component will dispatch a "change" event if the
* value has changed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param value
* @param dispatchChangeEvent true的时候change
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected setSelectedIndex(value: number, dispatchChangeEvent?: boolean): void;
/**
* The item that is currently selected.
* Setting this property deselects the currently selected
* item and selects the newly specified item.<p/>
*
* Setting <code>selectedItem</code> to an item that is not
* in this component results in no selection,
* and <code>selectedItem</code> being set to <code>undefined</code>.<p/>
*
* If the selected item is removed, the selected item is set to:<p/>
* <ul>
* <li><code>undefined</code> if <code>requireSelection == false</code>
* or there are no remaining items.</li>
* <li>The first item if <code>requireSelection</code> = <code>true</code>
* and there is at least one item.</li>
* </ul><p/>
*
* When the user changes the <code>selectedItem</code> property by interacting with the control,
* the control dispatches the <code>change</code> and <code>changing</code> events.
* When you change the value of the <code>selectedIndex</code> property programmatically,
* it does not dispatches the <code>change</code> and <code>changing</code> events.</p>
*
* @default undefined
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
*
* <code>selectedItem</code><code>selectedItem</code>
* <code>undefined</code><p/>
*
* <p/>
* <ul>
* <li><code>undefined</code>: <code>requireSelection == false</code>
* </li>
* <li>第一项: <code>requireSelection == true</code>
* .</li>
* </ul><p/>
*
* selectedItem change changing
* selectedItem change changing <p/>
*
* @default undefined
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedItem: any;
/**
* Used internally to specify whether the selectedItem changed programmatically or due to
* user interaction.
* @param value the new item need to select.
* @param dispatchChangeEvent if true, the component will dispatch a "change" event if the
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param value
* @param dispatchChangeEvent true的时候change
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected setSelectedItem(value: any, dispatchChangeEvent?: boolean): void;
/**
* Processes the properties set on the component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected commitProperties(): void;
/**
* Updates an item renderer for use or reuse.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
updateRenderer(renderer: IItemRenderer, itemIndex: number, data: any): IItemRenderer;
/**
* Called when an item is selected or deselected.
* Subclasses must override this method to display the selection.
* @param index The item index that was selected.
* @param selected <code>true</code> if the item is selected,
* and <code>false</code> if it is deselected.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param index
* @param selected <code>true</code><code>false</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected itemSelected(index: number, selected: boolean): void;
/**
* @private
*
*/
$isItemIndexSelected(index: number): boolean;
/**
* The selection validation and commitment workhorse method.
* Called to commit the pending selected index. This method dispatches
* the "changing" event, and if the event is not cancelled,
* commits the selection change and then dispatches the "change"
* event.
* @param dispatchChangedEvents if dispatch a "changed" event.
* @return true if the selection was committed, or false if the selection
* was cancelled.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* changing
* change
* @param dispatchChangedEvents changed
* @return true , false表示被取消
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected commitSelection(dispatchChangedEvents?: boolean): boolean;
/**
* Adjusts the selected index to account for items being added to or
* removed from this component.
* It does not dispatch a <code>change</code> event because the change did not
* occur as a direct result of user-interaction. Moreover,
* it does not dispatch a <code>changing</code> event
* or allow the cancellation of the selection.
* It also does not call the <code>itemSelected()</code> method,
* since the same item is selected;
* @param newIndex The new index.
* @param add <code>true</code> if an item was added to the component,
* and <code>false</code> if an item was removed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,itemSelected方法不会被调用changing和change事件
* @param newIndex
* @param add <code>true</code><code>false</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected adjustSelection(newIndex: number, add?: boolean): void;
/**
* Called when an item has been added to this component. Selection
* and caret related properties are adjusted accordingly.
* @param item The item being added.
* @param index The index of the item being added.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param item
* @param index
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected itemAdded(item: any, index: number): void;
/**
* Called when an item has been removed from this component.
* Selection and caret related properties are adjusted
* accordingly.
* @param item The item being removed.
* @param index The index of the item being removed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param item
* @param index
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected itemRemoved(item: any, index: number): void;
/**
* Event Listener of source data changed.
* @param The <code>egret.gui.CollectionEvent</code> object.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param event <code>egret.gui.CollectionEvent</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onCollectionChange(event: CollectionEvent): void;
/**
* Default response to dataProvider refresh events: clear the selection and caret.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected dataProviderRefreshed(): void;
/**
* Called when an item has been added to this component.
* @param renderer the renderer being added.
* @param index the index of renderer
* @param item the data of renderer
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param renderer
* @param index
* @param item
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected rendererAdded(renderer: IItemRenderer, index: number, item: any): void;
/**
* Called when an item has been removed to this component.
* @param renderer the renderer being removed.
* @param index the index of renderer.
* @param item the data of renderer.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param renderer
* @param index
* @param item
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected rendererRemoved(renderer: IItemRenderer, index: number, item: any): void;
/**
* Handles <code>egret.TouchEvent.TOUCH_BEGIN</code> events from any of the
* item renderers. This method handles <code>egret.TouchEvent.TOUCH_END</code>.
* @param event The <code>egret.TouchEvent</code> object.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>egret.TouchEvent.TOUCH_BEGIN</code><code>egret.TouchEvent.TOUCH_END</code>
*
* @param event <code>egret.TouchEvent</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onRendererTouchBegin(event: egret.TouchEvent): void;
/**
* Handles <code>egret.TouchEvent.TOUCH_CANCEL</code> events from any of the
* item renderers. This method will cancel the handles <code>egret.TouchEvent.TOUCH_END</code> and <code>egret.TouchEvent.TOUCH_TAP</code>.
* @param event The <code>egret.TouchEvent</code> object.
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>egret.TouchEvent.TOUCH_CANCEL</code><code>egret.TouchEvent.TOUCH_END</code>
* <code>egret.TouchEvent.TOUCH_TAP</code>
* @param event <code>egret.TouchEvent</code>
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onRendererTouchCancle(event: egret.TouchEvent): void;
/**
* Handles <code>egret.TouchEvent.TOUCH_END</code> events and dispatch <code>ItemTapEvent.ITEM_TAP</code> event.
* @param event The <code>egret.TouchEvent</code> object.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>ItemTapEvent.ITEM_TAP</code>
* @param event <code>egret.TouchEvent</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onRendererTouchEnd(event: egret.TouchEvent): void;
/**
* @private
*
*/
private stage_touchEndHandler(event);
}
}
declare namespace eui {
/**
* The ScrollBarBase class helps to position
* the portion of data that is displayed when there is too much data
* to fit in a display area.
* The ScrollBarBase class displays a pair of viewport and a thumb.
* viewport is a instance that implements IViewport.
*
* @see eui.IViewport
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>ScrollBarBase</code>
* ScrollBarBase
* IViewport接口实现的实例
*
* @see eui.IViewport
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class ScrollBarBase extends Component {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ScrollBarBase实例
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* [SkinPart] Thumb display object.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
thumb: eui.UIComponent;
/**
* @private
*/
$viewport: IViewport;
/**
* The viewport controlled by this scrollbar.
*
* If a viewport is specified, then changes to its actual size, content
* size, and scroll position cause the corresponding ScrollBarBase methods to
* run:
* <ul>
* <li><code>onViewportResize()</code></li>
* <li><code>onPropertyChanged()</code></li>
* </ul><p/>
*
* The VScrollBar and HScrollBar classes override these methods to keep their properties in
* sync with the viewport.
*
* @default null
* @see eui.VScrollBar
* @see eui.HScrollBar
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* ScrollBarBase
* <ul>
* <li><code>onViewportResize()</code></li>
* <li><code>onPropertyChanged()</code></li>
* </ul><p/>
*
* VScrollBar HScrollBar
*
* @default null
* @see eui.VScrollBar
* @see eui.HScrollBar
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
viewport: IViewport;
/**
* @private
*
* @param event
*/
private onViewportResize(event?);
/**
* Properties of viewport changed.
* @param event
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param event
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onPropertyChanged(event: eui.PropertyEvent): void;
/**
* Whether the scrollbar can be autohide.
* @version Egret 3.0.2
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* scrollbar
* @version Egret 3.0.2
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
autoVisibility: boolean;
}
}
declare namespace eui {
/**
* @private
*/
const enum Keys {
clickOffsetX = 0,
clickOffsetY = 1,
moveStageX = 2,
moveStageY = 3,
touchDownTarget = 4,
animation = 5,
slideDuration = 6,
pendingValue = 7,
slideToValue = 8,
liveDragging = 9,
}
/**
* The SliderBase class lets users select a value by moving a slider thumb between
* the end points of the slider track.
* The current value of the slider is determined by the relative location of
* the thumb between the end points of the slider,
* corresponding to the slider's minimum and maximum values.
* The SliderBase class is a base class for HSlider and VSlider.
*
* @event eui.UIEvent.CHANGE_START Dispatched when the scroll position is going to change
* @event eui.UIEvent.CHANGE_END Dispatched when the scroll position changed complete
* @event egret.Event.CHANGE Dispatched when the scroll position is changing
*
* @see eui.HSlider
* @see eui.VSlider
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 SliderBase
*
* SliderBase HSlider VSlider
*
* @event eui.UIEvent.CHANGE_START
* @event eui.UIEvent.CHANGE_END
* @event egret.Event.CHANGE
*
* @see eui.HSlider
* @see eui.VSlider
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class SliderBase extends Range {
/**
* Constructor
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* SliderBase
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*/
$SliderBase: Object;
/**
* [SkinPart] Highlight of track.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
trackHighlight: egret.DisplayObject;
/**
* [SkinPart] Thumb display object.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
thumb: eui.UIComponent;
/**
* [SkinPart] Track display object.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
track: eui.UIComponent;
/**
* Duration in milliseconds for the sliding animation when you tap on the track to move a thumb.
*
* @default 300
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 0
*
* @default 300
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
slideDuration: number;
/**
* Converts a track-relative x,y pixel location into a value between
* the minimum and maximum, inclusive.
*
* @param x The x coordinate of the location relative to the track's origin.
* @param y The y coordinate of the location relative to the track's origin.
* @return A value between the minimum and maximum, inclusive.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* x,y
*
* @param x x坐标
* @param y y坐标
* @return
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected pointToValue(x: number, y: number): number;
/**
* Specifies whether live dragging is enabled for the slider. If true, sets the value
* and values properties and dispatches the change event continuously as
* the user moves the thumb.
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* true沿
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
liveDragging: boolean;
/**
* The value the slider will have when the touch is end.
* This property is updated when the slider thumb moves, even if <code>liveDragging</code> is false.<p/>
* If the <code>liveDragging</code> style is false, then the slider's value is only set
* when the touch is end.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* liveDragging true
* value liveDragging false
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
pendingValue: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected setValue(value: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partRemoved(partName: string, instance: any): void;
/**
* @private
*
*/
private onTrackOrThumbResize(event);
/**
* Handle touch-begin events on the scroll thumb. Records the touch begin point in clickOffset.
*
* @param The <code>egret.TouchEvent</code> object.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param event <code>egret.TouchEvent</code> .
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onThumbTouchBegin(event: egret.TouchEvent): void;
/**
* @private
*
*/
private onStageTouchMove(event);
/**
* Capture touch-move events anywhere on or off the stage.
* @param newValue new value
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param newValue
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateWhenTouchMove(newValue: number): void;
/**
* Handle touch-end events anywhere on or off the stage.
*
* @param The <code>egret.Event</code> object.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param event <code>egret.Event</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onStageTouchEnd(event: egret.Event): void;
/**
* @private
*
*/
private onTouchBegin(event);
/**
* @private
* touchDownTarget
*/
private stageTouchEndHandler(event);
/**
* @private
*
*/
$animationUpdateHandler(animation: sys.Animation): void;
/**
* @private
*
*/
private animationEndHandler(animation);
/**
* @private
*
*/
private stopAnimation();
/**
* Handle touch-begin events for the slider track. We
* calculate the value based on the new position and then
* move the thumb to the correct location as well as
* commit the value.
* @param The <code>egret.TouchEvent</code> object.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* value
*
* @param event <code>egret.TouchEvent</code> .
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTrackTouchBegin(event: egret.TouchEvent): void;
}
}
declare namespace eui.sys {
/**
* @private
* EXML配置管理器实例
*/
let exmlConfig: EXMLConfig;
/**
* @private
*/
class EXMLParser {
/**
* @private
*/
constructor();
/**
* @private
* ID名
*/
getRepeatedIds: (xml: egret.XML) => string[];
/**
* @private
*/
private getIds;
/**
* @private
*/
private repeatedIdMap;
/**
* @private
*/
private checkDeclarations;
/**
* @private
*
*/
private currentClass;
/**
* exml的根节点是否为Skin
*/
private isSkinClass;
/**
* @private
*
*/
private currentClassName;
/**
* @private
* EXML文件
*/
private currentXML;
/**
* @private
* id缓存字典
*/
private idDic;
/**
* @private
*
*/
private stateCode;
/**
* @private
*/
private stateNames;
/**
* @private
* id列表
*/
private stateIds;
/**
* @private
*/
private skinParts;
/**
* @private
*/
private bindings;
/**
* @private
*/
private declarations;
/**
* @private
*
*/
private delayAssignmentDic;
/**
* @private
* javascript代码注册
* @param codeText javascript代码
* @param classStr
*/
$parseCode(codeText: string, classStr: string): {
new (): any;
};
/**
* @private
* XML对象为JavaScript代码
* @param xmlData EXML文件内容
*
*/
parse(text: string): {
new (): any;
};
/**
* @private
* XML对象为CpClass对象
*/
private parseClass(xmlData, className);
/**
* @private
*
*/
private startCompile();
/**
* @private
* id
*/
private addIds(items);
/**
* @private
*
*/
private isInnerClass(node);
/**
* @private
*
*/
private containsState(node);
/**
* @private
* id属性
*/
private createIdForNode(node);
/**
* @private
* ID
*/
private getNodeId(node);
/**
* @private
*
*/
private createVarForNode(node);
/**
* @private
* ,
*/
private createFuncForNode(node);
/**
* @private
*
*/
private isBasicTypeData(className);
/**
* @private
* ,
*/
private createBasicTypeForNode(node);
/**
* @private
*
*/
private addAttributesToCodeBlock(cb, varName, node);
/**
* @private
*
*/
private initlizeChildNode(node, cb, varName);
/**
* @private
*
*/
private parseInnerClass(node);
/**
* @private
*
*/
private addChildrenToProp(children, type, prop, cb, varName, errorInfo, propList, node);
/**
* @private
*
*/
private isProperty(node);
/**
* @private
* key
*/
private isNormalKey(key);
/**
* @private
* key
*/
private formatKey(key, value);
/**
* @private
*
*/
private formatValue(key, value, node);
/**
* @private
*
*/
private formatString(value);
private formatBinding(key, value, node);
private parseTemplates(value);
/**
* @private
/**
* HTML实体字符为普通字符
*/
private unescapeHTMLEntity(str);
/**
* @private
*
*/
private createConstructFunc();
/**
* @private
* includeIn和excludeFrom属性
*/
private isStateNode(node);
/**
* @private
*
*/
private getStateNames();
/**
* @private
*
*/
private createStates(parentNode);
/**
* @private
* ID是否创建了类成员变量
*/
private checkIdForState(node);
/**
* @private
*
*/
private getStateByName(name, node);
/**
* @private
* ID和位置
*/
private findNearNodeId(node);
/**
* @private
*
*/
private getClassNameOfNode(node);
}
}
declare namespace eui {
/**
* The ToggleButton component defines a toggle button.
* Clicking the button toggles it between the up and an down states.
* If you click the button while it is in the up state,
* it toggles to the down state. You must click the button again
* to toggle it back to the up state.
* <p>You can get or set this state programmatically
* by using the <code>selected</code> property.</p>
*
* @event egret.Event.CHANGE Dispatched when the <code>selected</code> property
* changes for the ToggleButton control.
* This event is dispatched only when the
* user interacts with the control by touching.
*
* @state up Button up state
* @state down Button down state
* @state disabled Button disabled state
* @state upAndSelected Up state when the button is selected
* @state downAndSelected Down state when the button is selected
* @state disabledAndSelected Disabled state when the button is selected
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ToggleButtonExample.ts
* @language en_US
*/
/**
* ToggleButton
*
* <p>使 <code>selected</code> </p>
*
* @event egret.Event.CHANGE ToggleButtonBase <code>selected</code>
*
*
* @state up
* @state down
* @state disabled
* @state upAndSelected
* @state downAndSelected
* @state disabledAndSelected
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ToggleButtonExample.ts
* @language zh_CN
*/
class ToggleButton extends Button {
/**
* @private
*/
$selected: boolean;
/**
* Contains <code>true</code> if the button is in the down state,
* and <code>false</code> if it is in the up state.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>true</code> <code>false</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selected: boolean;
/**
* @private
*
* @param value
*/
$setSelected(value: boolean): boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getCurrentState(): string;
/**
* @private
* ,true使
*/
$autoSelected: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected buttonReleased(): void;
}
}
declare namespace eui {
/**
* Linear layout base class, usually as the parent class of
* <code>HorizontalLayout</code> and <code>VerticalLayout</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 线 <code>HorizontalLayout</code> <code>VerticalLayout</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class LinearLayoutBase extends LayoutBase {
/**
* @private
*/
$horizontalAlign: string;
/**
* The horizontal alignment of layout elements.
* <p>The <code>egret.HorizontalAlign</code> and <code>eui.JustifyAlign</code> class
* defines the possible values for this property.</p>
*
* @default "left"
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p><code>egret.HorizontalAlign</code>
* <code>eui.JustifyAlign</code><p>
*
* @default "left"
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
horizontalAlign: string;
/**
* @private
*/
$verticalAlign: string;
/**
* The vertical alignment of layout elements.
* <p>The <code>egret.VerticalAlign</code> and <code>eui.JustifyAlign</code> class
* defines the possible values for this property.</p>
*
* @default "top"
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 VerticalAlign
* <p><code>egret.VerticalAlign</code>
* <code>eui.JustifyAlign</code><p>
*
* @default "top"
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
verticalAlign: string;
/**
* @private
*/
$gap: number;
/**
* The space between layout elements, in pixels.
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
gap: number;
/**
* @private
*/
$paddingLeft: number;
/**
* Number of pixels between the container's left edge
* and the left edge of the first layout element.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
paddingLeft: number;
/**
* @private
*/
$paddingRight: number;
/**
* Number of pixels between the container's right edge
* and the right edge of the last layout element.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
paddingRight: number;
/**
* @private
*/
$paddingTop: number;
/**
* The minimum number of pixels between the container's top edge and
* the top of all the container's layout elements.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
paddingTop: number;
/**
* @private
*/
$paddingBottom: number;
/**
* The minimum number of pixels between the container's bottom edge and
* the bottom of all the container's layout elements.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
paddingBottom: number;
/**
* Convenience function for subclasses that invalidates the
* target's size and displayList so that both layout's <code>measure()</code>
* and <code>updateDisplayList</code> methods get called.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便
* <code>measure()</code><code>updateDisplayList</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected invalidateTargetLayout(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
measure(): void;
/**
* Compute exact values for measuredWidth and measuredHeight.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* measuredWidth measuredHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected measureReal(): void;
/**
* Compute potentially approximate values for measuredWidth and measuredHeight.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* measuredWidth measuredHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected measureVirtual(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
updateDisplayList(width: number, height: number): void;
/**
* An Array of the virtual layout elements size cache.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected elementSizeTable: number[];
/**
* Gets the starting position of the specified index element
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected getStartPosition(index: number): number;
/**
* Gets the size of the specified index element
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected getElementSize(index: number): number;
/**
* Gets the sum of the size of cached elements
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected getElementTotalSize(): number;
/**
* @inheritDoc
*
* @param index
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
elementRemoved(index: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
clearVirtualLayoutCache(): void;
/**
* The binary search to find the specified index position of the display object
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected findIndexAt(x: number, i0: number, i1: number): number;
/**
* The first element index in the view of the virtual layout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected startIndex: number;
/**
* The last element index in the view of the virtual layout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected endIndex: number;
/**
* A Flag of the first element and the end element has been calculated.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected indexInViewCalculated: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
scrollPositionChanged(): void;
/**
* Get the index of the first and last element in the view,
* and to return whether or not to change.
*
* @return has the index changed
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,
*
* @return
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected getIndexInView(): boolean;
/**
* The maximum size of elements
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected maxElementSize: number;
/**
* Update the layout of the virtualized elements
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateDisplayListVirtual(width: number, height: number): void;
/**
* Update the layout of the reality elements
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected updateDisplayListReal(width: number, height: number): void;
/**
* Allocate blank area for each variable size element.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected flexChildrenProportionally(spaceForChildren: number, spaceToDistribute: number, totalPercent: number, childInfoArray: any[]): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
class ChildInfo {
/**
* @private
*/
layoutElement: eui.UIComponent;
/**
* @private
*/
size: number;
/**
* @private
*/
percent: number;
/**
* @private
*/
min: number;
/**
* @private
*/
max: number;
}
}
declare namespace eui {
/**
* The HSlider (horizontal slider) control lets users select a value
* by moving a slider thumb between the end points of the slider track.
* The current value of the slider is determined by the relative location of the thumb between
* the end points of the slider, corresponding to the slider's minimum and maximum values.
*
* @includeExample extension/eui/components/HSliderExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 HSlider
*
*
* @includeExample extension/eui/components/HSliderExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class HSlider extends SliderBase {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected pointToValue(x: number, y: number): number;
/**
* @private
*
* @returns
*/
private getThumbRange();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateSkinDisplayList(): void;
}
}
declare namespace eui {
/**
* Default instance of interface <code>IAssetAdapter</code>.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/supportClasses/DefaultAssetAdapterExample.ts
* @language en_US
*/
/**
* IAssetAdapter接口实现
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/supportClasses/DefaultAssetAdapterExample.ts
* @language zh_CN
*/
class DefaultAssetAdapter implements IAssetAdapter {
/**
* resolve asset.
* @param source the identifier of new asset need to be resolved
* @param callBack callback function when resolving complete
* examplecallBack(content:any,source:string):void;
* @param thisObject <code>this</code> object of callback method
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param source
* @param callBack callBack(content:any,source:string):void;
* @param thisObject callBack的 this
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getAsset(source: string, callBack: (data: any, source: string) => void, thisObject: any): void;
/**
* @private
*
* @param event
*/
private onLoadFinish(event);
}
}
declare namespace eui {
/**
* The Image control lets you show JPEG, PNG, and GIF files
* at runtime. Image inherit Bitmapso you can set the <code>bitmapData</code> property
* to show the data. you can also set the <code>source</code> property, Image will auto load
* and show the url image or the bitmapData.
*
* @event egret.Event.COMPLETE Dispatched when the image loaded complete.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ImageExample.ts
* @language en_US
*/
/**
* Image JPEGPNG Image Bitmap bitmapData
* Image 便 source source url作为值
* url后 BitmapData source
*
* @event egret.Event.COMPLETE
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ImageExample.ts
* @language zh_CN
*/
class Image extends egret.Bitmap implements UIComponent {
/**
* Constructor.
*
* @param source The source used for the bitmap fill. the value can be
* a string or an instance of <code>egret.Texture</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param source <code>egret.Texture</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(source?: string | egret.Texture);
/**
* Represent a Rectangle Area that the 9 scale area of Image.
* Notice: This property is valid only when <code>fillMode</code>
* is <code>BitmapFillMode.SCALE</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* 注意:此属性仅在<code>fillMode</code><code>BitmapFillMode.SCALE</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scale9Grid: egret.Rectangle;
/**
* Determines how the bitmap fills in the dimensions.
* <p>When set to <code>BitmapFillMode.CLIP</code>, the bitmap
* ends at the edge of the region.</p>
* <p>When set to <code>BitmapFillMode.REPEAT</code>, the bitmap
* repeats to fill the region.</p>
* <p>When set to <code>BitmapFillMode.SCALE</code>, the bitmap
* stretches to fill the region.</p>
*
* @default <code>BitmapFillMode.SCALE</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p> <code>BitmapFillMode.CLIP</code></p>
* <p> <code>BitmapFillMode.REPEAT</code></p>
* <p> <code>BitmapFillMode.SCALE</code></p>
*
* @default <code>BitmapFillMode.SCALE</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
fillMode: string;
$setFillMode(value: string): boolean;
/**
* @private
*/
private sourceChanged;
/**
* @private
*/
private _source;
/**
* The source used for the bitmap fill. the value can be
* a string or an instance of <code>egret.Texture</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>egret.Texture</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
source: string | egret.Texture;
$setTexture(value: egret.Texture): boolean;
/**
* @private
* source
*/
private parseSource();
$measureContentBounds(bounds: egret.Rectangle): void;
/**
* @private
*
* @param context
*/
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* @copy eui.UIComponent#createChildren
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @private
* width,height属性
*
*/
protected setActualSize(w: number, h: number): void;
/**
* @copy eui.UIComponent#childrenCreated
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected childrenCreated(): void;
/**
* @copy eui.UIComponent#commitProperties
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @copy eui.UIComponent#measure
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @copy eui.UIComponent#updateDisplayList
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @copy eui.UIComponent#invalidateParentLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @copy eui.UIComponent#includeInLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @copy eui.UIComponent#left
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @copy eui.UIComponent#right
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @copy eui.UIComponent#top
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @copy eui.UIComponent#bottom
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @copy eui.UIComponent#horizontalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @copy eui.UIComponent#verticalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @copy eui.UIComponent#percentWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @copy eui.UIComponent#percentHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @copy eui.UIComponent#explicitWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @copy eui.UIComponent#explicitHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @copy eui.UIComponent#minWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @copy eui.UIComponent#maxWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @copy eui.UIComponent#minHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @copy eui.UIComponent#maxHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui {
/**
* The ItemRenderer class is the base class for item renderers.
*
* @state up Up state
* @state down Down state
* @state upAndSelected Up state when the button is selected
* @state downAndSelected Down state when the button is selected
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ItemRendererExample.ts
* @language en_US
*/
/**
* ItemRenderer
*
* @state up
* @state down
* @state upAndSelected
* @state downAndSelected
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ItemRendererExample.ts
* @language zh_CN
*/
class ItemRenderer extends Component implements IItemRenderer {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*/
private _data;
/**
* The data to render or edit.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
data: any;
/**
* Update the view when the <code>data</code> property changes.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected dataChanged(): void;
/**
* @private
*/
private _selected;
/**
* Contains <code>true</code> if the item renderer
* can show itself as selected.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selected: boolean;
/**
* The index of the item in the data provider
* of the host component of the item renderer.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemIndex: number;
/**
* @private
* TouchEvent.TOUCH_BEGIN
*/
private touchCaptured;
/**
* Dispatched when an event of some kind occurred that canceled the touch.
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 3.0.1
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchCancle(event: egret.TouchEvent): void;
/**
* Handles <code>TouchEvent.TOUCH_BEGIN</code> events
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchBegin(event: egret.TouchEvent): void;
/**
* @private
*
*/
private onStageTouchEnd(event);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getCurrentState(): string;
}
}
declare namespace eui {
/**
* Label is an UIComponent that can render one or more lines of text.
* The text to be displayed is determined by the <code>text</code> property.
* The formatting of the text is specified by the styles
* such as <code>fontFamily</code> and <code>size</code>.
*
* <p>Because Label is fast and lightweight, it is especially suitable
* for use cases that involve rendering many small pieces of non-interactive
* text, such as item renderers and labels in Button skins.</p>
*
* <p>In Label, three character sequences are recognized
* as explicit line breaks: CR (<code>"\r"</code>), LF (<code>"\n"</code>),
* and CR+LF (<code>"\r\n"</code>).</p>
*
* <p>If you don't specify any kind of width for a Label,
* then the longest line, as determined by these explicit line breaks,
* determines the width of the Label.</p>
*
* <p>If you do specify some kind of width, then the specified text is
* word-wrapped at the right edge of the component's bounds.
* If the text extends below the bottom of the component,
* it is clipped.</p>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/LabelExample.ts
* @language en_US
*/
/**
* Label UI组件 text fontFamily size
* Label Button
* Label CR\rLF\n CR+LF\r\n
* Label Label
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/LabelExample.ts
* @language zh_CN
*/
class Label extends egret.TextField implements UIComponent, IDisplayText {
/**
* Constructor.
*
* @param text The text displayed by this text component.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param text
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(text?: string);
/**
* style中属性是否允许被赋值
*/
private $styleSetMap;
private $revertStyle;
private $style;
private $changeFromStyle;
/**
* The style of text.
* @version Egret 3.2.1
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 3.2.1
* @platform Web,Native
* @language zh_CN
*/
style: string;
$setStyle(value: string): void;
$setFontFamily(value: string): boolean;
$setSize(value: number): boolean;
$setBold(value: boolean): boolean;
$setItalic(value: boolean): boolean;
$setTextAlign(value: string): boolean;
$setVerticalAlign(value: string): boolean;
$setLineSpacing(value: number): boolean;
$setTextColor(value: number): boolean;
$setWordWrap(value: boolean): void;
$setDisplayAsPassword(value: boolean): boolean;
$setStrokeColor(value: number): boolean;
$setStroke(value: number): boolean;
$setMaxChars(value: number): boolean;
$setMultiline(value: boolean): boolean;
$setBorder(value: boolean): void;
$setBorderColor(value: number): void;
$setBackground(value: boolean): void;
$setBackgroundColor(value: number): void;
/**
* @private
*
*/
$invalidateTextField(): void;
/**
* @private
*
* @param value
*/
$setWidth(value: number): boolean;
/**
* @private
*
* @param value
*/
$setHeight(value: number): boolean;
/**
* @private
*
* @param value
*/
$setText(value: string): boolean;
/**
* @private
*/
private _widthConstraint;
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* @copy eui.UIComponent#createChildren
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @copy eui.UIComponent#childrenCreated
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected childrenCreated(): void;
/**
* @copy eui.UIComponent#commitProperties
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @copy eui.UIComponent#measure
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @copy eui.UIComponent#updateDisplayList
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @copy eui.UIComponent#invalidateParentLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @copy eui.UIComponent#includeInLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @copy eui.UIComponent#left
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @copy eui.UIComponent#right
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @copy eui.UIComponent#top
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @copy eui.UIComponent#bottom
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @copy eui.UIComponent#horizontalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @copy eui.UIComponent#verticalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @copy eui.UIComponent#percentWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @copy eui.UIComponent#percentHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @copy eui.UIComponent#explicitWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @copy eui.UIComponent#explicitHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @copy eui.UIComponent#minWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @copy eui.UIComponent#maxWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @copy eui.UIComponent#minHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @copy eui.UIComponent#maxHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui {
/**
* The List control displays a vertical or horizontal list of items.
* The user can select one or more items from the list, depending
* on the value of the <code>allowMultipleSelection</code> property.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ListExample.ts
* @language en_US
*/
/**
* List <code>allowMultipleSelection</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ListExample.ts
* @language zh_CN
*/
class List extends ListBase {
/**
* whether are allowed to multiple selection.
* If <code>true</code> tap an unselected item will be selected,
* and tap the item again will cancel selection.
*
* @default false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , <code>true</code>
*
*
* @default false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
allowMultipleSelection: boolean;
/**
* @private
*/
private _selectedIndices;
/**
* @private
*/
private _proposedSelectedIndices;
/**
* An Array of numbers representing the indices of the currently selected
* item or items.
*
* @default []
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default []
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedIndices: number[];
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
selectedIndex: number;
/**
* An Array representing the currently selected data items.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedItems: any[];
/**
* Specify whether the selectedIndices changed programmatically or due to
* user interaction.
*
* @param value An array of numbers representing the indices of the selected
* @param dispatchChangeEvent whether dispatched a change event.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param value
* @param dispatchChangeEvent changed事件
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected setSelectedIndices(value: number[], dispatchChangeEvent?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitSelection(dispatchChangedEvents?: boolean): boolean;
/**
* @private
*
*/
private isValidIndex;
/**
* Given a new selection interval, figure out which
* items are newly added/removed from the selection interval and update
* selection properties and view accordingly.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected commitMultipleSelection(): void;
/**
* @private
*
* @param index
* @returns
*/
$isItemIndexSelected(index: number): boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
dataProviderRefreshed(): void;
/**
* @private
*
*/
private calculateSelectedIndices(index);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected onRendererTouchEnd(event: egret.TouchEvent): void;
}
}
declare namespace eui {
/**
* The Panel class defines a container that includes a title bar,
* a closeButton, a moveArea, and a content area for its children.
*
* @event eui.UIEvent.CLOSING Dispatched when the close button is taped
* you can use <code>event.preventDefault()</code> to prevent close.
*
* @defaultProperty elementsContent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/PanelExample.ts
* @language en_US
*/
/**
* Panel
*
* @event eui.UIEvent.CLOSING
* <code>event.preventDefault()</code>
*
* @defaultProperty elementsContent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/PanelExample.ts
* @language zh_CN
*/
class Panel extends Component {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*
*/
private onWindowTouchBegin(event);
/**
* write-only property,This property is Usually invoked in resolving an EXML for adding multiple children quickly.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* EXML 便
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
elementsContent: egret.DisplayObject[];
/**
* The skin part that defines the appearance of the close button.
* When taped, the close button dispatches a <code>closing</code> event.
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
closeButton: Button;
/**
* The area where the user must drag to move the window.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
moveArea: egret.DisplayObject;
/**
* The skin part that defines the appearance of the
* title text in the container.
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
titleDisplay: IDisplayText;
/**
* @private
*/
private _title;
/**
* Title or caption displayed in the title bar.
*
* @default ""
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default ""
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
title: string;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partRemoved(partName: string, instance: any): void;
/**
* Dispatch the "closing" event when the closeButton is clicked.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* closeButton closing
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onCloseButtonClick(event: egret.TouchEvent): void;
/**
* Close the panel and remove from the parent container.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
close(): void;
/**
* @private
*
*/
private offsetPointX;
/**
* @private
*/
private offsetPointY;
/**
* Called when the user starts dragging a Panel.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchBegin(event: egret.TouchEvent): void;
/**
* Called when the user drags a Panel.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchMove(event: egret.TouchEvent): void;
/**
* Called when the user releases the Panel.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected onTouchEnd(event: egret.TouchEvent): void;
}
}
declare namespace eui {
/**
* The ProgressBar control provides a visual representation of the progress of a task over time.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ProgressBarExample.ts
* @language en_US
*/
/**
* ProgressBar
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ProgressBarExample.ts
* @language zh_CN
*/
class ProgressBar extends Range {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* this hightlight component of the progressbar.
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
thumb: eui.UIComponent;
/**
* the label of the progressbar.
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
labelDisplay: Label;
/**
* @private
*/
private _labelFunction;
/**
* a text format callback functionexample
* <code>labelFunction(value:Number,maximum:Number):String;</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <code>labelFunction(value:Number,maximum:Number):String;</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
labelFunction: (value: number, maximum: number) => string;
/**
* Convert the current value to display text
*
* @param value the current value
* @param maximum the maximum value
*
* @return a converted text
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* value转换成文本
*
* @param value
* @param maximum
*
* @return
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
protected valueToLabel(value: number, maximum: number): string;
/**
* @private
*/
private _slideDuration;
/**
* Duration in milliseconds for a sliding animation
* when the value changing. If the vlaue is 0, no animation will be done.
*
* @default 500
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* value改变时更新视图的缓动动画时间()0
*
* @default 500
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
slideDuration: number;
/**
* @private
*/
private _direction;
/**
* Direction in which the fill of the ProgressBar expands toward completion.
* you should use the <code>Direction</code> class constants to set the property.
*
* @default Direction.LTR
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ProgressBar 使 <code>Direction</code>
*
* @default Direction.LTR
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
direction: string;
/**
* @private
*
*/
private animation;
/**
* @private
* value
*/
private slideToValue;
/**
* @private
*
* @param newValue
*/
$setValue(newValue: number): boolean;
/**
* @private
*/
private animationValue;
/**
* @private
*
*/
private animationUpdateHandler(animation);
/**
* @private
*/
private thumbInitX;
/**
* @private
*/
private thumbInitY;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partRemoved(partName: string, instance: any): void;
/**
* @private
* thumb的位置或尺寸发生改变
*/
private onThumbResize(event);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateSkinDisplayList(): void;
}
}
declare namespace eui {
/**
* The RadioButton component allows the user make a single choice
* within a set of mutually exclusive choices.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/RadioButtonExample.ts
* @language en_US
*/
/**
* RadioButton 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/RadioButtonExample.ts
* @language zh_CN
*/
class RadioButton extends ToggleButton {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
* RadioButtonGroup中的索引
*/
$indexNumber: number;
/**
* @private
* RadioButtonGroup
*/
$radioButtonGroup: RadioButtonGroup;
/**
* The RadioButton component is enabled if the
* RadioButtonGroup is enabled and the RadioButton itself is enabled.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButtonGroup RadioButton RadioButton
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
enabled: boolean;
/**
* @private
*/
private _group;
/**
* The RadioButtonGroup component to which this RadioButton belongs.
* If this property is not set,
* a unique RadioButtonGroup is created automatically based on the groupName property.
*
* @see eui.RadioButton#groupName
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton RadioButtonGroup
* groupName属性自动创建一个唯一的RadioButtonGroup
*
* @see eui.RadioButton#groupName
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
group: RadioButtonGroup;
/**
* @private
*/
private groupChanged;
/**
* @private
*/
private _groupName;
/**
* Specifies the name of the group to which this RadioButton component belongs
*
* @default radioGroup
*
* @see eui.RadioButton#group
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton
*
* @default radioGroup
*
* @see eui.RadioButton#group
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
groupName: string;
/**
* @private
*
* @param value
*/
$setSelected(value: boolean): boolean;
/**
* @private
*/
private _value;
/**
* Optional user-defined value
* that is associated with a RadioButton component.
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
value: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected buttonReleased(): void;
/**
* @private
*
*/
private addToGroup();
}
}
declare namespace eui {
/**
* The RadioButtonGroup component defines a group of RadioButton components
* that act as a single mutually exclusive component; therefore,
* a user can select only one RadioButton component at a time.
*
* @event egret.Event.CHANGE Dispatched when the value of the selected RadioButton component in
* this group changes.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/RadioButtonGroupExample.ts
* @language en_US
*/
/**
* RadioButtonGroup RadioButton RadioButton
*
* @event egret.Event.CHANGE RadioButton
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/RadioButtonGroupExample.ts
* @language zh_CN
*/
class RadioButtonGroup extends egret.EventDispatcher {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*
*/
$name: string;
/**
* @private
*
*/
private radioButtons;
/**
* Returns the RadioButton component at the specified index.
*
* @param index The 0-based index of the RadioButton in the
* RadioButtonGroup.
*
* @return The specified RadioButton component if index is between
* 0 and <code>numRadioButtons</code> - 1. Returns
* <code>null</code> if the index is invalid.
*
* @see eui.RadioButtonGroup#numRadioButtons
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton
*
* @param index RadioButtonGroup RadioButton
*
* @return 0 <code>numRadioButtons</code> RadioButton 1
* <code>null</code>
*
* @see eui.RadioButtonGroup#numRadioButtons
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getRadioButtonAt(index: number): RadioButton;
/**
* @private
*/
$enabled: boolean;
/**
* Determines whether selection is allowed. Note that the value returned
* only reflects the value that was explicitly set on the
* <code>RadioButtonGroup</code> and does not reflect any values explicitly
* set on the individual RadioButtons.
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>RadioButtonGroup</code>
* RadioButton
*
* @default true
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
enabled: boolean;
/**
* The number of RadioButtons that belong to this RadioButtonGroup.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButtonGroup RadioButton
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly numRadioButtons: number;
/**
* @private
*/
private _selectedValue;
/**
* The <code>value</code> property of the selected
* RadioButton component in the group, if it has been set,
* otherwise, the <code>label</code> property of the selected RadioButton.
* If no RadioButton is selected, this property is <code>null</code>.
*
* <p>If you set <code>selectedValue</code>, selects the
* first RadioButton component whose <code>value</code> or
* <code>label</code> property matches this value.</p>
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton <code>value</code>
* RadioButton <code>label</code>
* RadioButton <code>null</code>
*
* <p> <code>selectedValue</code> <code>value</code> <code>label</code>
* RadioButton </p>
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedValue: any;
/**
* @private
*/
private _selection;
/**
* Contains a reference to the currently selected
* RadioButton component in the group.This property is valid only
* when the target RadioButton is displayed on the display list
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* RadioButton在显示列表时有效
*
* @default null
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selection: RadioButton;
/**
* @private
*
*/
$addInstance(instance: RadioButton): void;
/**
* @private
*
*/
$removeInstance(instance: RadioButton, addListener?: boolean): void;
/**
* @private
*
*/
$setSelection(value: RadioButton, fireChange?: boolean): boolean;
/**
* @private
*
*/
private changeSelection(index, fireChange?);
/**
* @private
*
*/
private addedHandler(event);
/**
* @private
*
*/
private removedHandler(event);
}
}
declare namespace eui {
/**
* The Rect component is a rectangular shape. It can be touched.
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Rect
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class Rect extends Component {
constructor(width?: number, height?: number, fillColor?: number);
protected createNativeDisplayObject(): void;
/**
* @private
*/
$graphics: egret.Graphics;
readonly graphics: egret.Graphics;
/**
* @private
*/
$measureContentBounds(bounds: egret.Rectangle): void;
private $fillColor;
/**
* Fill color
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
fillColor: number;
private $fillAlpha;
/**
* Fill alpha
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,1
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
fillAlpha: number;
private $strokeColor;
/**
* The line's color inside the rect border. Caution: when the strokeWeight is 0, a line is not drawn
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , strokeWeight 0
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
strokeColor: number;
private $strokeAlpha;
/**
* The line's alpha inside the rect border. Caution: when the strokeWeight is 0, a line is not drawn
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , strokeWeight 0
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
strokeAlpha: number;
private $strokeWeight;
/**
* The line's thickness inside the rect border. Caution: when the strokeWeight is 0, a line is not drawn
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* (), strokeWeight 0
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
strokeWeight: number;
private $ellipseWidth;
/**
* Width used to draw an ellipse with rounded corners (in pixels).
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ()
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
ellipseWidth: number;
private $ellipseHeight;
/**
* Height used to draw an ellipse with rounded corners (in pixels). If no value is specified, the default value matches the value of the ellipseWidth parameter.
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* () ellipseWidth
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
ellipseHeight: number;
/**
* @copy eui.UIComponent#updateDisplayList
*
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @private
*/
$onRemoveFromStage(): void;
}
}
declare namespace eui {
/**
* The Scroller component displays a single scrollable component,
* called a viewport, and horizontal and vertical scroll bars.
* The viewport must implement the IViewport interface.
* <p>The Group components implement the IViewport interface
* and can be used as the children of the Scroller control,
* as the following example shows:</p>
* <pre>
* <s:Scroller width="100" height="100">
* <s:Group>
* <s:Image width="300" height="400" source="assets/logo.jpg"/>
* </s:Group>
* </s:Scroller>
* </pre>
* <p>The size of the Image control is set larger than that of its parent Group container.
* By default, the child extends past the boundaries of the parent container.
* Rather than allow the child to extend past the boundaries of the parent container,
* the Scroller specifies to clip the child to the boundaries and display scroll bars.</p>
*
* @event eui.UIEvent.CHANGE_START Dispatched when the scroll position is going to change
* @event eui.UIEvent.CHANGE_END Dispatched when the scroll position changed complete
* @event egret.Event.CHANGE Dispatched when the scroll position is changing
* @event egret.TouchEvent.TOUCH_CANCEL canceled the touch
*
* @defaultProperty viewport
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ScrollerExample.ts
* @language en_US
*/
/**
* Scroller IViewport
* <p>Group IViewport Scroller </p>
* <pre>
* <s:Scroller width="100" height="100">
* <s:Group>
* <s:Image width="300" height="400" source="assets/logo.jpg"/>
* </s:Group>
* </s:Scroller>
* </pre>
* Image Group
* Scroller
*
* @event eui.UIEvent.CHANGE_START
* @event eui.UIEvent.CHANGE_END
* @event egret.Event.CHANGE
* @event egret.TouchEvent.TOUCH_CANCEL
*
* @defaultProperty viewport
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ScrollerExample.ts
* @language zh_CN
*/
class Scroller extends Component {
/**
* The threshold value(in pixels) trigger the rolling.
* when the touch points deviate from the initial touch point than this value will trigger the rolling.
*
* @default 5
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 5
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static scrollThreshold: number;
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
private $bounces;
/**
* Whether to enable rebound, rebound When enabled, ScrollView contents allowed to continue to drag the border after arriving at the end user drag operation, and then bounce back boundary position
* @default true
* @version Egret 2.5.6
* @language en_US
*/
/**
* ScrollView中内容在到达边界后允许继续拖动
* @default true
* @version Egret 2.5.6
* @language zh_CN
*/
bounces: boolean;
/**
* Adjust the speed to get out of the slide end.When equal to 0,the scroll animation will not be play.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 0
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
throwSpeed: number;
/**
* @private
*/
$getThrowInfo(currentPos: number, toPos: number): eui.ScrollerThrowEvent;
/**
* @private
*/
$Scroller: Object;
/**
* the horizontal scroll bar
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
horizontalScrollBar: eui.HScrollBar;
/**
* the vertical scroll bar
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @skinPart
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
verticalScrollBar: eui.VScrollBar;
/**
* Indicates under what conditions the scroller can be moved and the vertical scroll bar is displayed.
* <p><code>ScrollPolicy.ON</code> - the scroller can be moved, and the scroll bar is displayed when it's move.</p>
* <p><code>ScrollPolicy.OFF</code> - the scroller can not be moved, the scroll bar is never displayed.</p>
* <p><code>ScrollPolicy.AUTO</code> - the scroller can not be moved when
* the viewport's contentHeight is larger than its height. the scroll bar is displayed when it's move.
*
* @default ScrollPolicy.AUTO
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p><code>ScrollPolicy.ON</code> - </p>
* <p><code>ScrollPolicy.OFF</code> - </p>
* <p><code>ScrollPolicy.AUTO</code> - contentHeight </p>
*
* @default ScrollPolicy.AUTO
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollPolicyV: string;
/**
* Indicates under what conditions the scroller can be moved and the horizontal scroll bar is displayed.
* <p><code>ScrollPolicy.ON</code> - the scroller can be moved, and the scroll bar is displayed when it's move.</p>
* <p><code>ScrollPolicy.OFF</code> - the scroller can not be moved, the scroll bar is never displayed.</p>
* <p><code>ScrollPolicy.AUTO</code> - the can not be moved when
* the viewport's contentWidth is larger than its width. the scroll bar is displayed when it's move.
*
* @default ScrollPolicy.AUTO
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p><code>ScrollPolicy.ON</code> - </p>
* <p><code>ScrollPolicy.OFF</code> - </p>
* <p><code>ScrollPolicy.AUTO</code> - contentWidth </p>
*
* @default ScrollPolicy.AUTO
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollPolicyH: string;
/**
* Stop the scroller animation
* @version Egret 3.0.2
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 3.0.2
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
stopAnimation(): void;
/**
* The viewport component to be scrolled.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
viewport: IViewport;
/**
* @private
*
*/
private installViewport();
/**
* @private
*
*/
private uninstallViewport();
private onViewPortRemove(event);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected setSkin(skin: Skin): void;
/**
* @private
* @param event
*/
private onTouchBeginCapture(event);
/**
* @private
* @param event
*/
private onTouchEndCapture(event);
/**
* @private
* @param event
*/
private onTouchTapCapture(event);
/**
* @private
* true
*/
private checkScrollPolicy();
/**
* @private
* touchCancle时使用
*/
private downTarget;
private tempStage;
/**
* @private
*
* @param event
*/
private onTouchBegin(event);
/**
* @private
*
* @param event
*/
private onTouchMove(event);
/**
* @private
* @param event
*/
private onTouchCancel(event);
/**
* @private
* @param event
*/
private dispatchBubbleEvent(event);
/**
* @private
* @param event
*/
private dispatchCancelEvent(event);
/**
* @private
* @param event
*/
private onTouchEnd(event);
/**
* @private
*/
private onRemoveListeners();
/**
* @private
*
* @param scrollPos
*/
private horizontalUpdateHandler(scrollPos);
/**
* @private
*
* @param scrollPos
*/
private verticalUpdateHandler(scrollPos);
/**
* @private
*
*/
private horizontalEndHandler();
/**
* @private
*
*/
private verticalEndHanlder();
/**
* @private
*
*/
private onChangeEnd();
/**
* @private
*
* @param event
*/
private onAutoHideTimer(event);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
}
}
declare namespace eui {
/**
* The Skin class defines the base class for all skins.
* You typically don't need to manually create the instance of this class.
* It can be created by resolving a EXML.<p/>
*
* @example You typically write the skin classes in EXML, as the followiong example shows:<p/>
* <pre>
* <?xml version="1.0" encoding="utf-8"?>
* <s:Skin xmlns:s="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
* <states>
* <!-- Specify the states controlled by this skin. -->
* </states>
* <!-- Define skin. -->
* </s:Skin>
* </pre>
*
* @defaultProperty elementsContent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/SkinExample.ts
* @language en_US
*/
/**
* EXML文件后自动生成<p/>
*
* @example EXML代码<p/>
* <pre>
* <?xml version="1.0" encoding="utf-8"?>
* <s:Skin xmlns:s="http://ns.egret.com/eui" xmlns:w="http://ns.egret.com/wing">
* <states>
* <!-- Specify the states controlled by this skin. -->
* </states>
* <!-- Define skin. -->
* </s:Skin>
* </pre>
*
* @defaultProperty elementsContent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/SkinExample.ts
* @language zh_CN
*/
class Skin extends egret.EventDispatcher {
/**
* The list of skin parts name
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
skinParts: string[];
/**
* The maximum recommended width of the component to be considered.
* This property can only affect measure result of host component.
*
* @default 100000
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 100000
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
maxWidth: number;
/**
* The minimum recommended width of the component to be considered.
* This property can only affect measure result of host component.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,maxWidth的值时无效
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
minWidth: number;
/**
* The maximum recommended height of the component to be considered.
* This property can only affect measure result of host component.
*
* @default 100000
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 100000
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
maxHeight: number;
/**
* The minimum recommended height of the component to be considered.
* This property can only affect measure result of host component.
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,maxHeight的值时无效
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
minHeight: number;
/**
* Number that specifies the explicit width of the skin.
* This property can only affect measure result of host component.
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , NaN
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
width: number;
/**
* Number that specifies the explicit height of the skin.
* This property can only affect measure result of host component.
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* , NaN
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
height: number;
/**
* @private
*/
$elementsContent: egret.DisplayObject[];
elementsContent: egret.DisplayObject[];
/**
* @private
*/
private _hostComponent;
/**
* The host component which the skin will be attached.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
hostComponent: Component;
/**
* @private
*
* @param event
*/
private onAddedToStage(event?);
/**
* @private
*/
$stateValues: sys.StateValues;
/**
* The list of state for host component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
states: State[];
/**
* The current state of host component.
* Set to <code>""</code> or <code>null</code> to reset the component back to its base state.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* "" null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
currentState: string;
/**
* Check if contains the specifies state name.
* @param stateName the state name need to be checked
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param stateName
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
hasState: (stateName: string) => boolean;
/**
* @private
*
*/
private initializeStates;
/**
* @private
*
*/
private commitCurrentState;
}
}
declare namespace eui {
/**
* The TabBar class displays a set of identical tabs.
* One tab can be selected at a time, and the first tab is selected by default.
* <p>The set of tabs is defined by the <code>dataProvider</code> property.
* The appearance of each tab is defined by the <code>ItemRenderer</code> class.</p>
* <p>You can use the TabBar control to set the active child of a ViewStack container,
* as the following example shows:</p>
* <pre>
* <s:TabBar dataProvider="{viewStack}"/>
* <s:ViewStack id="viewStack">
* <s:Group name="tab1"/>
* <s:Group name="tab2"/>
* <s:Group name="tab3"/>
* </s:ViewStack>
* </pre>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/TabBarExample.ts
* @language en_US
*/
/**
* TabBar
* <p> <code>dataProvider</code>
* <code>ItemRenderer</code> </p>
* <p>使 TabBar ViewStack </p>
* <pre>
* <s:TabBar dataProvider="{viewStack}"/>
* <s:ViewStack id="viewStack">
* <s:Group name="tab1"/>
* <s:Group name="tab2"/>
* <s:Group name="tab3"/>
* </s:ViewStack>
* </pre>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/TabBarExample.ts
* @language zh_CN
*/
class TabBar extends ListBase {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @private
*
* @param value
*/
$setDataProvider(value: ICollection): boolean;
/**
* @private
*/
private indexBeingUpdated;
/**
* @private
*
*/
private onIndexChanged(event);
/**
* @private
* ViewStack选中项发生改变
*/
private onViewStackIndexChange(event);
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum TextInputKeys {
prompt = 0,
displayAsPassword = 1,
textColor = 2,
maxChars = 3,
maxWidth = 4,
maxHeight = 5,
text = 6,
restrict = 7,
inputType = 8,
}
}
declare namespace eui {
/**
*
*/
/**
* The TextInput is a textfield input component, the user can input and edit the text.
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/TextInputExample.ts
* @language en_US
*/
/**
* TextInput
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/TextInputExample.ts
* @language zh_CN
*/
class TextInput extends Component {
constructor();
/**
* @private
*/
$TextInput: Object;
/**
* [SkinPart] The TextInput display
* @skinPart
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* [SkinPart]
* @skinPart
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
textDisplay: EditableText;
/**
* [SkinPart] When the property of the text is empty, it will show the defalut string.
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
/**
* [SkinPart] text属性为空字符串时要显示的文本
* @skinPart
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
promptDisplay: Label;
/**
* @copy eui.EditableText#prompt
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy eui.EditableText#prompt
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
prompt: string;
/**
* @copy egret.TextField#displayAsPassword
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#displayAsPassword
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
displayAsPassword: boolean;
/**
* @copy egret.TextField#inputType
*
* @version Egret 3.1.6
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#inputType
*
* @version Egret 3.1.6
* @version eui 1.0
* @platform Web,Native
*/
inputType: string;
/**
* @copy egret.TextField#textColor
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#textColor
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
textColor: number;
/**
* @copy egret.TextField#maxChars
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#maxChars
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
maxChars: number;
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @copy egret.TextField#text
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#text
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
text: string;
/**
* @copy egret.TextField#restrict
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
/**
* @copy egret.TextField#restrict
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
restrict: string;
/**
* @private
*/
private isFocus;
/**
* @private
*
*/
private focusInHandler(event);
/**
* @private
*
*/
private focusOutHandler(event);
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
protected getCurrentState(): string;
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
protected partAdded(partName: string, instance: any): void;
/**
* @inheritDoc
*
* @version Egret 2.5.7
* @version eui 1.0
* @platform Web,Native
*/
protected partRemoved(partName: string, instance: any): void;
/**
* @private
*/
private textDisplayAdded();
/**
* @private
*/
private textDisplayRemoved();
}
}
declare namespace eui {
/**
* The CheckBox component consists of an optional label and a small box
* that can contain a check mark or not.<p/>
*
* When a user clicks a CheckBox component or its associated text,
* the CheckBox component sets its <code>selected</code> property
* to <code>true</code> for checked, and to <code>false</code> for unchecked.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/CheckboxExample.ts
* @language en_US
*/
/**
* CheckBox /<p/>
* CheckBox CheckBox selected true false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/CheckboxExample.ts
* @language zh_CN
*/
class CheckBox extends ToggleButton {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* CheckBox
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
}
}
declare namespace eui {
/**
* The ToggleSwitch control defines an on-off control.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ToggleSwitchExample.ts
* @language en_US
*/
/**
* ToggleSwitch
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ToggleSwitchExample.ts
* @language zh_CN
*/
class ToggleSwitch extends ToggleButton {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
}
}
declare namespace eui {
/**
* The UILayer class is the subclass of the Group class.It not only has the standard function of the Group class,but also
* can keep its size the same to the stage size (Stage.stageWidth,Stage.stageHeight).Its size will changes as the stage size changes.
* like any normal container class,you can create multiple instance of the UILayer class,but it is usually used as the root of the UI display list.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* UILayer Group Stage.stageWidth,Stage.stageHeight
* UILayer UI显示列表的根节点使用
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class UILayer extends Group {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
*
*/
private onAddToStage(event?);
/**
* @private
*
*/
private onRemoveFromStage(event);
/**
* @private
*
*/
private onResize(event?);
}
}
declare namespace eui {
/**
* The VScrollBar (vertical scrollbar) control lets you control
* the portion of data that is displayed when there is too much data
* to fit vertically in a display area.
*
* <p>Although you can use the VScrollBar control as a stand-alone control,
* you usually combine it as part of another group of components to
* provide scrolling functionality.</p>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/VScrollBarExample.ts
* @language en_US
*/
/**
* VScrollBar ScrollBar
* <p> VScrollBar 使使</p>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/VScrollBarExample.ts
* @language zh_CN
*/
class VScrollBar extends ScrollBarBase {
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected onPropertyChanged(event: eui.PropertyEvent): void;
}
}
declare namespace eui {
/**
* The VSlider (vertical slider) control lets users select a value
* by moving a slider thumb between the end points of the slider track.
* The current value of the slider is determined by the relative location of the thumb between
* the end points of the slider, corresponding to the slider's minimum and maximum values.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/VSliderExample.ts
* @language en_US
*/
/**
* 使 VSlider
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/VSliderExample.ts
* @language zh_CN
*/
class VSlider extends SliderBase {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected pointToValue(x: number, y: number): number;
/**
* @private
*
* @returns
*/
private getThumbRange();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
updateSkinDisplayList(): void;
}
}
declare namespace eui {
/**
* An ViewStack navigator container consists of a collection of child
* containers stacked on top of each other, where only one child
* at a time is visible.
* When a different child container is selected, it seems to replace
* the old one because it appears in the same location.
* However, the old child container still exists; it is just invisible.
*
* @event eui.CollectionEvent.COLLECTION_CHANGE Dispatched when the ICollection has been updated in some way.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ViewStackExample.ts
* @language en_US
*/
/**
* ViewStack
*
*
*
* @event eui.CollectionEvent.COLLECTION_CHANGE ICollection
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/components/ViewStackExample.ts
* @language zh_CN
*/
class ViewStack extends Group implements ICollection {
/**
* Constructor.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* The layout object for this container.
* This object is responsible for the measurement and layout of
* the visual elements in the container.
*
* @default eui.BasicLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* layout
*
* @default eui.BasicLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly layout: LayoutBase;
/**
* @private
*/
private _selectedChild;
/**
* A reference to the currently visible child container.
* The default is a reference to the first child.
* If there are no children, this property is <code>null</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>null</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedChild: egret.DisplayObject;
/**
* @private
*
*/
private proposedSelectedIndex;
/**
* @private
*/
_selectedIndex: number;
/**
* The zero-based index of the currently visible child container.
* Child indexes are in the range 0, 1, 2, ..., n - 1,
* where <code>n</code> is the number of children.
* The default value is 0, corresponding to the first child.
* If there are no children, the value of this property is <code>-1</code>.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 012...n - 1 <code>n</code>
* 0 -1
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selectedIndex: number;
/**
* @private
*
*/
private setSelectedIndex(value);
/**
* @private
* addChild()setChildIndex()swapChildren时也会回调
* $childRemoved()$childAdded()
*/
$childAdded(child: egret.DisplayObject, index: number): void;
/**
* @private
* removeChild()setChildIndex()swapChildren时也会回调
* $childRemoved()$childAdded()
*/
$childRemoved(child: egret.DisplayObject, index: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @private
*
* @param newIndex
*/
private commitSelection(newIndex);
/**
* @private
*
* @param child
* @param visible
*/
private showOrHide(child, visible);
/**
* number of children
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly length: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getItemAt(index: number): any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getItemIndex(item: any): number;
}
}
declare namespace eui.sys {
/**
* @private
*
*/
class Animation {
/**
* @private
*/
constructor(updateFunction: (animation: Animation) => void, thisObject: any);
/**
* @private
* null意味着不使用缓动 sineInOut
*/
easerFunction: (fraction: number) => number;
/**
* @private
*/
private thisObject;
/**
* @private
*
*/
isPlaying: boolean;
/**
* @private
* ,500
*/
duration: number;
/**
* @private
*
*/
currentValue: number;
/**
* @private
*
*/
from: number;
/**
* @private
*
*/
to: number;
/**
* @private
*
*/
private startTime;
/**
* @private
*
*/
endFunction: (animation: Animation) => void;
/**
* @private
*
*/
updateFunction: Function;
/**
* @private
* ,
*/
play(): void;
/**
* @private
*
*/
private start();
/**
* @private
*
*/
stop(): void;
/**
* @private
*
*/
private doInterval(currentTime);
}
}
declare namespace eui {
/**
* Default instance of interface <code>IThemeAdapter</code>.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* IThemeAdapter接口实现
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class DefaultThemeAdapter implements IThemeAdapter {
/**
*
* @param url url
* @param compFunc compFunc(e:egret.Event):void;
* @param errorFunc errorFunc():void;
* @param thisObject this引用
*/
getTheme(url: string, compFunc: Function, errorFunc: Function, thisObject: any): void;
}
}
declare namespace eui {
/**
* The Watcher class defines utility method that you can use with bindable properties.
* These methods let you define an event handler that is executed whenever a bindable property is updated.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/binding/WatcherExample.ts
* @language en_US
*/
/**
* Watcher Watcher
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/binding/WatcherExample.ts
* @language zh_CN
*/
class Watcher {
/**
* Creates and starts a Watcher instance.
* The Watcher can only watch the property of a Object which host is instance of egret.IEventDispatcher.
* @param host The object that hosts the property or property chain to be watched.
* You can use the use the <code>reset()</code> method to change the value of the <code>host</code> argument
* after creating the Watcher instance.
* The <code>host</code> maintains a list of <code>handlers</code> to invoke when <code>prop</code> changes.
* @param chain A value specifying the property or chain to be watched.
* For example, to watch the property <code>host.a.b.c</code>,
* call the method as: <code>watch(host, ["a","b","c"], ...)</code>.
* @param handler An event handler function called when the value of the watched property
* (or any property in a watched chain) is modified.
* @param thisObject <code>this</code> object of which binding with handler
* @returns he ChangeWatcher instance, if at least one property name has been specified to
* the <code>chain</code> argument; null otherwise.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Watcher Watcher host egret.IEventDispatcher egret.IEventDispatcher
*
* @param host
* Watcher实例后<code>reset()</code><code>host</code>
* <code>prop</code>使host对应的一系列<code>handlers</code>
* @param chain host.a.b.cwatch¬(host, ["a","b","c"], ...)
* @param handler
* @param thisObject handler this对象
* @returns chain Watcher null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static watch(host: any, chain: string[], handler: (value: any) => void, thisObject: any): Watcher;
/**
* @private
* false
*/
private static checkBindable(host, property);
/**
* Constructor.
* Not for public use. This method is called only from the <code>watch()</code> method.
* See the <code>watch()</code> method for parameter usage.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* watch() watch()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(property: string, handler: (value: any) => void, thisObject: any, next?: Watcher);
/**
* @private
*/
private host;
/**
* @private
*/
private property;
/**
* @private
*/
private handler;
/**
* @private
*/
private thisObject;
/**
* @private
*/
private next;
/**
* @private
*/
private isExecuting;
/**
* Detaches this Watcher instance, and its handler function, from the current host.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 宿 Watcher
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
unwatch(): void;
/**
* Retrieves the current value of the watched property or property chain, or null if the host object is null.
* @example
* <pre>
* watch(obj, ["a","b","c"], ...).getValue() === obj.a.b.c
* </pre>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 宿
* @example
* <pre>
* watch(obj, ["a","b","c"], ...).getValue() === obj.a.b.c
* </pre>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getValue(): any;
/**
* Sets the handler function.s
* @param handler The handler function. This argument must not be null.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param handler
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
setHandler(handler: (value: any) => void, thisObject: any): void;
/**
* Resets this ChangeWatcher instance to use a new host object.
* You can call this method to reuse a watcher instance on a different host.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Watcher 使宿
* Watcher实例用于不同的宿主
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
reset(newHost: egret.IEventDispatcher): void;
/**
* @private
*
* @returns
*/
private getHostPropertyValue();
/**
* @private
*/
private wrapHandler(event);
/**
* @private
*/
private onPropertyChange(property);
}
}
declare namespace eui {
/**
* The Binding class defines utility methods for performing data binding.
* You can use the methods defined in this class to configure data bindings.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/binding/BindingExample.ts
* @language en_US
*/
/**
* 使
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/binding/BindingExample.ts
* @language zh_CN
*/
class Binding {
/**
* Binds a property, <prop>prop</code> on the <code>target</code> Object, to a bindable property or peoperty chain.
* @param host The object that hosts the property or property chain to be watched.
* The <code>host</code> maintains a list of <code>targets</code> to update theirs <code>prop</code> when <code>chain</code> changes.
* @param chain A value specifying the property or chain to be watched. For example, when watch the property <code>host.a.b.c</code>,
* you need call the method like this: <code>indProperty(host, ["a","b","c"], ...)</code>
* @param target The Object defining the property to be bound to <code>chain</code>.
* @param prop The name of the public property defined in the <code>site</code> Object to be bound.
* @returns A ChangeWatcher instance, if at least one property name has been specified
* to the <code>chain</code> argument; null otherwise.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param host
* <code>host</code><code>chain</code><code>target</code><code>prop</code>
* @param chain <code>host.a.b.c</code><code>bindProperty(host, ["a","b","c"], ...)</code>
* @param target
* @param prop
* @returns chain Watcher null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static bindProperty(host: any, chain: string[], target: any, prop: string): Watcher;
/**
* Binds a callback, <prop>handler</code> on the <code>target</code> Object, to a bindable property or peoperty chain.
* Callback method to invoke with an argument of the current value of <code>chain</code> when that value changes.
* @param host The object that hosts the property or property chain to be watched.
* @param chain A value specifying the property or chain to be watched. For example, when watch the property <code>host.a.b.c</code>,
* you need call the method like this: <code>indProperty(host, ["a","b","c"], ...)</code>
* @param handler method to invoke with an argument of the current value of <code>chain</code> when that value changes.
* @param thisObject <code>this</code> object of binding method
* @returns A ChangeWatcher instance, if at least one property name has been specified to the <code>chain</code> argument; null otherwise.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* host上 chain handler
* @param host
* @param chain host.a.b.cbindSetter(host, ["a","b","c"], ...)
* @param handler
* @param thisObject handler this对象
* @returns chain Watcher null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static bindHandler(host: any, chain: string[], handler: (value: any) => void, thisObject: any): Watcher;
static $bindProperties(host: any, templates: any[], chainIndex: number[], target: any, prop: string): Watcher;
}
}
declare namespace eui {
/**
* The ArrayCollection class is a wrapper class that exposes an <code>any[]</code> as a collection that can be
* accessed and manipulated using the methods and properties of the <code>ICollection</code> interfaces.
* ArrayCollection can notify the view to update item when data source changed.
*
* @event eui.CollectionEvent.COLLECTION_CHANGE Dispatched when the ArrayCollection has been updated in some way.
*
* @defaultProperty source
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/collections/ArrayCollectionExample.ts
* @language en_US
*/
/**
* ArrayCollection 使<code>ICollection</code>访
* 使
*
* @event eui.CollectionEvent.COLLECTION_CHANGE ArrayCollection
*
* @defaultProperty source
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/collections/ArrayCollectionExample.ts
* @language zh_CN
*/
class ArrayCollection extends egret.EventDispatcher implements ICollection {
/**
* Constructor. <p/>
* Creates a new ArrayCollection using the specified source array.
* If no array is specified an empty array will be used.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <p/>
* ArrayCollection
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(source?: any[]);
/**
* @private
*/
private _source;
/**
* The source of data in the ArrayCollection.
* The ArrayCollection object does not represent any changes that you make
* directly to the source array. Always use the ICollection methods to view the collection.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* Array的方法操作数据源ICollection的接口方法来查看数据
* refresh()
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
source: any[];
/**
* Applies the sort and filter to the view.
* The ArrayCollection does not detect source data changes automatically,
* so you must call the <code>refresh()</code>
* method to update the view after changing the source data.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,
* ArrayCollection ,<code>refresh()</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
refresh(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
readonly length: number;
/**
* Adds the specified item to the end of the list.
* Equivalent to <code>addItemAt(item, length)</code>.
* @param item The item to add.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>addItemAt(item, length)</code>
* @param item
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
addItem(item: any): void;
/**
* Adds the item at the specified index.
* The index of any item greater than the index of the added item is increased by one.
* If the the specified index is less than zero or greater than the length
* of the list, a Error which code is 1007 is thrown.
* @param item The item to place at the index.
* @param index The index at which to place the item.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* 1
* 01007
* @param item
* @param index
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
addItemAt(item: any, index: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getItemAt(index: number): any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getItemIndex(item: any): number;
/**
* Notifies the view that an item has been updated.
* @param item The item within the view that was updated.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param item
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemUpdated(item: any): void;
/**
* Removes all items from the list.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
removeAll(): void;
/**
* Removes the item at the specified index and returns it.
* Any items that were after this index are now one index earlier.
* @param index The index from which to remove the item.
* @return The item that was removed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param index
* @return
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
removeItemAt(index: number): any;
/**
* Replaces the item at the specified index.
* @param item The new item to be placed at the specified index.
* @param index The index at which to place the item.
* @return The item that was replaced, or <code>null</code> if none.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param item
* @param index
* @return <code>null</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
replaceItemAt(item: any, index: number): any;
/**
* Replaces all items with a new source data, this method can not reset the scroller position of view.
* @param newSource new source data.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* source不同
* @param newSource
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
replaceAll(newSource: any[]): void;
/**
* @private
*
*/
private dispatchCoEvent(kind, location?, oldLocation?, items?, oldItems?);
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum EditableTextKeys {
promptText = 0,
textColorUser = 1,
asPassword = 2,
}
}
declare namespace eui {
/**
* Editable text for displaying,
* scrolling, selecting, and editing text.
* @includeExample extension/eui/components/EditablTextExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @includeExample extension/eui/components/EditablTextExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class EditableText extends egret.TextField implements UIComponent, IDisplayText {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
$EditableText: Object;
/**
* @private
*
*/
$invalidateTextField(): void;
/**
* @private
*
* @param value
*/
$setWidth(value: number): boolean;
/**
* @private
*
* @param value
*/
$setHeight(value: number): boolean;
/**
* @private
*
* @param value
*/
$getText(): string;
/**
* @private
*
* @param value
*/
$setText(value: string): boolean;
/**
* @private
*/
private _widthConstraint;
/**
* @private
*
* @param stage
* @param nestLevel
*/
$onAddToStage(stage: egret.Stage, nestLevel: number): void;
/**
* @private
*
*/
$onRemoveFromStage(): void;
/**
* @private
*/
private $isShowPrompt;
/**
* When the property of the text is empty, it will show the defalut string.
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* text属性为空字符串时要显示的文本内容
* text
* <p/>
*
* text 使
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
prompt: string;
/**
* @private
*/
private $promptColor;
/**
* @private
*/
private $isFocusIn;
/**
* The color of the defalut string.
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.5.5
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
promptColor: number;
/**
* @private
*/
private onfocusOut();
/**
* @private
*/
private $isTouchCancle;
/**
* @private
*/
private onTouchBegin();
/**
* @private
*/
private onTouchCancle();
/**
* @private
*/
private onfocusIn();
/**
* @private
*/
private showPromptText();
/**
* @private
*/
$setTextColor(value: number): boolean;
/**
* @private
*/
$setDisplayAsPassword(value: boolean): boolean;
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* @copy eui.Component#createChildren()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @copy eui.Component#childrenCreated()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected childrenCreated(): void;
/**
* @copy eui.Component#commitProperties()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @copy eui.Component#measure()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @copy eui.Component#updateDisplayList()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @copy eui.Component#invalidateParentLayout()
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace eui.sys {
/**
* @private
* ,
* 使 ScrollThrown ,start()update()
* 4finish()
* Thrown.scrollTo Thrown.duration
*/
class TouchScroll {
/**
* @private
* TouchScroll
* @param updateFunction
*/
constructor(updateFunction: (scrollPos: number) => void, endFunction: () => void, target: egret.IEventDispatcher);
/**
* @private
*
*/
$scrollFactor: number;
/**
* @private
*/
private target;
/**
* @private
*/
private updateFunction;
/**
* @private
*/
private endFunction;
/**
* @private
*/
private previousTime;
/**
* @private
*/
private velocity;
/**
* @private
*/
private previousVelocity;
/**
* @private
*/
private currentPosition;
/**
* @private
*/
private previousPosition;
/**
* @private
*/
private currentScrollPos;
/**
* @private
*/
private maxScrollPos;
/**
* @private
*
*/
private offsetPoint;
/**
* @private
*
*/
private animation;
$bounces: boolean;
/**
* @private
*
*/
isPlaying(): boolean;
/**
* @private
*
*/
stop(): void;
private started;
/**
* @private
* true表示已经调用过start方法
*/
isStarted(): boolean;
/**
* @private
* 使 finish()
* @param touchPoint stageX或stageY
*/
start(touchPoint: number): void;
/**
* @private
*
* @param touchPoint stageX或stageY
*/
update(touchPoint: number, maxScrollValue: number, scrollValue: any): void;
/**
* @private
*
* @param currentScrollPos
* @param maxScrollPos 0~maxValue之间时
*/
finish(currentScrollPos: number, maxScrollPos: number): void;
/**
* @private
*
* @param timeStamp
* @returns
*/
private onTick(timeStamp);
/**
* @private
*
* @param animation
*/
private finishScrolling(animation?);
/**
* @private
*
*/
private throwTo(hspTo, duration?);
/**
* @private
*
*/
private onScrollingUpdate(animation);
}
}
declare namespace eui {
/**
* Defines values for setting the <code>direction</code> property
* of the <code>ProgressBar</code> class.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/DirectionExample.ts
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/DirectionExample.ts
* @language zh_CN
*/
class Direction {
/**
* Specifies left-to-right direction.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static LTR: string;
/**
* Specifies right-to-left direction.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static RTL: string;
/**
* Specifies top-to-bottom direction.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static TTB: string;
/**
* Specifies bottom-to-top direction.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static BTT: string;
}
}
declare namespace eui {
interface IAssetAdapter {
getAsset(source: string, callBack: (content: any, source: string) => void, thisObject: any): void;
}
}
declare namespace eui {
/**
* The IDisplayText interface defines the properties
* for simple text display.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* IDisplayText .
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface IDisplayText {
/**
* The text displayed by this text component.
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
text: string;
}
}
declare namespace eui {
/**
* The IItemRenderer interface defines the basic set of APIs
* that used for List class.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface IItemRenderer extends UIComponent {
/**
* The data to render or edit.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
data: any;
/**
* Contains <code>true</code> if the item renderer
* can show itself as selected.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* true
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
selected: boolean;
/**
* The index of the item in the data provider
* of the host component of the item renderer.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemIndex: number;
}
}
declare namespace eui {
interface IThemeAdapter {
getTheme(url: string, compFunc: Function, errorFunc: Function, thisObject: any): void;
}
}
declare namespace eui {
/**
* The IViewport interface is implemented by components that support a viewport.
*
* If a component's children are larger than the component,
* and you want to clip the children to the component boundaries, you can define a viewport.
*
* A viewport is a rectangular subset of the area of a component that you want to display,
* rather than displaying the entire component.
*
* @see eui.Scroller
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
*
*
*
*
* @see eui.Scroller
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface IViewport extends UIComponent {
/**
* The width of the viewport's contents.
*
* If <code>scrollEnabled</code> is true, the viewport's
* <code>contentWidth</code> defines the limit for horizontal scrolling
* and the viewport's actual width defines how much of the content is visible.
*
* To scroll through the content horizontally, vary the
* <code>scrollH</code> between 0 and
* <code>contentWidth - width</code>.
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* <code>scrollEnabled</code> true <code>contentWidth</code>
*
*
* 0 contentWidth - width <code>scrollH</code>
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
contentWidth: number;
/**
* The height of the viewport's content.
*
* If <code>scrollEnabled</code> is true, the viewport's
* <code>contentHeight</code> defines the limit for vertical scrolling
* and the viewport's actual height defines how much of the content is visible.
*
* To scroll through the content vertically, vary the
* <code>scrollV</code> between 0 and
* <code>contentHeight - height</code>.
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* <code>scrollEnabled</code> true <code>contentHeight</code>
* 0 contentHeight - height
* <code>scrollV</code>
*
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
contentHeight: number;
/**
* The x coordinate of the origin of the viewport in the component's coordinate system,
* where the default value is (0,0) corresponding to the upper-left corner of the component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollH: number;
/**
* The y coordinate of the origin of the viewport in the component's coordinate system,
* where the default value is (0,0) corresponding to the upper-left corner of the component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollV: number;
/**
* If <code>true</code>, specifies to clip the children to the boundaries of the viewport.
* If <code>false</code>, the container children extend past the container boundaries,
* regardless of the size specification of the component.
*
* @default false
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* truescrollH和scrollV属性将能滚动视区
* falsescrollH和scrollV也无效false
*
* @default false
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
scrollEnabled: boolean;
}
}
declare namespace eui {
/**
* Values for the <code>horizontalCanScroll</code> and
* <code>verticalCanScroll</code> properties of the Scroller classes.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/ScrollPolicyExample.ts
* @language en_US
*/
/**
*
* Scroller <code>horizontalCanScroll</code> <code>verticalCanScroll</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/ScrollPolicyExample.ts
* @language zh_CN
*/
class ScrollPolicy {
/**
* Show the scrollbar if the children exceed the owner's dimension.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static AUTO: string;
/**
* Never show the scrollbar.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static OFF: string;
/**
* Always show the scrollbar.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static ON: string;
}
}
declare namespace eui {
/**
* Note: The skin name values in the skin theme are used as default values,which can not be changed while running.
* You can change the skin of a component with the skinName property.
* @event egret.Event.COMPLETE Dispatch when EXML used in this theme is loaded and parsed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/ThemeExample.ts
* @language en_US
*/
/**
* ,Component.skinName赋值来修改
* @event egret.Event.COMPLETE EXML加载解析完成时派发
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/core/ThemeExample.ts
* @language zh_CN
*/
class Theme extends egret.EventDispatcher {
private $configURL;
/**
* Create an instance of Theme
* @param configURL the external theme path. if null, you need to register the default skin name with
* mapSkin() manually.
* @param stage current stage.
* If null, you need to register with egret.registerImplementation("eui.Theme",theme)
* manually.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param configURL null
* mapSkin()
* @param stage
* null egret.registerImplementation("eui.Theme",theme)
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(configURL: string, stage?: egret.Stage);
/**
* @private
*/
private initialized;
/**
* @private
*
* @param url
*/
private load(url);
/**
* @private
*
* @param str
*/
private onConfigLoaded(str);
private onLoaded(classes?, urls?);
/**
* @private
*/
private delayList;
/**
* @private
*
*/
private handleDelayList();
/**
* @private
*/
private skinMap;
/**
* According to the host component to get the default skin name.
* Search rules are as follows:
* <li>1. Use the <code>hostComponentKey</code> of client to search.</li>
* <li>2. Use the class name of client to search.</li>
* <li>3. Use the parent class name of client to search.</li>
* <li>4. Repeat step 3 until find the skin name or the parent is <code>eui.Component</code>.</li>
* @param client the component need to get the default skin.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <li>1.使client的hostComponentKey作为键查询默认皮肤名</li>
* <li>2.使client的类名作为键查询默认皮肤名</li>
* <li>3.使client的父类名作为键查询默认皮肤名</li>
* <li>4.3eui.Component时停止</li>
* @param client
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getSkinName(client: Component): string;
/**
* @private
*/
private findSkinName(prototype);
/**
* Map a default skin for the specified host component.
* @param hostComponentKey the name of host component, such as "eui.Button".
* @param skinName the name of skin, such as "app.MyButtonSkin".
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param hostComponentKey eui.Button
* @param skinName "app.MyButtonSkin"
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
mapSkin(hostComponentKey: string, skinName: string): void;
/**
* @private
* styles
*/
private $styles;
$getStyleConfig(style: string): any;
}
}
declare namespace eui {
/**
* The eui.CollectionEvent class represents an event that is
* dispatched when the associated collection changes.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/CollectionEventExample.ts
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/CollectionEventExample.ts
* @language zh_CN
*/
class CollectionEvent extends egret.Event {
/**
* Dispatched when a collection has changed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static COLLECTION_CHANGE: string;
/**
* Constructor.
*
* @param type The event type; indicates the action that triggered the event.
* @param bubbles Specifies whether the event can bubble
* up the display list hierarchy.
* @param cancelable Specifies whether the behavior
* associated with the event can be prevented.
* @param kind Indicates the kind of event that occured.
* The parameter value can be one of the values in the CollectionEventKind
* class, or <code>null</code>, which indicates that the kind is unknown.
* @param location When the <code>kind</code> is
* <code>CollectionEventKind.ADD</code>,
* <code>CollectionEventKind.REMOVE</code>,
* <code>CollectionEventKind.REPLACE</code>,or
* <code>CollectionEventKind.UPDATE</code>
* this value indicates at what location the item(s) specified
* in the <code>items property</code> can be found
* within the target collection.
* @param oldLocation this value indicates
* the old location within the target collection
* of the item(s) specified in the <code>items</code> property.
* @param items Array of objects with information about the items
* affected by the event.
* @param oldItems When the <code>kine</code> is <code>CollectionEventKind.REPLACE</code> the value represents
* a list of items before replaced.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* CollectionEvent
*
* @param type
* @param bubbles
* @param cancelable
* @param kind CollectionEventKind null
* @param location kind <code>CollectionEventKind.ADD</code>,
* <code>CollectionEventKind.REMOVE</code>,
* <code>CollectionEventKind.REPLACE</code>,
* <code>CollectionEventKind.UPDATE</code>
* items
* @param oldLocation <code>items</code>
* @param items
* @param oldItems kind的值为CollectionEventKind.REPLACE时
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(type: string, bubbles?: boolean, cancelable?: boolean, kind?: string, location?: number, oldLocation?: number, items?: any[], oldItems?: any[]);
/**
* @private
*
* @param kind
* @param location
* @param oldLocation
* @param items
* @param oldItems
*/
$initTo(kind?: string, location?: number, oldLocation?: number, items?: any[], oldItems?: any[]): void;
/**
* Indicates the kind of event that occured.
* The parameter value can be one of the values in the CollectionEventKind
* class, or <code>null</code>, which indicates that the kind is unknown.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* CollectionEventKind null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
kind: string;
/**
* Array of objects with information about the items.
* affected by the event.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
items: any[];
/**
* When the <code>kine</code> is <code>CollectionEventKind.REPLACE</code> the value represents
* a list of items before replaced.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* kind的值为CollectionEventKind.REPLACE时
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
oldItems: any[];
/**
* When the <code>kind</code> is
* <code>CollectionEventKind.ADD</code>,
* <code>CollectionEventKind.REMOVE</code>,
* <code>CollectionEventKind.REPLACE</code>,or
* <code>CollectionEventKind.UPDATE</code>
* this value indicates at what location the item(s) specified
* in the <code>items property</code> can be found
* within the target collection.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* kind CollectionEventKind.ADD
* CollectionEventKind.REMOVE CollectionEventKind.REPLACE
* CollectionEventKind.UPDATE
* items
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
location: number;
/**
* this value indicates
* the old location within the target collection
* of the item(s) specified in the <code>items</code> property.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* items
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
oldLocation: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected clean(): void;
/**
* Dispatch an event with specified EventDispatcher. The dispatched event will be cached in the object pool,
* for the next cycle of reuse.
*
* @param target the target of event dispatcher.
* @param eventType The event type; indicates the action that triggered the event.
* @param kind Indicates the kind of event that occured.
* The parameter value can be one of the values in the CollectionEventKind
* class, or <code>null</code>, which indicates that the kind is unknown.
* @param location When the <code>kind</code> is
* <code>CollectionEventKind.ADD</code>,
* <code>CollectionEventKind.REMOVE</code>,
* <code>CollectionEventKind.REPLACE</code>,or
* <code>CollectionEventKind.UPDATE</code>
* this value indicates at what location the item(s) specified
* in the <code>items property</code> can be found
* within the target collection.
* @param oldLocation this value indicates
* the old location within the target collection
* of the item(s) specified in the <code>items</code> property.
* @param items Array of objects with information about the items
* affected by the event.
* @param oldItems When the <code>kine</code> is <code>CollectionEventKind.REPLACE</code> the value represents
* a list of items before replaced.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使EventDispatcher对象来抛出事件对象
*
* @param target
* @param eventType
* @param kind CollectionEventKind null
* @param location kind <code>CollectionEventKind.ADD</code>,
* <code>CollectionEventKind.REMOVE</code>,
* <code>CollectionEventKind.REPLACE</code>,
* <code>CollectionEventKind.UPDATE</code>
* items
* @param oldLocation <code>items</code>
* @param items
* @param oldItems kind的值为CollectionEventKind.REPLACE时
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static dispatchCollectionEvent(target: egret.IEventDispatcher, eventType: string, kind?: string, location?: number, oldLocation?: number, items?: any[], oldItems?: any[]): boolean;
}
}
declare namespace eui {
/**
* The CollectionEventKind class contains constants for the valid values
* of the <code>CollectionEvent</code> class <code>kind</code> property.
* These constants indicate the kind of change that was made to the collection.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>CollectionEvent</code> <code>kind</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class CollectionEventKind {
/**
* Indicates that the collection added an item or items.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly ADD: string;
/**
* Indicates that the collection applied a sort, a filter, or both.
* This change can potentially be easier to handle than a RESET.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* /
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly REFRESH: string;
/**
* Indicates that the collection removed an item or items.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly REMOVE: string;
/**
* Indicates that the item at the position identified by the
* CollectionEvent <code>location</code> property has been replaced.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* CollectionEvent.location
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly REPLACE: string;
/**
* Indicates that the collection has changed so drastically that
* a reset is required.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly RESET: string;
/**
* Indicates that one or more items were updated within the collection.
* The affected item(s)
* are stored in the <code>CollectionEvent.items</code> property.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* CollectionEvent.items
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static readonly UPDATE: string;
}
}
declare namespace eui {
/**
* Represents events that are dispatched when a item has been touched.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/ItemTapEventExample.ts
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/ItemTapEventExample.ts
* @language zh_CN
*/
class ItemTapEvent extends egret.Event {
/**
* The type of the event object for an <code>itemTap</code> event.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* <code>itemTap</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static ITEM_TAP: string;
/**
* The item in the data provider of the associated item.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
item: any;
/**
* The item renderer in the list of the associated item.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemRenderer: IItemRenderer;
/**
* The index of the associated navigation item.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
itemIndex: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected clean(): void;
/**
* Dispatch an event with specified EventDispatcher. The dispatched event will be cached in the object pool,
* for the next cycle of reuse.
*
* @param target the target of event dispatcher.
* @param eventType The event type; indicates the action that triggered the event.
* @param itemRenderer The item renderer in the list of the associated item.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 EventDispatcher
*
* @param target
* @param eventType
* @param itemRenderer
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static dispatchItemTapEvent(target: egret.IEventDispatcher, eventType: string, itemRenderer?: IItemRenderer): boolean;
}
}
declare namespace eui {
/**
* The PropertyChangeEvent class represents the event object
* passed to the event listener when one of the properties of
* an object has changed, and provides information about the change.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/PropertyEventExample.ts
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/PropertyEventExample.ts
* @language zh_CN
*/
class PropertyEvent extends egret.Event {
/**
* Dispatch when a property changed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static PROPERTY_CHANGE: string;
/**
* Constructor.
*
* @param type The event type; indicates the action that triggered the event.
* @param bubbles Specifies whether the event can bubble
* up the display list hierarchy.
* @param cancelable Specifies whether the behavior
* associated with the event can be prevented.
* @param property Name of the property that changed.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @param type
* @param bubbles
* @param cancelable
* @param property
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(type: string, bubbles?: boolean, cancelable?: boolean, property?: string);
/**
* Name of the property that changed.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
property: string;
/**
* Dispatch an event with specified EventDispatcher. The dispatched event will be cached in the object pool,
* for the next cycle of reuse.
*
* @param target the target of event dispatcher.
* @param eventType The event type; indicates the action that triggered the event.
* @param property Name of the property that changed.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使 EventDispatcher
*
* @param target
* @param eventType
* @param property
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static dispatchPropertyEvent(target: egret.IEventDispatcher, eventType: string, property?: string): boolean;
}
}
declare namespace eui {
/**
* @private
*/
class ScrollerThrowEvent extends egret.Event {
static THROW: string;
/**
*
*/
currentPos: number;
/**
*
* moveFlag false
*/
toPos: number;
/**
*
*/
constructor(type: string, bubbles?: boolean, cancelable?: boolean, currentPos?: number, toPos?: number);
}
}
declare namespace eui {
/**
* The UIEvent class represents the event object passed to
* the event listener for many UI events.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/UIEventExample.ts
* @language en_US
*/
/**
* UI事件
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/events/UIEventExample.ts
* @language zh_CN
*/
class UIEvent extends egret.Event {
/**
* Constructor.
*
* @param type The event type; indicates the action that triggered the event.
* @param bubbles Specifies whether the event can bubble
* up the display list hierarchy.
* @param cancelable Specifies whether the behavior
* associated with the event can be prevented.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* UIEvent
*
* @param type
* @param bubbles
* @param cancelable
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(type: string, bubbles?: boolean, cancelable?: boolean);
/**
* creation complete of component.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static CREATION_COMPLETE: string;
/**
* the ending of change.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static CHANGE_END: string;
/**
* The beginning of change.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static CHANGE_START: string;
/**
* Before close the panel.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static CLOSING: string;
/**
* The coordinates of the UI components changed in it's parent.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* UI组件在父级容器中的坐标发生改变事件
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static MOVE: string;
/**
* Dispatch an event with specified EventDispatcher. The dispatched event will be cached in the object pool,
* for the next cycle of reuse.
*
* @param target the target of event dispatcher.
* @param eventType The event type; indicates the action that triggered the event.
* @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false.
* @param cancelable Determines whether the Event object can be canceled. The default values is false.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 使EventDispatcher对象来抛出事件对象
*
* @param target
* @param eventType
* @param bubbles Event false
* @param cancelable Event false
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static dispatchUIEvent(target: egret.IEventDispatcher, eventType: string, bubbles?: boolean, cancelable?: boolean): boolean;
}
}
declare namespace eui.sys {
/**
* @private
*
*/
class CodeBase {
/**
* @private
*
* @returns
*/
toCode(): string;
/**
* @private
*/
indent: number;
/**
* @private
*
*/
getIndent(indent?: number): string;
}
/**
* @private
*/
class EXClass extends CodeBase {
/**
* @private
*
*/
constructCode: EXCodeBlock;
/**
* @private
* ,
*/
className: string;
/**
* @private
* ,
*/
superClass: string;
/**
* @private
*
*/
private innerClassBlock;
/**
* @private
*
*/
addInnerClass(clazz: EXClass): void;
/**
* @private
*
*/
private variableBlock;
/**
* @private
*
*/
addVariable(variableItem: EXVariable): void;
/**
* @private
*
*/
getVariableByName(name: string): EXVariable;
/**
* @private
*
*/
private functionBlock;
/**
* @private
*
*/
addFunction(functionItem: EXFunction): void;
/**
* @private
*
*/
getFuncByName(name: string): EXFunction;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXCodeBlock extends CodeBase {
/**
* @private
*
* @param name
* @param value
*/
addVar(name: string, value?: string): void;
/**
* @private
*
* @param target
* @param value
* @param prop (.访)
*/
addAssignment(target: string, value: string, prop?: string): void;
/**
* @private
*
*/
addReturn(data: string): void;
/**
* @private
*
*/
addEmptyLine(): void;
/**
* @private
* if语句块,startBlock();
*/
startIf(expression: string): void;
/**
* @private
* else语句块,startBlock();
*/
startElse(): void;
/**
* @private
* else if语句块,startBlock();
*/
startElseIf(expression: string): void;
/**
* @private
*
*/
startBlock(): void;
/**
* @private
* ,
*/
endBlock(): void;
/**
* @private
*
* @param functionName
* @param args
*/
doFunction(functionName: string, args: string[]): void;
/**
* @private
*/
private lines;
/**
* @private
*
*/
addCodeLine(code: string): void;
/**
* @private
*
*/
addCodeLineAt(code: string, index: number): void;
/**
* @private
*
*/
containsCodeLine(code: string): boolean;
/**
* @private
*
*/
concat(cb: EXCodeBlock): void;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXFunction extends CodeBase {
/**
* @private
*
*/
codeBlock: EXCodeBlock;
/**
* @private
*/
isGet: boolean;
/**
* @private
*
*/
name: string;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXVariable extends CodeBase {
/**
* @private
*/
constructor(name: string, defaultValue?: string);
/**
* @private
*
*/
name: string;
/**
* @private
*
*/
defaultValue: string;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXState extends CodeBase {
/**
* @private
*/
constructor(name: string, stateGroups?: any[]);
/**
* @private
*
*/
name: string;
/**
* @private
*/
stateGroups: any[];
/**
* @private
*/
addItems: any[];
/**
* @private
*/
setProperty: any[];
/**
* @private
*
*/
addOverride(item: CodeBase): void;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXAddItems extends CodeBase {
/**
* @private
*/
constructor(target: string, property: string, position: number, relativeTo: string);
/**
* @private
*
*/
target: string;
/**
* @private
*
*/
property: string;
/**
* @private
*
*/
position: number;
/**
* @private
*
*/
relativeTo: string;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXSetProperty extends CodeBase {
/**
* @private
*/
constructor(target: string, name: string, value: string);
/**
* @private
*
*/
name: string;
/**
* @private
*
*/
target: string;
/**
* @private
*
*/
value: string;
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXSetStateProperty extends CodeBase {
/**
* @private
*/
constructor(target: string, property: string, templates: string[], chainIndex: number[]);
/**
* @private
*
*/
target: string;
/**
* @private
*
*/
property: string;
/**
* @private
*
*/
templates: string[];
/**
* @private
* chainIndex是一个索引列表templates中的一个值
*/
chainIndex: number[];
/**
* @private
*
* @returns
*/
toCode(): string;
}
/**
* @private
*/
class EXBinding extends CodeBase {
/**
* @private
*/
constructor(target: string, property: string, templates: string[], chainIndex: number[]);
/**
* @private
*
*/
target: string;
/**
* @private
*
*/
property: string;
/**
* @private
*
*/
templates: string[];
/**
* @private
* chainIndex是一个索引列表templates中的一个值
*/
chainIndex: number[];
/**
* @private
*
* @returns
*/
toCode(): string;
}
}
declare namespace eui {
/**
* BitmapLabel is one line or multiline uneditable BitmapText
* @version Egret 2.5.3
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* BitmapLabel
* @version Egret 2.5.3
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class BitmapLabel extends egret.BitmapText implements UIComponent, IDisplayText {
constructor(text?: string);
/**
* @private
*/
$invalidateContentBounds(): void;
/**
* @private
*
* @param value
*/
$setWidth(value: number): boolean;
/**
* @private
*
* @param value
*/
$setHeight(value: number): boolean;
/**
* @private
*
* @param value
*/
$setText(value: string): boolean;
private $fontForBitmapLabel;
$setFont(value: any): boolean;
private $createChildrenCalled;
private $fontChanged;
/**
* source
*/
private $parseFont();
$setFontData(value: egret.BitmapFont, font?: string): boolean;
/**
* @private
*/
private _widthConstraint;
/**
* @private
*/
private _heightConstraint;
/**
* @private
* UIComponentImpl
*/
private initializeUIValues;
/**
* @copy eui.UIComponent#createChildren
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected createChildren(): void;
/**
* @copy eui.UIComponent#childrenCreated
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected childrenCreated(): void;
/**
* @copy eui.UIComponent#commitProperties
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected commitProperties(): void;
/**
* @copy eui.UIComponent#measure
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measure(): void;
/**
* @copy eui.UIComponent#updateDisplayList
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @copy eui.UIComponent#invalidateParentLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected invalidateParentLayout(): void;
/**
* @private
*/
$UIComponent: Object;
/**
* @private
*/
$includeInLayout: boolean;
/**
* @copy eui.UIComponent#includeInLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
includeInLayout: boolean;
/**
* @copy eui.UIComponent#left
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
left: any;
/**
* @copy eui.UIComponent#right
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
right: any;
/**
* @copy eui.UIComponent#top
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
top: any;
/**
* @copy eui.UIComponent#bottom
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
bottom: any;
/**
* @copy eui.UIComponent#horizontalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
horizontalCenter: any;
/**
* @copy eui.UIComponent#verticalCenter
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
verticalCenter: any;
/**
* @copy eui.UIComponent#percentWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentWidth: number;
/**
* @copy eui.UIComponent#percentHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
percentHeight: number;
/**
* @copy eui.UIComponent#explicitWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitWidth: number;
/**
* @copy eui.UIComponent#explicitHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
explicitHeight: number;
/**
* @copy eui.UIComponent#minWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minWidth: number;
/**
* @copy eui.UIComponent#maxWidth
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxWidth: number;
/**
* @copy eui.UIComponent#minHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
minHeight: number;
/**
* @copy eui.UIComponent#maxHeight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
maxHeight: number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setMeasuredSize(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateProperties(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateSize(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateSize(recursive?: boolean): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
invalidateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateDisplayList(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
validateNow(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsSize(layoutWidth: number, layoutHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
setLayoutBoundsPosition(x: number, y: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getLayoutBounds(bounds: egret.Rectangle): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
getPreferredBounds(bounds: egret.Rectangle): void;
}
}
declare namespace EXML {
/**
* Set a prefix url.
* The prefix url will add to the front of the Exml file path when its loading.
* @param text the text of a EXML file.
*
* @version Egret 2.5.3
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* EXML
* EXML
* @version Egret 2.5.3
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
let prefixURL: string;
/**
* Parsing a text of EXML file for a definition of class. You can declare the <code>class</code> property in the root
* node of the EXML to register to the global as a class name.
*
* It will be fail to register and output a warning if the specified name already exists. You can get a definition
* of a class through <code>egret.getDefinitionByName(className)</code>.
*
* @param text the text of a EXML file.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* EXML EXML class
* egret.getDefinitionByName(className) EXML
*
* @param text EXML
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
function parse(text: string): {
new (): any;
};
/**
* Load and parse an external EXML file for a class definition. You can declare the <code>class</code> property in the root
* node of the EXML to register to the global as a class name.
*
* It will be fail to register and output a warning if the specified name already exists. You can get a definition
* of a class through <code>egret.getDefinitionByName(className)</code>.
*
* @param url the path of an EXML file
* @param callBack method to invoke with an argument of the result when load and parse completed or failed. The argument will be
* <code>undefined</code> if load or parse failed.
* @param thisObject <code>this</code> object of callBack
* @param useCache use cached EXML
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* EXML EXML class
* egret.getDefinitionByName(className) EXML
*
* @param url EXML
* @param callBack undefined
* @param thisObject this
* @param useCache 使EXML
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
function load(url: string, callBack?: (clazz: any, url: string) => void, thisObject?: any, useCache?: boolean): void;
/**
* @private
*/
function $loadAll(urls: string[], callBack?: (clazz: any[], url: string[]) => void, thisObject?: any, useCache?: boolean): void;
function update(url: string, clazz: any): void;
/**
* @private
* @param url
* @param text
*/
function $parseURLContentAsJs(url: string, text: string, className: string): void;
/**
* @private
*/
function $parseURLContent(url: string, text: string | any): any;
}
declare namespace eui.sys {
/**
* @private
* EUI
*/
let NS_S: string;
/**
* @private
* Wing命名空间
*/
let NS_W: string;
/**
* @private
*/
class EXMLConfig {
/**
* @private
*/
$describe(instance: any): any;
/**
* @private
* ID和命名空间获取完整类名(".")
* @param id ID
* @param ns
*/
getClassNameById(id: string, ns: string): string;
/**
* @private
* ID获取对应的默认属性
* @param id ID
* @param ns
* @return
*/
getDefaultPropById(id: string, ns: string): string;
/**
* @private
* ,"boolean","string","number","any"
* @param property
* @param className
*/
getPropertyType(property: string, className: string): string;
}
}
declare namespace eui {
}
declare namespace eui {
}
declare namespace eui {
/**
* The BasicLayout class arranges the layout elements according to their individual settings,
* independent of each-other. BasicLayout, also called absolute layout, requires that you
* explicitly position each container child.
* You can use the <code>x</code> and <code>y</code> properties of the child,
* or constraints to position each child.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/BasicLayoutExample.ts
* @language en_US
*/
/**
* BasicLayout
* BasicLayout
* 使 <code>x</code> <code>y</code> 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/BasicLayoutExample.ts
* @language zh_CN
*/
class BasicLayout extends LayoutBase {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* BasicLayout does not support virtual layout, setting this property is invalid.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* BasicLayout不支持虚拟布局
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
useVirtualLayout: boolean;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
measure(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
}
}
declare namespace eui.sys {
/**
* @private
* 使BasicLayout规则测量目标对象
*/
function measure(target: eui.Group | eui.Component): void;
/**
* @private
* 使BasicLayout规则布局目标对象
*/
function updateDisplayList(target: eui.Group | eui.Component, unscaledWidth: number, unscaledHeight: number): egret.Point;
}
declare namespace eui {
/**
* The ColumnAlign class defines the possible values for the
* <code>columnAlign</code> property of the TileLayout class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/ColumnAlignExample.ts
* @language en_US
*/
/**
* ColumnAlign TileLayout <code>columnAlign</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/ColumnAlignExample.ts
* @language zh_CN
*/
class ColumnAlign {
/**
* Do not justify the rows.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static LEFT: string;
/**
* Justify the rows by increasing the vertical gap.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static JUSTIFY_USING_GAP: string;
/**
* Justify the rows by increasing the row height.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static JUSTIFY_USING_WIDTH: string;
}
}
declare namespace eui {
/**
* The HorizontalLayout class arranges the layout elements in a horizontal sequence,
* left to right, with optional gaps between the elements and optional padding
* around the elements.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/HorizontalLayoutExample.ts
* @language en_US
*/
/**
* HorizontalLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/HorizontalLayoutExample.ts
* @language zh_CN
*/
class HorizontalLayout extends LinearLayoutBase {
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measureReal(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measureVirtual(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayListReal(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayListVirtual(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getStartPosition(index: number): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getElementSize(index: number): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getElementTotalSize(): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
elementAdded(index: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getIndexInView(): boolean;
}
}
declare namespace eui {
/**
* The JustifyAlign class defines the possible values for the
* <code>horizontalAlign</code> <code>verticalAlign</code> property of
* Layout class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/JustifyAlignExample.ts
* @language en_US
*/
/**
* JustifyAlign horizontalAlign verticalAlign
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/JustifyAlignExample.ts
* @language zh_CN
*/
class JustifyAlign {
/**
* Justify the children with respect to the container.
* This uniformly sizes all children to be the same size as the
* container.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static JUSTIFY: string;
/**
* Content justify the children width/height respect to the container.
* This uniformly sizes all children to be the content width/height of the container.
* The content width/height of the container is the size of the largest child.
* If all children are smaller than the width/height of the container, then
* all the children will be sized to the width/height of the container.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* /
* ///
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static CONTENT_JUSTIFY: string;
}
}
declare namespace eui {
/**
* The RowAlign class defines the possible values for the
* <code>rowAlign</code> property of the TileLayout class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/RowAlignExample.ts
* @language en_US
*/
/**
* RowAlign TileLayout <code>rowAlign</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/RowAlignExample.ts
* @language zh_CN
*/
class RowAlign {
/**
* Do not justify the rows.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static TOP: string;
/**
* Justify the rows by increasing the vertical gap.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static JUSTIFY_USING_GAP: string;
/**
* Justify the rows by increasing the row height.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static JUSTIFY_USING_HEIGHT: string;
}
}
declare namespace eui {
/**
* The TileLayout class arranges layout elements in columns and rows
* of equally-sized cells.
* The TileLayout class uses a number of properties that control orientation,
* count, size, gap and justification of the columns and the rows
* as well as element alignment within the cells.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/TileLayoutExample.ts
* @language en_US
*/
/**
* TileLayout
* TileLayout 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/TileLayoutExample.ts
* @language zh_CN
*/
class TileLayout extends LayoutBase {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor();
/**
* @private
* horizontalGap被显式指定过
*/
private explicitHorizontalGap;
/**
* @private
*/
private _horizontalGap;
/**
* Horizontal space between columns, in pixels.
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
horizontalGap: number;
/**
* @private
* verticalGap被显式指定过
*/
private explicitVerticalGap;
/**
* @private
*/
private _verticalGap;
/**
* Vertical space between rows, in pixels.
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default 6
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
verticalGap: number;
/**
* @private
*/
private _columnCount;
/**
* Contain the actual column count.
*
* @default -1
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default -1
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly columnCount: number;
/**
* @private
*/
private _requestedColumnCount;
/**
* Number of columns to be displayed.
* <p>Set to 0 to allow the TileLayout to determine
* the column count automatically.</p>
* <p>If the <code>orientation</code> property is set to <code>TileOrientation.ROWS</code>,
* then setting this property has no effect
* In this case, the <code>rowCount</code> is explicitly set, and the
* container width is explicitly set. </p>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p> 0 TileLayout </p>
* <p> <code>orientation</code> <code>TileOrientation.ROWS</code>
* code>rowCount</code></p>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
requestedColumnCount: number;
/**
* @private
*/
private _rowCount;
/**
* The row count.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
readonly rowCount: number;
/**
* @private
*/
private _requestedRowCount;
/**
* Number of rows to be displayed.
* <p>Set to 0 to remove explicit override and allow the TileLayout to determine
* the row count automatically.</p>
* <p>If the <code>orientation</code> property is set to
* <code>TileOrientation.COLUMNS</code>, setting this property has no effect.
* in this case, <code>columnCount</code> is explicitly set, and the
* container height is explicitly set.</p>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <code> -1 TileLayout </code>
* <code> <code>orientation</code> <code>TileOrientation.COLUMNS</code>
* <code>columnCount</code></code>
*
* @default 0
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
requestedRowCount: number;
/**
* @private
*
*/
private explicitColumnWidth;
/**
* @private
*/
private _columnWidth;
/**
* Contain the actual column width, in pixels.
* <p>If not explicitly set, the column width is
* determined from the width of the widest element. </p>
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p></p>
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
columnWidth: number;
/**
* @private
*
*/
private explicitRowHeight;
/**
* @private
*/
private _rowHeight;
/**
* The row height, in pixels.
* <p>If not explicitly set, the row height is
* determined from the maximum of elements' height.</p>
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <p><p>
*
* @default NaN
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
rowHeight: number;
/**
* @private
*/
private _paddingLeft;
/**
* @copy eui.LinearLayoutBase#paddingLeft
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
paddingLeft: number;
/**
* @private
*/
private _paddingRight;
/**
* @copy eui.LinearLayoutBase#paddingRight
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
paddingRight: number;
/**
* @private
*/
private _paddingTop;
/**
* @copy eui.LinearLayoutBase#paddingTop
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
paddingTop: number;
/**
* @private
*/
private _paddingBottom;
/**
* @copy eui.LinearLayoutBase#paddingBottom
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
paddingBottom: number;
/**
* @private
*/
private _horizontalAlign;
/**
* Specifies how to align the elements within the cells in the horizontal direction.
* Supported values are
* HorizontalAlign.LEFTHorizontalAlign.CENTER
* HorizontalAlign.RIGHTJustifyAlign.JUSTIFY
*
* @default <code>JustifyAlign.JUSTIFY</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* HorizontalAlign.LEFTHorizontalAlign.CENTER
* HorizontalAlign.RIGHTJustifyAlign.JUSTIFY
*
* @default <code>JustifyAlign.JUSTIFY</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
horizontalAlign: string;
/**
* @private
*/
private _verticalAlign;
/**
*
* VerticalAlign.TOPVerticalAlign.MIDDLE
* VerticalAlign.BOTTOMJustifyAlign.JUSTIFY
* JustifyAlign.JUSTIFY
*
* @default <code>eui.JustifyAlign.JUSTIFY</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* Specifies how to align the elements within the cells in the vertical direction.
* Supported values are
* VerticalAlign.TOPVerticalAlign.MIDDLE
* VerticalAlign.BOTTOMJustifyAlign.JUSTIFY
*
* @default <code>eui.JustifyAlign.JUSTIFY</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
verticalAlign: string;
/**
* @private
*/
private _columnAlign;
/**
* Specifies how to justify the fully visible columns to the container width.
*
* <p>When set to <code>ColumnAlign.LEFT</code> it turns column justification off.
* There may be partially visible columns or whitespace between the last column and
* the right edge of the container. This is the default value.</p>
*
* <p>When set to <code>ColumnAlign.JUSTIFY_USING_GAP</code> the <code>horizontalGap</code>
* actual value increases so that
* the last fully visible column right edge aligns with the container's right edge.
* In case there is only a single fully visible column, the <code>horizontalGap</code> actual value
* increases so that it pushes any partially visible column beyond the right edge
* of the container.
* Note that explicitly setting the <code>horizontalGap</code> property does not turn off
* justification. It only determines the initial gap value.
* Justification may increases it.</p>
*
* <p>When set to <code>ColumnAlign.JUSTIFY_USING_WIDTH</code> the <code>columnWidth</code>
* actual value increases so that
* the last fully visible column right edge aligns with the container's right edge.
* Note that explicitly setting the <code>columnWidth</code> property does not turn off justification.
* It only determines the initial column width value.
* Justification may increases it.</p>
*
* @default ColumnAlign.LEFT
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* <p> <code>ColumnAlign.LEFT</code>
* </p>
*
* <p> <code>ColumnAlign.JUSTIFY_USING_GAP</code> <code>horizontalGap</code>
*
* <code>horizontalGap</code>
* <code>horizontalGap</code> </p>
*
* <p> <code>ColumnAlign.JUSTIFY_USING_WIDTH</code> <code>columnWidth</code>
* <code>columnWidth</code>
* </p>
*
* @default ColumnAlign.LEFT
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
columnAlign: string;
/**
* @private
*/
private _rowAlign;
/**
* Specifies how to justify the fully visible rows to the container height.
*
* <p>When set to <code>RowAlign.TOP</code> it turns column justification off.
* There might be partially visible rows or whitespace between the last row and
* the bottom edge of the container. This is the default value.</p>
*
* <p>When set to <code>RowAlign.JUSTIFY_USING_GAP</code> the <code>verticalGap</code>
* actual value increases so that
* the last fully visible row bottom edge aligns with the container's bottom edge.
* In case there is only a single fully visible row, the value of <code>verticalGap</code>
* increases so that it pushes any partially visible row beyond the bottom edge
* of the container. Note that explicitly setting the <code>verticalGap</code> does not turn off
* justification, but just determines the initial gap value.
* Justification can then increases it.</p>
*
* <p>When set to <code>RowAlign.JUSTIFY_USING_HEIGHT</code> the <code>rowHeight</code>
* actual value increases so that
* the last fully visible row bottom edge aligns with the container's bottom edge. Note that
* explicitly setting the <code>rowHeight</code> does not turn off justification, but
* determines the initial row height value.
* Justification can then increase it.</p>
*
* @default RowAlign.TOP
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* <p> <code>RowAlign.TOP</code>
* </p>
*
* <p> <code>RowAlign.JUSTIFY_USING_GAP</code> <code>verticalGap</code>
* <code>verticalGap</code>
* <code>verticalGap</code>
* </p>
*
* <p> <code>RowAlign.JUSTIFY_USING_HEIGHT</code> <code>rowHeight</code>
* <code>rowHeight</code>
* </p>
*
* @default RowAlign.TOP
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
rowAlign: string;
/**
* @private
*/
private _orientation;
/**
* Specifies whether elements are arranged row by row or
* column by column.
*
* @default TileOrientation.ROWS
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default TileOrientation.ROWS
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
orientation: string;
/**
* @private
*
*/
private invalidateTargetLayout();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
measure(): void;
/**
* @private
*
*/
private calculateRowAndColumn(explicitWidth, explicitHeight);
/**
* @private
*
*/
private maxElementWidth;
/**
* @private
*
*/
private maxElementHeight;
/**
* @private
*
*/
private updateMaxElementSize();
/**
* @private
*
*/
private doUpdateMaxElementSize(startIndex, endIndex);
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
clearVirtualLayoutCache(): void;
/**
* @private
*
*/
private startIndex;
/**
* @private
*
*/
private endIndex;
/**
* @private
*
*/
private indexInViewCalculated;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
scrollPositionChanged(): void;
/**
* @private
* ,
*/
private getIndexInView();
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
updateDisplayList(width: number, height: number): void;
/**
* @private
*
*/
private sizeAndPositionElement(element, cellX, cellY, cellWidth, cellHeight);
/**
* @private
*
*/
private adjustForJustify(width, height);
}
}
declare namespace eui {
/**
* The TileOrientation class defines the possible values for the
* <code>orientation</code> property of the TileLayout class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/TileOrientationExample.ts
* @language en_US
*/
/**
* TileOrientation TileLayout <code>orientation</code>
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/TileOrientationExample.ts
* @language zh_CN
*/
class TileOrientation {
/**
* Arranges elements row by row.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static ROWS: string;
/**
* Arranges elements column by column.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
static COLUMNS: string;
}
}
declare namespace eui {
/**
* The VerticalLayout class arranges the layout elements in a vertical sequence,
* top to bottom, with optional gaps between the elements and optional padding
* around the sequence of elements.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/VerticalLayoutExample.ts
* @language en_US
*/
/**
* VerticalLayout
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @includeExample extension/eui/layout/VerticalLayoutExample.ts
* @language zh_CN
*/
class VerticalLayout extends LinearLayoutBase {
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measureReal(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected measureVirtual(): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayListReal(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayListVirtual(width: number, height: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getStartPosition(index: number): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getElementSize(index: number): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getElementTotalSize(): number;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
elementAdded(index: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected getIndexInView(): boolean;
}
}
declare namespace eui {
/**
* An <code>ICollectionView</code> is a view onto a collection of data.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* <code>ICollection</code>
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface ICollection extends egret.IEventDispatcher {
/**
* The number of items in this view.
* 0 means no items, while -1 means that the length is unknown.
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 0
* @readOnly
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
length: number;
/**
* Gets the item at the specified index.
* @param index The index in the list from which to retrieve the item.
* @return The item at that index, or <code>null</code> if there is none.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @param index
* @return null
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getItemAt(index: number): any;
/**
* Returns the index of the item if it is in the list-1 otherwise.
* @param item The item to find.
* @return The index of the item, or -1 if the item is not in the list.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* ,-1
* @param item
* @return -1.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
getItemIndex(item: any): number;
}
}
declare namespace eui {
/**
* The HScrollBar (horizontal scrollbar) control lets you control
* the portion of data that is displayed when there is too much data
* to fit horizontally in a display area.
*
* <p>Although you can use the HScrollBar control as a stand-alone control,
* you usually combine it as part of another group of components to
* provide scrolling functionality.</p>
*
* @includeExample extension/eui/components/HScrollBarExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* HScrollBar ScrollBar
* <p> HScrollBar 使使</p>
*
* @includeExample extension/eui/components/HScrollBarExample.ts
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class HScrollBar extends ScrollBarBase {
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected updateDisplayList(unscaledWidth: number, unscaledHeight: number): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
protected onPropertyChanged(event: eui.PropertyEvent): void;
}
}
declare namespace eui.sys {
/**
* @private
*/
const enum AddPosition {
/**
* @private
*
*/
FIRST = 0,
/**
* @private
*
*/
LAST = 1,
/**
* @private
*
*/
BEFORE = 2,
/**
* @private
*
*/
AFTER = 3,
}
}
declare namespace eui {
/**
* The operation of adding a state to view.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class AddItems implements IOverride {
/**
* Constructor.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* AddItems实例
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(target: string, propertyName: string, position: number, relativeTo: string);
/**
* The name of the property that is being added.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
propertyName: string;
/**
* The position to be added. Valid values: "first","last","before","after"
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* : "first","last","before","after"
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
position: number;
/**
* an instance name of relative visual element.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
relativeTo: string;
/**
* The target instance name.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
target: string;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
apply(host: any, parent: egret.DisplayObjectContainer): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
remove(host: any, parent: egret.DisplayObjectContainer): void;
}
}
declare namespace eui {
/**
* The IOverride interface is used for view state overrides.
* All entries in the State class <code>overrides</code>
* property array must implement this interface.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* IOverride State overrides
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
interface IOverride {
/**
* Applies the override. Retains the original value, so that it can
* restore the value later in the <code>remove()</code> method.<p/>
*
* This method is called automatically when the state is entered.
* It should not be called directly.
*
* @param host A component that contains view states.
* @param parent The parent that a sub element be added.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* 便 remove() <p/>
*
*
* @param host
* @param parent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
apply(host: any, parent: egret.DisplayObjectContainer): void;
/**
* Removes the override. The value remembered in the <code>apply()</code>
* method is restored. </p>
*
* This method is called automatically when the state is entered.
* It should not be called directly.
* @param host A component that contains view states.
* @param parent The parent that a sub element be added.
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* apply()
* @param host
* @param parent
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
remove(host: any, parent: egret.DisplayObjectContainer): void;
}
}
declare namespace eui {
/**
* The SetProperty class specifies a property value that is in effect only
* during the parent view state.
* You use this class in the <code>overrides</code> property of the State class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* SetProperty State overrides 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class SetProperty implements IOverride {
/**
* Constructor.
*
* @param target The object whose property is being set.
* By default, EUI uses the immediate parent of the State object.
* @param name The property to set.
* @param value The value of the property in the view state.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* SetProperty实例
*
* @param target EUI 使 State
* @param name
* @param value
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(target: string, name: string, value: any);
/**
* he name of the property to change.
* You must set this property, either in
* the SetProperty constructor or by setting
* the property value directly.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
* SetProperty
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
name: string;
/**
* The object containing the property to be changed.
* If the property value is <code>null</code>, EUI uses the
* immediate parent of the State object.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* null EUI 使 State
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
target: string;
/**
* The new value for the property.
*
* @default undefined
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
*
*
* @default undefined
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
value: any;
/**
* @private
*
*/
private oldValue;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
apply(host: Skin, parent: egret.DisplayObjectContainer): void;
/**
* @inheritDoc
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
*/
remove(host: Skin, parent: egret.DisplayObjectContainer): void;
/**
* @private
*
*/
private setPropertyValue(obj, name, value, valueForType);
/**
* @private
* Boolean值
*/
private toBoolean(value);
}
}
declare namespace eui {
/**
* The SetProperty class specifies a property value that is in effect only
* during the parent view state.
* You use this class in the <code>overrides</code> property of the State class.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* SetProperty State overrides 使
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
class SetStateProperty implements IOverride {
/**
* Constructor.
*
* @param target The object whose property is being set.
* By default, EUI uses the immediate parent of the State object.
* @param name The property to set.
* @param value The value of the property in the view state.
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language en_US
*/
/**
* SetProperty实例
*
* @param target EUI 使 State
* @param name
* @param value
*
* @version Egret 2.4
* @version eui 1.0
* @platform Web,Native
* @language zh_CN
*/
constructor(host: any, templates: any[], chainIndex: number[], target: any, prop: string);
/**
*
* @private
*/
private host;
/**
* @private
*
*/
templates: any[];
/**
* @private
* chainIndex是一个索引列表templates中的一个值
*/
chainIndex: number[];
/**
*
* @private
*/
private target;
/**
*
* @private
*/
private prop;
/**
*
* @private
*/
private oldValue;
/**
* @inheritDoc
*
* @version Egret 3.0
* @version eui 1.0
* @platform Web,Native
*/
apply(host: Skin, parent: egret.DisplayObjectContainer): void;
/**
* @inheritDoc
*
* @version Egret 3.0
* @version eui 1.0
* @platform Web,Native
*/
remove(host: Skin, parent: egret.DisplayObjectContainer): void;
/**
* @private
*
*/
private setPropertyValue(obj, name, value, valueForType);
/**
* @private
* Boolean值
*/
private toBoolean(value);
}
}
declare namespace eui.sys {
/**
* @private
*/
class MatrixUtil {
/**
* @private
*/
static fitBounds(width: number, height: number, matrix: egret.Matrix, explicitWidth: number, explicitHeight: number, preferredWidth: number, preferredHeight: number, minWidth: number, minHeight: number, maxWidth: number, maxHeight: number): egret.Point;
}
}