monaco-editor-core
Version:
A browser based code editor
20 lines (19 loc) • 854 B
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { EditorTheme } from '../editorTheme.js';
export class ViewContext {
constructor(configuration, theme, model) {
this.configuration = configuration;
this.theme = new EditorTheme(theme);
this.viewModel = model;
this.viewLayout = model.viewLayout;
}
addEventHandler(eventHandler) {
this.viewModel.addViewEventHandler(eventHandler);
}
removeEventHandler(eventHandler) {
this.viewModel.removeViewEventHandler(eventHandler);
}
}