|
|
@ -2198,22 +2198,27 @@ declare module monaco.editor {
|
|
|
|
export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWithMarkers, ITokenizedModel, ITextModelWithTrackedRanges, ITextModelWithDecorations, IEditorModel {
|
|
|
|
export interface IModel extends IReadOnlyModel, IEditableTextModel, ITextModelWithMarkers, ITokenizedModel, ITextModelWithTrackedRanges, ITextModelWithDecorations, IEditorModel {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the contents of the model have changed.
|
|
|
|
* An event emitted when the contents of the model have changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeContent(listener: (e: IModelContentChangedEvent2) => void): IDisposable;
|
|
|
|
onDidChangeContent(listener: (e: IModelContentChangedEvent2) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when decorations of the model have changed.
|
|
|
|
* An event emitted when decorations of the model have changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeDecorations(listener: (e: IModelDecorationsChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeDecorations(listener: (e: IModelDecorationsChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the model options have changed.
|
|
|
|
* An event emitted when the model options have changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeOptions(listener: (e: IModelOptionsChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeOptions(listener: (e: IModelOptionsChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the language associated with the model has changed.
|
|
|
|
* An event emitted when the language associated with the model has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeMode(listener: (e: IModelModeChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeMode(listener: (e: IModelModeChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted right before disposing the model.
|
|
|
|
* An event emitted right before disposing the model.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onWillDispose(listener: () => void): IDisposable;
|
|
|
|
onWillDispose(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -2820,30 +2825,37 @@ declare module monaco.editor {
|
|
|
|
export interface IEditor {
|
|
|
|
export interface IEditor {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the content of the current model has changed.
|
|
|
|
* An event emitted when the content of the current model has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeModelContent(listener: (e: IModelContentChangedEvent2) => void): IDisposable;
|
|
|
|
onDidChangeModelContent(listener: (e: IModelContentChangedEvent2) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the language of the current model has changed.
|
|
|
|
* An event emitted when the language of the current model has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeModelMode(listener: (e: IModelModeChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeModelMode(listener: (e: IModelModeChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the options of the current model has changed.
|
|
|
|
* An event emitted when the options of the current model has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeModelOptions(listener: (e: IModelOptionsChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeModelOptions(listener: (e: IModelOptionsChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)
|
|
|
|
* An event emitted when the configuration of the editor has changed. (e.g. `editor.updateOptions()`)
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeConfiguration(listener: (e: IConfigurationChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeConfiguration(listener: (e: IConfigurationChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the cursor position has changed.
|
|
|
|
* An event emitted when the cursor position has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeCursorPosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeCursorPosition(listener: (e: ICursorPositionChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the cursor selection has changed.
|
|
|
|
* An event emitted when the cursor selection has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeCursorSelection(listener: (e: ICursorSelectionChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeCursorSelection(listener: (e: ICursorSelectionChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the editor has been disposed.
|
|
|
|
* An event emitted when the editor has been disposed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidDispose(listener: () => void): IDisposable;
|
|
|
|
onDidDispose(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -3037,26 +3049,32 @@ declare module monaco.editor {
|
|
|
|
export interface ICommonCodeEditor extends IEditor {
|
|
|
|
export interface ICommonCodeEditor extends IEditor {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).
|
|
|
|
* An event emitted when the model of this editor has changed (e.g. `editor.setModel()`).
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeModel(listener: (e: IModelChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeModel(listener: (e: IModelChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the decorations of the current model have changed.
|
|
|
|
* An event emitted when the decorations of the current model have changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidChangeModelDecorations(listener: (e: IModelDecorationsChangedEvent) => void): IDisposable;
|
|
|
|
onDidChangeModelDecorations(listener: (e: IModelDecorationsChangedEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the text inside this editor gained focus (i.e. cursor blinking).
|
|
|
|
* An event emitted when the text inside this editor gained focus (i.e. cursor blinking).
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidFocusEditorText(listener: () => void): IDisposable;
|
|
|
|
onDidFocusEditorText(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the text inside this editor lost focus.
|
|
|
|
* An event emitted when the text inside this editor lost focus.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidBlurEditorText(listener: () => void): IDisposable;
|
|
|
|
onDidBlurEditorText(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the text inside this editor or an editor widget gained focus.
|
|
|
|
* An event emitted when the text inside this editor or an editor widget gained focus.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidFocusEditor(listener: () => void): IDisposable;
|
|
|
|
onDidFocusEditor(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the text inside this editor or an editor widget lost focus.
|
|
|
|
* An event emitted when the text inside this editor or an editor widget lost focus.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidBlurEditor(listener: () => void): IDisposable;
|
|
|
|
onDidBlurEditor(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -3164,6 +3182,7 @@ declare module monaco.editor {
|
|
|
|
export interface ICommonDiffEditor extends IEditor {
|
|
|
|
export interface ICommonDiffEditor extends IEditor {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the diff information computed by this diff editor has been updated.
|
|
|
|
* An event emitted when the diff information computed by this diff editor has been updated.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidUpdateDiff(listener: () => void): IDisposable;
|
|
|
|
onDidUpdateDiff(listener: () => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -3645,38 +3664,47 @@ declare module monaco.editor {
|
|
|
|
export interface ICodeEditor extends ICommonCodeEditor {
|
|
|
|
export interface ICodeEditor extends ICommonCodeEditor {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "mouseup".
|
|
|
|
* An event emitted on a "mouseup".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onMouseUp(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
onMouseUp(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "mousedown".
|
|
|
|
* An event emitted on a "mousedown".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onMouseDown(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
onMouseDown(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "contextmenu".
|
|
|
|
* An event emitted on a "contextmenu".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onContextMenu(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
onContextMenu(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "mousemove".
|
|
|
|
* An event emitted on a "mousemove".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onMouseMove(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
onMouseMove(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "mouseleave".
|
|
|
|
* An event emitted on a "mouseleave".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onMouseLeave(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
onMouseLeave(listener: (e: IEditorMouseEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "keyup".
|
|
|
|
* An event emitted on a "keyup".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onKeyUp(listener: (e: IKeyboardEvent) => void): IDisposable;
|
|
|
|
onKeyUp(listener: (e: IKeyboardEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted on a "keydown".
|
|
|
|
* An event emitted on a "keydown".
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onKeyDown(listener: (e: IKeyboardEvent) => void): IDisposable;
|
|
|
|
onKeyDown(listener: (e: IKeyboardEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the layout of the editor has changed.
|
|
|
|
* An event emitted when the layout of the editor has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidLayoutChange(listener: (e: EditorLayoutInfo) => void): IDisposable;
|
|
|
|
onDidLayoutChange(listener: (e: EditorLayoutInfo) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* An event emitted when the scroll in the editor has changed.
|
|
|
|
* An event emitted when the scroll in the editor has changed.
|
|
|
|
|
|
|
|
* @event
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
onDidScrollChange(listener: (e: IScrollEvent) => void): IDisposable;
|
|
|
|
onDidScrollChange(listener: (e: IScrollEvent) => void): IDisposable;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|