import { TClassProperties, TOriginX, TOriginY } from '../../typedefs'; import { Textbox } from '../Textbox'; import { WidgetType } from './type/widget.type'; import { WidgetTextboxInterface } from './type/widget.entity.textbox'; import { Point } from '../../Point'; import { XConnector } from './XConnector'; import { FabricObject } from '../Object/Object'; export declare const textboxDefaultValues: Partial>; declare class Connector { connectorId: string; connectorType: string; point: Point; } export declare const XTextbaseProps: Partial>; /** * Textbox class, based on IText, allows the user to resize the text rectangle * and wraps lines automatically. Textboxes have their Y scaling locked, the * user can only change width. Height is adjusted automatically based on the * wrapping of lines. */ export declare class XTextbase extends Textbox implements WidgetTextboxInterface { static type: WidgetType; static objType: WidgetType; /** * Minimum width of textbox, in pixels. * @type Number * @default */ minWidth: number; tempTop: number; hasNoText: boolean; /** * Minimum calculated width of a textbox, in pixels. * fixed to 2 so that an empty textbox cannot go to 0 * and is still selectable without text. * @type Number * @default */ dynamicMinWidth: number; oneLine: boolean; fromCopy: boolean; originX: TOriginX; originY: TOriginY; connectors: Connector[]; /** * Use this boolean property in order to split strings that have no white space concept. * this is a cheap way to help with chinese/japanese * @type Boolean * @since 2.6.0 */ splitByGrapheme: boolean; static textLayoutProperties: string[]; static ownDefaults: Record; static getDefaults(): { controls: { mr: import("../../..").Control; ml: import("../../..").Control; }; }; constructor(text: string, options: any); updatedBy: string; updatedByName: string; createdByName: string; maxHeight: number; fixedScaleChange: boolean; boardId: string; objType: WidgetType; userId: string; zIndex: number; version: string; updatedAt: number; createdAt: number; createdBy: string; updateConnector(point: any, connector: XConnector, type: string): void; moveOrScaleHandler(e: any): void; calculateControlPoint(connectingPoint: Point): Point; /** * Generate an object that translates the style object so that it is * broken up by visual lines (new lines and automatic wrapping). * The original text styles object is broken up by actual lines (new lines only), * which is only sufficient for Text / IText * @private */ _generateStyleMap(textInfo: any): any; /** * Returns true if object has a style property or has it on a specified line * @param {Number} lineIndex * @return {Boolean} */ styleHas(property: any, lineIndex: number): boolean; /** * Returns true if object has no styling or no styling in a line * @param {Number} lineIndex , lineIndex is on wrapped lines. * @return {Boolean} */ isEmptyStyles(lineIndex: number): boolean; /** * Helper function to measure a string of text, given its lineIndex and charIndex offset * It gets called when charBounds are not available yet. * Override if necessary * Use with {@link Textbox#wordSplit} * * @param {CanvasRenderingContext2D} ctx * @param {String} text * @param {number} lineIndex * @param {number} charOffset * @returns {number} */ _measureWord(word: any, lineIndex: number, charOffset?: number): number; /** * Override this method to customize word splitting * Use with {@link Textbox#_measureWord} * @param {string} value * @returns {string[]} array of words */ wordSplit(value: string): string[]; /** * Detect if the text line is ended with an hard break * text and itext do not have wrapping, return false * @param {Number} lineIndex text to split * @return {Boolean} */ isEndOfWrapping(lineIndex: number): boolean; /** * Detect if a line has a linebreak and so we need to account for it when moving * and counting style. * @return Number */ missingNewlineOffset(lineIndex: number): 1 | 0; /** * Gets lines of text to render in the Textbox. This function calculates * text wrapping on the fly every time it is called. * @param {String} text text to split * @returns {Array} Array of lines in the Textbox. * @override */ _splitTextIntoLines(text: string): import("../Text/Text").TextLinesInfo; getMinWidth(): number; controlMousedownProcess(transformData: any, rx: any, ry: any): void; getObject(): Record; /**extend function for fronted */ checkTextboxChange(): void; initializeEvent(): void; drawObject(ctx: CanvasRenderingContext2D): void; renderDockingControls(ctx: CanvasRenderingContext2D): void; _renderControl(ctx: any, left: number, top: number, styleOverride: any, fabricObject: FabricObject): void; resetResizeControls(): void; } export {}; //# sourceMappingURL=XTextbase.d.ts.map