TableSelection.cs 966 B

1234567891011121314151617181920212223242526272829
  1. #nullable disable
  2. namespace Terminal.Gui.Views;
  3. /// <summary>Describes a selected region of the table</summary>
  4. public class TableSelection
  5. {
  6. /// <summary>Creates a new selected area starting at the origin corner and covering the provided rectangular area</summary>
  7. /// <param name="origin"></param>
  8. /// <param name="rect"></param>
  9. public TableSelection (Point origin, Rectangle rect)
  10. {
  11. Origin = origin;
  12. Rectangle = rect;
  13. }
  14. /// <summary>
  15. /// True if the selection was made through <see cref="Command.Activate"/> and therefore should persist even
  16. /// through keyboard navigation.
  17. /// </summary>
  18. public bool IsToggled { get; set; }
  19. /// <summary>Corner of the <see cref="Rectangle"/> where selection began</summary>
  20. /// <value></value>
  21. public Point Origin { get; set; }
  22. /// <summary>Area selected</summary>
  23. /// <value></value>
  24. public Rectangle Rectangle { get; set; }
  25. }