Exemple #1
0
 internal DisplayDataChangedEventArgs(ITree tree, VirtualTreeDisplayDataChanges changes, int startRow, int column, int count)
 {
     myTree     = tree;
     myChanges  = changes;
     myStartRow = startRow;
     myColumn   = column;
     myCount    = count;
 }
 /// <summary>
 ///     All items in the branch have changed
 /// </summary>
 /// <param name="branch">The branch to modify</param>
 public DisplayDataChangedData(IBranch branch)
 {
     myChanges = VirtualTreeDisplayDataChanges.VisibleElements;
     myBranch = branch;
     myStartRow = -1;
     myColumn = -1;
     myCount = 0;
 }
 /// <summary>
 ///     One or more items in the branch have changed
 /// </summary>
 /// <param name="changes">The fields that have changed</param>
 /// <param name="branch">The branch that has changed</param>
 /// <param name="startRow">The first index in the branch that changed</param>
 /// <param name="column">The column to update, or -1 for all columns</param>
 /// <param name="count">The number of items changed</param>
 public DisplayDataChangedData(VirtualTreeDisplayDataChanges changes, IBranch branch, int startRow, int column, int count)
 {
     myChanges = changes;
     myBranch = branch;
     myStartRow = startRow;
     myColumn = column;
     myCount = count;
 }
Exemple #4
0
 /// <summary>
 ///     All items in the branch have changed
 /// </summary>
 /// <param name="branch">The branch to modify</param>
 public DisplayDataChangedData(IBranch branch)
 {
     myChanges  = VirtualTreeDisplayDataChanges.VisibleElements;
     myBranch   = branch;
     myStartRow = -1;
     myColumn   = -1;
     myCount    = 0;
 }
Exemple #5
0
 /// <summary>
 ///     One or more items in the branch have changed
 /// </summary>
 /// <param name="changes">The fields that have changed</param>
 /// <param name="branch">The branch that has changed</param>
 /// <param name="startRow">The first index in the branch that changed</param>
 /// <param name="column">The column to update, or -1 for all columns</param>
 /// <param name="count">The number of items changed</param>
 public DisplayDataChangedData(VirtualTreeDisplayDataChanges changes, IBranch branch, int startRow, int column, int count)
 {
     myChanges  = changes;
     myBranch   = branch;
     myStartRow = startRow;
     myColumn   = column;
     myCount    = count;
 }
Exemple #6
0
 public BranchModificationDisplayData(BranchModificationAction action, ref DisplayDataChangedData changeData)
 {
     Action  = action;
     Changes = changeData.Changes;
     Branch  = changeData.Branch;
     Index   = changeData.StartRow;
     Column  = changeData.Column;
     Count   = changeData.Count;
     Flag    = false;
 }
 public BranchModificationDisplayData(BranchModificationAction action, ref DisplayDataChangedData changeData)
 {
     Action = action;
     Changes = changeData.Changes;
     Branch = changeData.Branch;
     Index = changeData.StartRow;
     Column = changeData.Column;
     Count = changeData.Count;
     Flag = false;
 }
 internal DisplayDataChangedEventArgs(ITree tree, VirtualTreeDisplayDataChanges changes, int startRow, int column, int count)
 {
     myTree = tree;
     myChanges = changes;
     myStartRow = startRow;
     myColumn = column;
     myCount = count;
 }
 private void OnDisplayDataChanged(VirtualTreeDisplayDataChanges changes, int row, int column, int count)
 {
     if (IsHandleCreated)
     {
         // Normalize column
         var nativeColumn = column;
         if (column < 0)
         {
             column = -1;
         }
         else if (myColumnPermutation != null)
         {
             column = myColumnPermutation.GetPermutedColumn(column);
         }
         if (changes != VirtualTreeDisplayDataChanges.AccessibleValue)
             // no need to invalidate if AccessibleValue is only flag specified.
         {
             // UNDONE: Look at changes, only update the appropriate portions
             InvalidateItem(row, column, NativeMethods.RedrawWindowFlags.Invalidate, count);
         }
         if (0 != (changes & VirtualTreeDisplayDataChanges.DependentUIElements))
         {
             int testIndex;
             if (GetStyleFlag(VTCStyleFlags.MultiSelect))
             {
                 if (TreatAsFocused)
                 {
                     var iter = CreateSelectedItemEnumerator();
                     if (iter != null)
                     {
                         while (iter.MoveNext())
                         {
                             if (column == -1
                                 || iter.ColumnInTree == column)
                             {
                                 testIndex = iter.RowInTree;
                                 if ((testIndex >= row)
                                     && (testIndex < row + count))
                                 {
                                     DoSelectionChanged();
                                     // One call is enough, get out
                                     break;
                                 }
                             }
                         }
                     }
                 }
             }
             else
             {
                 if (((column == -1) || (column == mySelectionColumn))
                     &&
                     (-1 != (testIndex = CurrentIndex))
                     &&
                     ((testIndex >= row) && (testIndex < row + count))
                     &&
                     (TreatAsFocused))
                 {
                     DoSelectionChanged();
                 }
             }
         }
         if (0 != (changes & VirtualTreeDisplayDataChanges.AccessibleValue)
             && nativeColumn >= 0)
         {
             // indicates a change in cell value, fire accessibility events.  Fire value change event for 
             // simple cells, and name change event for outline items (because value in an outline item is the depth in the tree).
             for (var curRow = row; curRow < (row + count); curRow++)
             {
                 var info = Tree.GetItemInfo(curRow, nativeColumn, true);
                 if (!info.Blank)
                 {
                     if (AccTreeRoot.IsSimpleItem(this, curRow, nativeColumn - info.Column, nativeColumn))
                     {
                         if (VirtualTreeAccEvents.ShouldNotify(VirtualTreeAccEvents.eventObjectValueChange, this))
                         {
                             VirtualTreeAccEvents.Notify(VirtualTreeAccEvents.eventObjectValueChange, curRow, column, this);
                         }
                     }
                     else
                     {
                         if (VirtualTreeAccEvents.ShouldNotify(VirtualTreeAccEvents.eventObjectNameChange, this))
                         {
                             VirtualTreeAccEvents.Notify(VirtualTreeAccEvents.eventObjectNameChange, curRow, column, this);
                         }
                     }
                 }
             }
         }
     }
 }