CellToggledEventArgs.cs 1.2 KB

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