Rebracer update.
2 using System.Collections.Generic;
6 namespace Aga.Controls.Tree
8 internal class FixedRowHeightLayout : IRowLayout
10 private TreeViewAdv _treeView;
12 public FixedRowHeightLayout(TreeViewAdv treeView, int rowHeight)
15 PreferredRowHeight = rowHeight;
18 private int _rowHeight;
19 public int PreferredRowHeight
21 get { return _rowHeight; }
22 set { _rowHeight = value; }
25 public Rectangle GetRowBounds(int rowNo)
27 return new Rectangle(0, rowNo * _rowHeight, 0, _rowHeight);
30 public int PageRowCount
34 return Math.Max((_treeView.DisplayRectangle.Height - _treeView.ColumnHeaderHeight) / _rowHeight, 0);
38 public int CurrentPageSize
46 public int GetRowAt(Point point)
48 point = new Point(point.X, point.Y + (_treeView.FirstVisibleRow * _rowHeight) - _treeView.ColumnHeaderHeight);
49 return point.Y / _rowHeight;
52 public int GetFirstRow(int lastPageRow)
54 return Math.Max(0, lastPageRow - PageRowCount + 1);
57 public void ClearCache()