import { X_Textbox as Textbox } from './X_Textbox'; import type { TBBox, TClassProperties, TOriginX, TOriginY } from '../../typedefs'; import { Point } from '../../Point'; import { X_Connector } from './X_Connector'; export declare const rectNotesDefaultValues: 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 RectNotes extends Textbox { /**selectable * Minimum width of textbox, in pixels. * @type Number * @default */ minWidth: number; locked: boolean; verticalAlign: string; originX: TOriginX; originY: TOriginY; width: number; cornerStrokeColor: string; cornerColor: string; transparentCorners: boolean; zIndex: number; height: number; maxHeight: number; connectors: object[]; id: string; extendPropeties: string[]; /** * 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; /** * 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: { mtaStart: import("../../..").Control; mbaStart: import("../../..").Control; mlaStart: import("../../..").Control; mraStart: import("../../..").Control; tl: import("../../..").Control; tr: import("../../..").Control; bl: import("../../..").Control; br: import("../../..").Control; }; }; constructor(text: string, options?: Partial>); findById(id: string): any; calculateControlPoint(boundingBox: TBBox, connectingPoint: Point): Point; updateConnector(point: any, connector: X_Connector, type: string): void; moveOrScaleHandler(e: any): void; initializeEvent(): void; /** * Unlike superclass's version of this function, Textbox does not update * its width. * @private * @override */ initDimensions(): number | undefined; /** * 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; /** * probably broken need a fix * Returns the real style line that correspond to the wrapped lineIndex line * Used just to verify if the line does exist or not. * @param {Number} lineIndex * @returns {Boolean} if the line exists or not * @private */ _getLineStyle(lineIndex: number): boolean; /** * Set the line style to an empty object so that is initialized * @param {Number} lineIndex * @param {Object} style * @private */ _setLineStyle(lineIndex: number): void; /** * Override this method to customize word splitting * Use with {@link Textbox#_measureWord} * @param {string} value * @returns {string[]} array of words */ wordSplit(value: string): string[]; /** * Wraps a line of text using the width of the Textbox and a context. * @param {Array} line The grapheme array that represent the line * @param {Number} lineIndex * @param {Number} desiredWidth width you want to wrap the line to * @param {Number} reservedSpace space to remove from wrapping for custom functionalities * @returns {Array} Array of line(s) into which the given text is wrapped * to. */ graphemeSplitForRectNotes(textstring: 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): 0 | 1; /** * 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; /**boardx custom function */ getCenteredTop(rectHeight: number): number; _render(ctx: CanvasRenderingContext2D): void; _renderBackground(ctx: CanvasRenderingContext2D): void; _getTopOffset(): number; _getTotalLineHeights(): number; _getTotalLineHeight(): number; _renderText(ctx: CanvasRenderingContext2D): void; drawRoundRectPath(cxt: CanvasRenderingContext2D, width: number, height: number, radius: number): void; } //# sourceMappingURL=X_RectNotes.d.ts.map