CellColorGetterArgs.cs 1.5 KB

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