DrawEventArgs.cs 1.2 KB

1234567891011121314151617181920212223242526272829
  1. namespace Terminal.Gui;
  2. /// <summary>Event args for draw events</summary>
  3. public class DrawEventArgs : EventArgs
  4. {
  5. /// <summary>Creates a new instance of the <see cref="DrawEventArgs"/> class.</summary>
  6. /// <param name="newViewport">
  7. /// The Content-relative rectangle describing the new visible viewport into the
  8. /// <see cref="View"/>.
  9. /// </param>
  10. /// <param name="oldViewport">
  11. /// The Content-relative rectangle describing the old visible viewport into the
  12. /// <see cref="View"/>.
  13. /// </param>
  14. public DrawEventArgs (Rectangle newViewport, Rectangle oldViewport)
  15. {
  16. NewViewport = newViewport;
  17. OldViewport = oldViewport;
  18. }
  19. /// <summary>If set to true, the draw operation will be canceled, if applicable.</summary>
  20. public bool Cancel { get; set; }
  21. /// <summary>Gets the Content-relative rectangle describing the old visible viewport into the <see cref="View"/>.</summary>
  22. public Rectangle OldViewport { get; }
  23. /// <summary>Gets the Content-relative rectangle describing the currently visible viewport into the <see cref="View"/>.</summary>
  24. public Rectangle NewViewport { get; }
  25. }