2820cc3ea38f5b63d745cea14a376a1d560fea3534be49ece48983816d81b4911976bba72271ce7f18a1f397151dfe80bde7f53e441507b456a274bbbfb71e 854 B

12345678910111213141516171819
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. import { EditorTheme } from '../editorTheme.js';
  6. export class ViewContext {
  7. constructor(configuration, theme, model) {
  8. this.configuration = configuration;
  9. this.theme = new EditorTheme(theme);
  10. this.viewModel = model;
  11. this.viewLayout = model.viewLayout;
  12. }
  13. addEventHandler(eventHandler) {
  14. this.viewModel.addViewEventHandler(eventHandler);
  15. }
  16. removeEventHandler(eventHandler) {
  17. this.viewModel.removeViewEventHandler(eventHandler);
  18. }
  19. }