ITableSource.cs 723 B

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