code: function (settings) {
          var self = this;
  
          settings.autohide = true;
          settings.constrainToViewport = true;
  
          if (typeof settings.items === 'function') {
            settings.itemsFactory = settings.items;
            settings.items = [];
          }
  
          if (settings.itemDefaults) {
            var items = settings.items, i = items.length;
  
            while (i--) {
              items[i] = Tools.extend({}, settings.itemDefaults, items[i]);
            }
          }
  
          self._super(settings);
          self.classes.add('menu');
        }
docs: Constructs a instance with the specified settings.
  
  @constructor
  @param {Object} settings Name/value object with settings.