ITableSource.cs 690 B

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