devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
80 lines (79 loc) • 4.1 kB
TypeScript
import { EventDispatcher } from '../utils/event-dispatcher';
import { DocumentLayout } from '../layout/document-layout';
import { DocumentModel } from '../model/document-model';
import { SubDocument, SubDocumentInterval, SubDocumentIntervals } from '../model/sub-document';
import { SelectedTableInfo } from './selected-cells-engine';
import { SelectedSpecialRunInfo } from './selected-special-run-info';
import { ISelectionBase } from './selection-base';
import { SelectionIntervalsInfo } from './selection-intervals-info';
import { BatchUpdatableObject } from '@devexpress/utils/lib/class/batch-updatable';
import { FixedInterval } from '@devexpress/utils/lib/intervals/fixed';
import { ModelScrollManager } from '../scroll/model-scroll-manager';
import { IMisspelledSelectionChangesListener, ISearchSelectionChangesListener, ISelectionChangesListener } from './i-selection-changes-listener';
import { InputPosition } from './input-position';
import { SelectionFloatingState, SelectionState } from './selection-state';
import { SetSelectionParams } from './set-selection-params';
export declare class SetSelectionStateOptions {
correctIntervalDueToFields: boolean;
correctIntervalDueToTables: boolean;
useFieldUiChecks: boolean;
isForceUpdate: boolean;
noFieldCorrect(): this;
noTablesCorrect(): this;
noFieldUiChecks(): this;
forceUpdate(): this;
}
export declare class Selection extends BatchUpdatableObject implements ISelectionBase {
private _prevState;
private _state;
get currState(): SelectionState;
get keepX(): number;
set keepX(val: number);
get forwardDirection(): boolean;
set forwardDirection(val: boolean);
get endOfLine(): boolean;
set endOfLine(val: boolean);
get pageIndex(): number;
set pageIndex(val: number);
get intervals(): FixedInterval[];
get activeSubDocument(): SubDocument;
get lastSelectedInterval(): FixedInterval;
get intervalsInfo(): SelectionIntervalsInfo;
get prevState(): SelectionState;
get multiselection(): boolean;
get anchorPosition(): number;
get reversedAnchorPostion(): number;
isCollapsed(): boolean;
get subDocumentIntervals(): SubDocumentIntervals;
get subDocumentInterval(): SubDocumentInterval;
model: DocumentModel;
layout: DocumentLayout;
scrollManager: ModelScrollManager;
get specialRunInfo(): SelectedSpecialRunInfo;
searchIntervals: FixedInterval[];
misspelledIntervals: FixedInterval[];
onChanged: EventDispatcher<ISelectionChangesListener>;
onSearchChanged: EventDispatcher<ISearchSelectionChangesListener>;
onMisspelledSelectionChanged: EventDispatcher<IMisspelledSelectionChangesListener>;
inputPosition: InputPosition;
get tableInfo(): SelectedTableInfo;
constructor(model: DocumentModel, layout: DocumentLayout, activeSubDocument: SubDocument);
dispose(): void;
setSelection(params: SetSelectionParams): void;
getState(): SelectionState;
changeState(changeState: (newState: SelectionState) => void, options?: SetSelectionStateOptions): boolean;
setState(newState: SelectionState, options?: SetSelectionStateOptions): boolean;
correctAfterTextBufferChanged(): void;
getFloatingState(): SelectionFloatingState;
restoreFloatingState(state: SelectionFloatingState): void;
setSearchSelectionIntervals(intervals: FixedInterval[]): void;
resetSearchSelection(): void;
onUpdateUnlocked(occurredEvents: number): void;
setMisspelledSelectionIntervals(intervals: FixedInterval[]): void;
raiseSelectionChanged(): void;
raiseSearchSelectionChanged(): void;
raiseMisspelledSelectionChanged(): void;
deprecatedSetSelection(firstPosition: number, secondPosition: number, endOfLine: boolean, keepX: number, _upd: boolean, correctIntervalDueToFields?: boolean, correctIntervalDueToTables?: boolean, visibleModelPosition?: number, useFieldUiChecks?: boolean): void;
shouldResetInputPosition(): boolean;
resetInputPositionIfNeeded(): void;
}