import { HTMLWidget } from "@hpcc-js/common";
import "../src/Editor.css";
export interface IPosition {
line: number;
ch: number;
}
export interface ICompletion {
list: string[];
from: number;
to: number;
}
export declare class Editor extends HTMLWidget {
private _codemirror;
private _markedText;
protected _initialText: string;
options(): any;
private _options;
option(option: string): string | number;
option(option: string, value: string | number): this;
guttersOption(): (string | {
className: string;
style: string;
})[];
addGutterMarker(lineNumber: number, commentText: string, backgroundColor?: string, fontFamily?: string, fontSize?: string, onmouseenter?: () => void, onmouseleave?: () => void, onclick?: (event: MouseEvent) => void): void;
removeGutterMarker(lineNumber: number): void;
hasFocus(): boolean;
text(): string;
text(_: string): this;
highlight(start: IPosition | number, end: IPosition | number, className?: string): this;
highlightInfo(start: IPosition | number, end: IPosition | number): this;
highlightWarning(start: IPosition | number, end: IPosition | number): this;
highlightError(start: IPosition | number, end: IPosition | number): this;
addLineClass(options: {
lineNum: number;
where?: "text" | "background" | "gutter";
cssClass: string;
}): this;
removeLineClass(options: {
lineNum: number;
where?: "text" | "background" | "gutter";
cssClass: string;
}): this;
removeAllHighlight(): this;
positionAt(i: number): IPosition;
getLineLength(lineNumber: number): number;
highlightSubstring(str: string): void;
setCursor(row: number, col: number, focus?: boolean): void;
enter(domNode: any, element: any): void;
update(domNode: any, Element: any): void;
changes(changes: object[]): void;
fetchHints(cm: any, option: any): Promise;
/**
* @deprecated Replaced with `option`
*/
setOption(option: string, value: any): void;
}
export interface Editor {
readOnly(): boolean;
readOnly(_: boolean): this;
gutterMarkerWidth(): number;
gutterMarkerWidth(_: number): this;
markerTextAlign(): string;
markerTextAlign(_: string): this;
showHints(): boolean;
showHints(_: boolean): this;
}
//# sourceMappingURL=Editor.d.ts.map