@syncfusion/ej2-documenteditor
Version:
Feature-rich document editor control with built-in support for context menu, options pane and dialogs.
206 lines (205 loc) • 7.19 kB
TypeScript
import { L10n } from '@syncfusion/ej2-base';
import { DocumentEditor } from '../../document-editor';
import { Ruler } from '../ruler/index';
import { WTabStop } from '../format/paragraph-format';
import { TabJustification } from '../../base/types';
/**
* Size defines and processes the size(width/height) of the objects
*
* @private
*/
export declare class Size {
/**
* Sets the height of an object
*
* @default 0
*/
height: number;
/**
* Sets the width of an object
*
* @default 0
*/
width: number;
constructor(width?: number, height?: number);
/**
* isEmpty method \
*
* @returns { boolean } isEmpty method .\
*
* @private
*/
isEmpty(): boolean;
/**
* clone method \
*
* @returns { Size } clone method .\
*
* @private
*/
clone(): Size;
}
/**
* defines the helper methods for the ruler
* @private
*/
export declare class RulerHelper {
private tabStopStwitch;
private currentTabStopElement;
private position;
private hRulerBottom;
/**
* @private
*/
vRulerBottom: HTMLElement;
private locale;
/**
* @private
*/
hideTabStopSwitch(show: boolean): void;
/**
* @private
*/
hideRulerBottom(show: boolean): void;
private showHideElement;
/**
* createHtmlElement method \
*
* @returns {SVGSVGElement} createHtmlElement method .\
* @param { string } elementType - provide the diagramId value.
* @param { Object } attribute - provide the diagramId value.
* @private
*/
createHtmlElement(elementType: string, attribute: Object): HTMLElement;
/**
* createSvgElement method \
*
* @returns {SVGSVGElement} createSvgElement method .\
* @param { string } elementType - provide the elementType value.
* @param { Object } attribute - provide the attribute value.
* @private
*/
createSvgElement(elementType: string, attribute: Object): SVGElement;
/**
* applyStyleAgainstCsp method \
*
* @returns {void} applyStyleAgainstCsp method .\
* @param { SVGElement } svg - provide the svg value.
* @param { string } attributes - provide the boolean value.
* @private
*/
applyStyleAgainstCsp(svg: SVGElement | HTMLElement, attributes: string): void;
/**
* setAttributeSvg method.
*
* @returns {void} setAttributeSvg method .\
* @param { SVGElement } svg - provide the svg value.
* @param { Object } attributes - provide the boolean value.
* @private
*/
setAttributeSvg(svg: SVGElement, attributes: Object): void;
/**
* setAttributeHtml method \
*
* @returns {void} setAttributeHtml method .\
* @param { HTMLElement } element - provide the svg value.
* @param { Object } attributes - provide the boolean value.
* @private
*/
setAttributeHtml(element: HTMLElement, attributes: Object): void;
/**
* renderOverlapElement method \
*
* @returns {void} renderOverlapElement method .\
* @param { DocumentEditor} documentEditor - provide the content value.
* @private
*/
renderOverlapElement(documentEditor: DocumentEditor): HTMLElement;
renderRulerMarkerIndicatorElement(documentEditor: DocumentEditor): void;
/**
* renderRuler method \
*
* @returns {void} renderRuler method .\
* @param { DocumentEditor} documentEditor - provide the content value.
* @param { boolean} isHorizontal - provide the content value.
* @private
*/
renderRuler(documentEditor: DocumentEditor, isHorizontal: boolean): void;
updateRulerPosition(documentEditor: DocumentEditor, isHorizontal: boolean): void;
updateIndicatorLines(documentEditor: DocumentEditor): void;
createIndicatorLines(documentEditor: DocumentEditor): void;
updateIndentMarkers(documentEditor: DocumentEditor): void;
updateTabStopMarkers(documentEditor: DocumentEditor): void;
private renderRulerMargins;
private updateRulerMargins;
private updateHorizontalRulerMargin;
resizeVRulerMargins(isRulerTopMargin: boolean, currentTopMargin: number, currentScrollTop: number, currentBottomMargin: number, ruler: HTMLElement, mousePosition: number, documentEditor: DocumentEditor): void;
private resizeRulerMargins;
getRulerOrigin(): void;
renderIndents(documentEditor: DocumentEditor, isHorizontal: boolean, rulerSize: Size, rulerGeometry: Size, locale: L10n): void;
/**
* updateRuler method
*
* @returns {void} updateRuler method.
* @param {DocumentEditor} documentEditor - provide the documentEditor value.
* @param {boolean} rerenderRuler - provide the rerenderRuler value.
* @private
*/
updateRuler(documentEditor: DocumentEditor, rerenderRuler: boolean): void;
private removeTableMarkers;
private updateTableMarkers;
private renderTableMarkers;
/**
* updateRulerDimension method \
*
* @returns {void} updateRulerDimension method .\
* @param {DocumentEditor} documentEditor - provide the documentEditor value.
* @param {Ruler} ruler - provide the content value.
* @param {number} offset - provide the content value.
* @param {boolean} rerenderRuler - provide the rerenderRuler value.
* @private
*/
private updateRulerDimension;
/**
* updateRulerSpace method \
*
* @returns {void} updateRulerDiv method .\
* @param {DocumentEditor} documentEditor - provide the documentEditor value.
* @param {Size} rulerGeometry - provide the content value.
* @param {boolean} isHorizontal - provide the content value.
* @param {Ruler} ruler - provide the ruler value.
* @private
*/
private updateRulerSpace;
/**
* updateRulerDiv method \
*
* @returns {void} updateRulerDiv method .\
* @param {DocumentEditor} documentEditor - provide the documentEditor value.
* @param {Size} rulerGeometry - provide the content value.
* @param {boolean} isHorizontal - provide the content value.
* @param {Ruler} ruler - provide the ruler value.
* @private
*/
updateRulerDiv(documentEditor: DocumentEditor, rulerGeometry: Size, isHorizontal: boolean, ruler: Ruler): void;
/**
* getRulerGeometry method \
*
* @returns {void} getRulerGeometry method .\
* @param { DocumentEditor} documentEditor - provide the documentEditor value.
* @private
*/
private getRulerGeometry;
private getVerticalHeight;
renderTab(documentEditor: DocumentEditor, rulerSize: Size, tabStop: WTabStop, tabJustification: TabJustification, i: number, locale?: L10n): void;
updateMargin(ruler: Ruler, documentEditor: DocumentEditor, isHorizontal: boolean): void;
getTabJustification(dataNameValue: string): TabJustification;
/**
* getRulerSize method \
*
* @returns {void} getRulerSize method .\
* @param { DocumentEditor} documentEditor - provide the documentEditor value.
* @private
*/
getRulerSize(documentEditor: DocumentEditor): Size;
}