UNPKG

nehan

Version:

Html layout engine for paged-media written in Typescript

31 lines (30 loc) 1.26 kB
import { BoxEnv, ILexer, LayoutResult, LogicalCursorPos, ICharacter, ILayoutFormatContext, ILayoutReducer, IFlowRootFormatContext, IFlowFormatContext, PageRootFormatContext, ILogicalNodePos } from './public-api'; export declare class TextFormatContext implements ILayoutFormatContext { lexer: ILexer<ICharacter>; parent: ILayoutFormatContext; name: string; progress: number; cursorPos: LogicalCursorPos; characters: ICharacter[]; text: string; constructor(lexer: ILexer<ICharacter>, parent: ILayoutFormatContext); get env(): BoxEnv; get boxPos(): ILogicalNodePos; get globalPos(): LogicalCursorPos; get flowRootPos(): LogicalCursorPos; get localPos(): LogicalCursorPos; get lineHeadPos(): LogicalCursorPos; get pageRoot(): PageRootFormatContext; get flowRoot(): IFlowRootFormatContext; get inlineRoot(): IFlowFormatContext; isLineHead(): boolean; get maxMeasure(): number; get maxExtent(): number; get rootMeasure(): number; get rootExtent(): number; get contextRestMeasure(): number; get restMeasure(): number; get restExtent(): number; addCharacter(char: ICharacter): void; acceptLayoutReducer(visitor: ILayoutReducer, overflow: boolean): LayoutResult; }