import { Point, Rect } from '../math'; import { HitTestResult } from './hit-test'; import { PaintingContext } from './painting-context'; import { RenderContainer } from './render-container'; import { RenderObject, Visitor } from './render-object'; import { RenderPipeline } from './render-pipeline'; import { RenderView, ViewParentData } from './render-view'; export declare class ChunkParentData extends ViewParentData { /** * 子节点渲染时关联的虚拟父节点 */ chunk?: Chunk; /** * 指向位于 Chunk 内的 nextSibling */ nextSiblingInChunk?: ChildType; /** * 指向位于 Chunk 内的 prevSibling */ prevSiblingInChunk?: ChildType; detach(): void; } export declare class RenderChunk> = RenderObject> extends RenderView { /** * 默认分块渲染容量 */ static readonly DEFAULT_CAPACITY = 6; /** * 设置或获取节点间分块渲染容量,修改 [capacity] 只会影响之后的分块策略,而不会影响之前的 */ get capacity(): number; set capacity(value: number); private _capacity; /** * 设置或获取 Chunk 的离屏检查函数 * * 返回 true 表示节点已离屏 */ get isOffstage(): typeof ChunkContainer.defaultIsOffstage; set isOffstage(value: typeof ChunkContainer.defaultIsOffstage); /** * 默认的离屏检查函数 */ static get defaultIsOffstage(): typeof ChunkContainer.defaultIsOffstage; /** * [RenderChunk] 恒为重绘边界 */ get repaintBoundary(): boolean; /** * 通过 [ChunkContainer] 代持 [Chunk]s,并且他不是 [RenderChunk] 的逻辑子节点 */ private chunks; protected setupParentData(child: RenderObject): void; protected internalInsertAfter(child: ChildType, after?: ChildType): void; protected internalRemoveChild(child: ChildType): void; private insertIntoChunk; /** * 合并 child 到某个 [Chunk],如果不能合并则会尝试拆分 chunk */ private mergeIntoChunk; private createChunkAfter; private removeFromChunk; attach(owner: RenderPipeline): void; detach(): void; protected _paint(context: PaintingContext, offset: Point): void; markLayoutDirty(cause?: ChildType): void; markPaintDirty(cause?: ChildType): void; performLayout(): void; hitTestChildren(result: HitTestResult, position: Point): boolean; } declare class ChunkContainer>> extends RenderView> { performLayout(): void; isOffstage: typeof ChunkContainer.defaultIsOffstage; static defaultIsOffstage(viewport: Rect, childBounds: Rect): boolean; paintChildren(context: PaintingContext, offset: Point, viewportOffset: Point, viewport: Rect): void; } declare class Chunk>> extends RenderObject>> implements RenderContainer { paint(context: PaintingContext, offset: Point): void; hitTestChildren(_result: HitTestResult, _position: Point): boolean; performLayout(): void; get repaintBoundary(): boolean; get childCount(): number; protected _childCount: number; get firstChild(): ChildType | undefined; protected _firstChild?: ChildType; get lastChild(): ChildType | undefined; protected _lastChild?: ChildType; childBefore(child: ChildType): ChildType | undefined; childAfter(child: ChildType): ChildType | undefined; redepthChildren(): void; visitChildren(visitor: Visitor): void; private debugUltimatePrevSiblingOf; private debugUltimateNextSiblingOf; private internalInsertAfter; insertAfter(child: ChildType, after?: ChildType): void; insertBefore(child: ChildType, before?: ChildType): void; appendChild(child: ChildType): void; private internalRemoveChild; removeChild(child: ChildType): void; removeAllChildren(): void; get debugChildren(): ChildType[]; } export {};