import { TClassProperties } from '../../typedefs'; import { XTextbase } from './XTextbase'; import { WidgetCircleNotesInterface } from './type/widget.entity.circlenote'; import { WidgetType } from './type/widget.type'; export declare const circleNotesDefaultValues: Partial>; export interface CircleNotesProps { id: string; originX: string; originY: string; top: number; left: number; textAlign: string; width: number; height: number; backgroundColor: string; } /** * 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 XCircleNotes extends XTextbase implements WidgetCircleNotesInterface { /**selectable * Minimum width of textbox, in pixels. * @type Number * @default */ minWidth: number; maxHeight: number; noteType: string; radius: number; static type: WidgetType; static objType: WidgetType; id: string; locked: boolean; boardId: string; userId: string; timestamp: Date; verticalAlign: string; zIndex: number; lines: object[]; relationship: object[]; emoj: object[]; userEmoji: object[]; /** * 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: { /** * @param {Number} lineIndex * @param {Number} charIndex * @param {Object} style * @private */ mr: import("../../..").Control; ml: import("../../..").Control; }; }; constructor(text: string, options: any); getObject(): Record; /** * 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; /** * @param {Number} lineIndex * @param {Number} charIndex * @param {Object} style * @private */ _setStyleDeclaration(lineIndex: number, charIndex: number, style: object): void; /** * @param {Number} lineIndex * @param {Number} charIndex * @private */ _deleteStyleDeclaration(lineIndex: number, charIndex: number): void; /** * 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; /** * 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[]; /** * 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; /** * 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; getCenteredTop(rectHeight: any): number; _getTopOffset(): number; _getTotalLineHeight(): number; _getTotalLineHeights(): number; _render(ctx: any): void; _renderBackground(ctx: any): void; _renderText(ctx: any): void; _renderTextCommon(ctx: any, method: any): void; _getSVGLeftTopOffsets(): { textLeft: number; textTop: number; lineTop: number; }; drawRoundRectPath(cxt: any, width: any, height: any, radius: any): void; } //# sourceMappingURL=XCircleNotes.d.ts.map