2013-09-06 00:10:06 +00:00
|
|
|
/*!
|
|
|
|
* VisualEditor UserInterface TargetToolbar class.
|
|
|
|
*
|
|
|
|
* @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
|
|
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UserInterface target toolbar.
|
|
|
|
*
|
|
|
|
* @class
|
2013-11-05 00:29:50 +00:00
|
|
|
* @extends ve.ui.Toolbar
|
2013-09-06 00:10:06 +00:00
|
|
|
*
|
|
|
|
* @constructor
|
|
|
|
* @param {ve.init.Target} target Target to control
|
|
|
|
* @param {ve.ui.Surface} surface Surface to control
|
2013-09-25 10:21:09 +00:00
|
|
|
* @param {Object} [options] Configuration options
|
2013-09-06 00:10:06 +00:00
|
|
|
*/
|
|
|
|
ve.ui.TargetToolbar = function VeUiTargetToolbar( target, surface, options ) {
|
|
|
|
// Parent constructor
|
2013-11-05 00:29:50 +00:00
|
|
|
ve.ui.Toolbar.call( this, surface, options );
|
2013-09-06 00:10:06 +00:00
|
|
|
|
|
|
|
// Properties
|
|
|
|
this.target = target;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Inheritance */
|
|
|
|
|
2013-11-05 00:29:50 +00:00
|
|
|
OO.inheritClass( ve.ui.TargetToolbar, ve.ui.Toolbar );
|
2013-09-06 00:10:06 +00:00
|
|
|
|
|
|
|
/* Methods */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the target which the toolbar controls.
|
|
|
|
*
|
|
|
|
* @returns {ve.init.Target} Target being controlled
|
|
|
|
*/
|
|
|
|
ve.ui.TargetToolbar.prototype.getTarget = function () {
|
|
|
|
return this.target;
|
|
|
|
};
|