editorui.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. import Controller from '../ui/controller.js';
  7. import ControllerCollection from '../ui/controllercollection.js';
  8. import ComponentFactory from '../ui/componentfactory.js';
  9. import ObservableMixin from '../../utils/observablemixin.js';
  10. import utils from '../../utils/utils.js';
  11. /**
  12. * Base class for the editor main view controllers.
  13. *
  14. * @memberOf core.editorUI
  15. * @extends core.ui.Controller
  16. * @mixes utils.ObservaleMixin
  17. */
  18. export default class EditorUI extends Controller {
  19. /**
  20. * Creates an EditorUI instance.
  21. *
  22. * @param {core.Editor} editor
  23. */
  24. constructor( editor ) {
  25. super();
  26. /**
  27. * @readonly
  28. * @member {core.Editor} core.editorUI.EditorUI#editor
  29. */
  30. this.editor = editor;
  31. /**
  32. * @readonly
  33. * @member {core.ui.ComponentFactory} core.editorUI.EditorUI#featureComponents
  34. */
  35. this.featureComponents = new ComponentFactory( editor );
  36. this.collections.add( new ControllerCollection( 'body' ) );
  37. }
  38. }
  39. utils.mix( EditorUI, ObservableMixin );