code: function (settings) {
          var self = this, values, selected, selectedText, lastItemCtrl;
  
          function setSelected(menuValues) {
            // Try to find a selected value
            for (var i = 0; i < menuValues.length; i++) {
              selected = menuValues[i].selected || settings.value === menuValues[i].value;
  
              if (selected) {
                selectedText = selectedText || menuValues[i].text;
                self.state.set('value', menuValues[i].value);
                return true;
              }
  
              // If the value has a submenu, try to find the selected values in that menu
              if (menuValues[i].menu) {
                if (setSelected(menuValues[i].menu)) {
                  return true;
                }
              }
            }
          }
  
          self._super(settings);
          settings = self.settings;
  
          self._values = values = settings.values;
          if (values) {
            if (typeof settings.value != "undefined") {
              setSelected(values);
            }
  
            // Default with first item
            if (!selected && values.length > 0) {
              selectedText = values[0].text;
              self.state.set('value', values[0].value);
            }
  
            self.state.set('menu', values);
          }
  
          self.state.set('text', settings.text || selectedText);
  
          self.classes.add('listbox');
  
          self.on('select', function (e) {
            var ctrl = e.control;
  
            if (lastItemCtrl) {
              e.lastControl = lastItemCtrl;
            }
  
            if (settings.multiple) {
              ctrl.active(!ctrl.active());
            } else {
              self.value(e.control.value());
            }
  
            lastItemCtrl = ctrl;
          });
        }
docs: Constructs a instance with the specified settings.
  
  @constructor
  @param {Object} settings Name/value object with settings.
  @setting {Array} values Array with values to add to list box.