rem: }; }; 
add: } } 
context: qx.Proto._onmouseevent = function(oItem, e, bOver){  if (!this.getItemEnabled(oItem)) {    return;  };  // ********************************************************************  //   Init  // ********************************************************************  // Cache current (old) values  var oldVal = this._getChangeValue();  var oldLead = this.getLeadItem();  // Temporary disabling of event fire  var oldFireChange = this.getFireChange();  this.setFireChange(false);  // Cache selection and count  var selectedItems = this.getSelectedItems();  var selectedCount = selectedItems.length;  // Update lead item  this.setLeadItem(oItem);  // Cache current anchor item  var currentAnchorItem = this.getAnchorItem();  // Cache keys pressed  var vCtrlKey = e.getCtrlKey();  var vShiftKey = e.getShiftKey();  // ********************************************************************  //   Do we need to update the anchor?  // ********************************************************************  if (!currentAnchorItem || selectedCount == 0 || (vCtrlKey && !vShiftKey && this.getMultiSelection() && !this.getDragSelection()))  {    this.setAnchorItem(oItem);    currentAnchorItem = oItem;  };  // ********************************************************************  //   Mode #1: Replace current selection with new one  // ********************************************************************  if ((!vCtrlKey && !vShiftKey && !this._activeDragSession || !this.getMultiSelection()))  {    if (!this.getItemEnabled(oItem)) {      return;    };    // Remove current selection    this._deselectAll();    // Update anchor item    this.setAnchorItem(oItem);    if (this._activeDragSession)    {      // a little bit hacky, but seems to be a fast way to detect if we slide to top or to bottom      this.scrollItemIntoView((this.getBoundedWidget().getScrollTop() > (this.getItemTop(oItem)-1) ? this.getPrevious(oItem) : this.getNext(oItem)) || oItem);    };    if (!this.getItemSelected(oItem)) {      this.renderItemSelectionState(oItem, true);    };    // Clear up and add new one    //this._selectedItems.removeAll();    this._selectedItems.add(oItem);    this._addToCurrentSelection = true;  }  // ********************************************************************  //   Mode #2: (De-)Select item range in mouse drag session  // ********************************************************************  else if (this._activeDragSession && bOver)  {    if (oldLead) {      this._deselectItemRange(currentAnchorItem, oldLead);    };    // Drag down    if (this.isBefore(currentAnchorItem, oItem))    {      if (this._addToCurrentSelection)      {        this._selectItemRange(currentAnchorItem, oItem, false);      }      else      {        this._deselectItemRange(currentAnchorItem, oItem);      };    }    // Drag up    else    {      if (this._addToCurrentSelection)      {        this._selectItemRange(oItem, currentAnchorItem, false);      }      else      {        this._deselectItemRange(oItem, currentAnchorItem);      };    };    // a little bit hacky, but seems to be a fast way to detect if we slide to top or to bottom    this.scrollItemIntoView((this.getBoundedWidget().getScrollTop() > (this.getItemTop(oItem)-1) ? this.getPrevious(oItem) : this.getNext(oItem)) || oItem);  }  // ********************************************************************  //   Mode #3: Add new item to current selection (ctrl pressed)  // ********************************************************************  else if (this.getMultiSelection() && vCtrlKey && !vShiftKey)  {    if (!this._activeDragSession) {      this._addToCurrentSelection = !(this.getCanDeselect() && this.getItemSelected(oItem));    };    this.setItemSelected(oItem, this._addToCurrentSelection);    this.setAnchorItem(oItem);  }  // ********************************************************************  //   Mode #4: Add new (or continued) range to selection  // ********************************************************************  else if (this.getMultiSelection() && vCtrlKey && vShiftKey)  {    if (!this._activeDragSession) {      this._addToCurrentSelection = !(this.getCanDeselect() && this.getItemSelected(oItem));    };    if (this._addToCurrentSelection)    {      this._selectItemRange(currentAnchorItem, oItem, false);    }    else    {      this._deselectItemRange(currentAnchorItem, oItem);    };  }  // ********************************************************************  //   Mode #5: Replace selection with new range selection  // ********************************************************************  else if (this.getMultiSelection() && !vCtrlKey && vShiftKey)  {    if (this.getCanDeselect())    {      this._selectItemRange(currentAnchorItem, oItem, true);    }    else    {      if (oldLead) {        this._deselectItemRange(currentAnchorItem, oldLead);      };      this._selectItemRange(currentAnchorItem, oItem, false);    };  };  // Recover change event status  this.setFireChange(oldFireChange);  // Dispatch change Event  if(oldFireChange && this._hasChanged(oldVal)) {    this._dispatchChange();  };};
meta: 1005	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1005/5b1a09c4ca80efdfbd41063412dd526cf7e711df/SelectionManager.js/clean/qooxdoo/source/script/qx/manager/selection/SelectionManager.js