toolbar.js 816 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import mix from '../../utils/mix.js';
  6. import ToolbarBindingsMixin from './toolbarbindingsmixin.js';
  7. import BaseToolbar from '../toolbar/toolbar.js';
  8. /**
  9. * The editor toolbar controller class.
  10. *
  11. * See {@link ui.toolbar.Toolbar}.
  12. *
  13. * @memberOf ui.bindings
  14. * @extends ui.toolbar.Toolbar
  15. */
  16. export default class Toolbar extends BaseToolbar {
  17. /**
  18. * Creates a new toolbar instance.
  19. *
  20. * @param {ui.Model} model
  21. * @param {ui.View} view
  22. * @param {core.editor.Editor} editor
  23. */
  24. constructor( model, view, editor ) {
  25. super( model, view );
  26. this.editor = editor;
  27. }
  28. init() {
  29. this.bindToolbarItems();
  30. return super.init();
  31. }
  32. }
  33. mix( Toolbar, ToolbarBindingsMixin );