TableSelection.cs 940 B

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