CellColorGetterArgs.cs 1.5 KB

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