code: function () {
          var self = this, id = self._id, prefix = self.classPrefix, text = self.state.get('text');
          var icon = self.settings.icon ? prefix + 'ico ' + prefix + 'i-' + self.settings.icon : '';
          var image = self.settings.image ? ' style="background-image: url(\'' + self.settings.image + '\')"' : '',
            textHtml = '';
  
          if (text) {
            self.classes.add('btn-has-text');
            textHtml = '<span class="' + prefix + 'txt">' + self.encode(text) + '</span>';
          }
  
          return (
            '<div id="' + id + '" class="' + self.classes + '" role="button" tabindex="-1" aria-haspopup="true">' +
            '<button role="presentation" hidefocus="1" type="button" tabindex="-1">' +
            (icon ? '<i class="' + icon + '"' + image + '></i>' : '') +
            '<span id="' + id + '-preview" class="' + prefix + 'preview"></span>' +
            textHtml +
            '</button>' +
            '<button type="button" class="' + prefix + 'open" hidefocus="1" tabindex="-1">' +
            ' <i class="' + prefix + 'caret"></i>' +
            '</button>' +
            '</div>'
          );
        }
docs: Renders the control as a HTML string.
  
  @method renderHtml
  @return {String} HTML representing the control.