RuneCellEventArgs.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.Generic;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Args for events that relate to a specific <see cref="RuneCell"/>.
  5. /// </summary>
  6. public class RuneCellEventArgs {
  7. /// <summary>
  8. /// The list of runes the RuneCell is part of.
  9. /// </summary>
  10. public List<RuneCell> Line { get; }
  11. /// <summary>
  12. /// The index of the RuneCell in the line.
  13. /// </summary>
  14. public int Col { get; }
  15. /// <summary>
  16. /// The unwrapped row and column index into the text containing the RuneCell.
  17. /// Unwrapped means the text without word wrapping or other visual formatting having been applied.
  18. /// </summary>
  19. public (int Row, int Col) UnwrappedPosition { get; }
  20. /// <summary>
  21. /// Creates a new instance of the <see cref="RuneCellEventArgs"/> class.
  22. /// </summary>
  23. /// <param name="line">The line.</param>
  24. /// <param name="col">The col index.</param>
  25. /// <param name="unwrappedPosition">The unwrapped row and col index.</param>
  26. public RuneCellEventArgs (List<RuneCell> line, int col, (int Row, int Col) unwrappedPosition)
  27. {
  28. Line = line;
  29. Col = col;
  30. UnwrappedPosition = unwrappedPosition;
  31. }
  32. }
  33. }