CellColorGetterArgs.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #nullable disable
  2. 
  3. namespace Terminal.Gui.Views;
  4. /// <summary>
  5. /// Arguments for a <see cref="CellColorGetterDelegate"/>. Describes a cell for which a rendering
  6. /// <see cref="Scheme"/> is being sought
  7. /// </summary>
  8. public class CellColorGetterArgs
  9. {
  10. internal CellColorGetterArgs (
  11. ITableSource table,
  12. int rowIdx,
  13. int colIdx,
  14. object cellValue,
  15. string representation,
  16. Scheme rowScheme
  17. )
  18. {
  19. Table = table;
  20. RowIndex = rowIdx;
  21. ColIdex = colIdx;
  22. CellValue = cellValue;
  23. Representation = representation;
  24. RowScheme = rowScheme;
  25. }
  26. /// <summary>The hard typed value being rendered in the cell for which color is needed</summary>
  27. public object CellValue { get; }
  28. /// <summary>The index of column in <see cref="Table"/> for which color is needed</summary>
  29. public int ColIdex { get; }
  30. /// <summary>The textual representation of <see cref="CellValue"/> (what will actually be drawn to the screen)</summary>
  31. public string Representation { get; }
  32. /// <summary>The index of the row in <see cref="Table"/> for which color is needed</summary>
  33. public int RowIndex { get; }
  34. /// <summary>the scheme that is going to be used to render the cell if no cell specific scheme is returned</summary>
  35. public Scheme RowScheme { get; }
  36. /// <summary>The data table hosted by the <see cref="TableView"/> control.</summary>
  37. public ITableSource Table { get; }
  38. }