+ this.pressed = v;
+ },
+ /**
+ * toggles the current active state
+ */
+ toggleActive : function(e)
+ {
+ this.setActive(!this.pressed); // this modifies pressed...
+ this.fireEvent('toggle', this, e, this.pressed);
+ },
+ /**
+ * get the current active state
+ * @return {boolean} true if it's active
+ */
+ isActive : function()
+ {
+ return this.el.hasClass('active');
+ },
+ /**
+ * set the text of the first selected button
+ */
+ setText : function(str)
+ {
+ this.el.select('.roo-button-text',true).first().dom.innerHTML = str;
+ },
+ /**
+ * get the text of the first selected button
+ */
+ getText : function()
+ {
+ return this.el.select('.roo-button-text',true).first().dom.innerHTML;
+ },
+
+ setWeight : function(str)
+ {
+ this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w) { return 'btn-' + w; } ) );
+ this.el.removeClass(Roo.bootstrap.Button.weights.map(function(w) { return 'btn-outline-' + w; } ) );
+ this.weight = str;
+ var outline = this.outline ? 'outline-' : '';
+ if (str == 'default') {
+ this.el.addClass('btn-default btn-outline-secondary');
+ return;
+ }
+ this.el.addClass('btn-' + outline + str);