import type { LayoutObject } from './LayoutObject'; import { LayoutRegistry } from './LayoutRegistry'; import type { IntrinsicSizes, LayoutConstraints } from './types'; import { LayoutContextFactory } from './LayoutContext'; import { LayoutEdgesFactory } from './LayoutEdges'; import type { LayoutWorkTask } from './LayoutWorkTask'; import type { LayoutFragmentOptions } from './LayoutFragment'; export declare class LayoutEngine { protected readonly _layoutRegistry: LayoutRegistry; protected readonly _layoutContextFactory: LayoutContextFactory; protected readonly _layoutEdgesFactory: LayoutEdgesFactory; protected layoutRegistry: LayoutRegistry; protected layoutContextFactory: LayoutContextFactory; protected layoutEdgesFactory: LayoutEdgesFactory; constructor(_layoutRegistry: LayoutRegistry, _layoutContextFactory: LayoutContextFactory, _layoutEdgesFactory: LayoutEdgesFactory); /** * This function takes the root of the box-tree, a LayoutConstraints object, and compute the position of every node in the tree * @param rootNode root node of the layout object tree * @param rootPageConstraints layout constraints * @returns */ computeLayout(rootNode: LayoutObject, rootPageConstraints: LayoutConstraints): Promise; /** * calculate intrinsicSize of node tree, use depth dirst / post order traversal * @param rootNode */ determineAllIntrinsicSizes(rootNode: LayoutObject): Promise; protected getLayoutDefinitionName(node: LayoutObject): any; /** * calculate the min/max content size of node * @param node current layout object * @param childNodes children of the current node */ protected determineIntrinsicSizes(node: LayoutObject, childNodes: LayoutObject[]): Promise; protected invokeIntrinsicSizesCallback(layoutName: string, node: LayoutObject, childNodes: LayoutObject[]): Promise; protected calculateLayout(node: LayoutObject, childNodes: LayoutObject[], layoutConstraints: LayoutConstraints): Promise; protected invokeLayoutCallback(layoutName: string, node: LayoutObject, childNodes: LayoutObject[], layoutConstraints: LayoutConstraints): Promise; protected runWorkQueue(promise: Promise, workQueue: LayoutWorkTask[]): Generator; protected getNodeIntrisicSizes(node: LayoutObject): IntrinsicSizes; protected getNodeFragment(node: LayoutObject, constraints: LayoutConstraints): LayoutFragmentOptions; }