123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778/// FOURJS_START_COPYRIGHT(D,2015)
/// Property of Four Js*
/// (c) Copyright Four Js 2015, 2022. All Rights Reserved.
/// * Trademark of Four Js Development Tools Europe Ltd
/// in the United States and elsewhere
///
/// This file can be modified by licensees according to the
/// product manual.
/// FOURJS_END_COPYRIGHT
"use strict";
modulum('ToolBarPlaceholderWidget', ['WidgetPlaceholderBase', 'WidgetFactory'],
function(context, cls) {
/**
* ToolBarPlaceholderWidget widget.
* @class ToolBarPlaceholderWidget
* @memberOf classes
* @extends classes.WidgetPlaceholderBase
* @publicdoc Widgets
*/
cls.ToolBarPlaceholderWidget = context.oo.Class(cls.WidgetPlaceholderBase, function($super) {
return /** @lends classes.ToolBarPlaceholderWidget.prototype */ {
__name: 'ToolBarPlaceholderWidget',
/**
* @inheritDoc
*/
constructor: function(opts) {
$super.constructor.call(this, opts);
},
/**
* @inheritDoc
*/
_initElement: function(initialInformation) {
$super._initElement.call(this, initialInformation);
},
/**
* @inheritDoc
*/
destroy: function() {
$super.destroy.call(this);
},
/**
* Set Default TTF color
* @param {string} color - rgb formatted or css name
*/
setDefaultTTFColor: function(color) {
this._appliedStyle.set('setDefaultTTFColor', color);
this._children.forEach((info) => {
if (info.widget.setDefaultTTFColor) {
info.widget.setDefaultTTFColor(color);
}
});
},
/**
* Define autoScale or not for this item
* @param {boolean} enabled autoscale state
* @publicdoc
*/
setAutoScale: function(enabled) {
this._appliedStyle.set('setAutoScale', enabled);
this._children.forEach((info) => {
if (info.widget.setAutoScale) {
info.widget.setAutoScale(enabled);
}
});
},
};
});
cls.WidgetFactory.registerBuilder('ToolBarPlaceholder', cls.ToolBarPlaceholderWidget);
});