CellToggledEventArgs.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Event args for the <see cref="TableView.CellToggled"/> event.
  5. /// </summary>
  6. public class CellToggledEventArgs : EventArgs
  7. {
  8. /// <summary>
  9. /// The current table to which the new indexes refer. May be null e.g. if selection change is the result of clearing the table from the view
  10. /// </summary>
  11. /// <value></value>
  12. public ITableSource Table { get; }
  13. /// <summary>
  14. /// The column index of the <see cref="Table"/> cell that is being toggled
  15. /// </summary>
  16. /// <value></value>
  17. public int Col { get; }
  18. /// <summary>
  19. /// The row index of the <see cref="Table"/> cell that is being toggled
  20. /// </summary>
  21. /// <value></value>
  22. public int Row { get; }
  23. /// <summary>
  24. /// Gets or sets whether to cancel the processing of this event
  25. /// </summary>
  26. public bool Cancel { get; set; }
  27. /// <summary>
  28. /// Creates a new instance of arguments describing a cell being toggled in <see cref="TableView"/>
  29. /// </summary>
  30. /// <param name="t"></param>
  31. /// <param name="col"></param>
  32. /// <param name="row"></param>
  33. public CellToggledEventArgs (ITableSource t, int col, int row)
  34. {
  35. Table = t;
  36. Col = col;
  37. Row = row;
  38. }
  39. }
  40. }