ITableSource.cs 666 B

1234567891011121314151617181920
  1. namespace Terminal.Gui;
  2. /// <summary>Tabular matrix of data to be displayed in a <see cref="TableView"/>.</summary>
  3. public interface ITableSource
  4. {
  5. /// <summary>Gets the label for each column.</summary>
  6. string [] ColumnNames { get; }
  7. /// <summary>Gets the number of columns in the table.</summary>
  8. int Columns { get; }
  9. /// <summary>Returns the data at the given indexes of the table (row, column).</summary>
  10. /// <param name="row"></param>
  11. /// <param name="col"></param>
  12. /// <returns></returns>
  13. object this [int row, int col] { get; }
  14. /// <summary>Gets the number of rows in the table.</summary>
  15. int Rows { get; }
  16. }