RuneCellEventArgs.cs 1.1 KB

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