SuperViewChangedEventArgs.cs 1.1 KB

1234567891011121314151617181920212223242526
  1. namespace Terminal.Gui;
  2. /// <summary>
  3. /// EventArgs for events where the state of the <see cref="View.SuperView"/> of a <see cref="View"/> is changing (e.g.
  4. /// <see cref="View.Removed"/> / <see cref="View.Added"/> events).
  5. /// </summary>
  6. public class SuperViewChangedEventArgs : EventArgs
  7. {
  8. /// <summary>Creates a new instance of the <see cref="SuperViewChangedEventArgs"/> class.</summary>
  9. /// <param name="superView"></param>
  10. /// <param name="subView"></param>
  11. public SuperViewChangedEventArgs (View superView, View subView)
  12. {
  13. SuperView = superView;
  14. SubView = subView;
  15. }
  16. /// <summary>The SubView that is either being added or removed from <see cref="Parent"/>.</summary>
  17. public View SubView { get; }
  18. /// <summary>
  19. /// The SuperView that is changing state. For <see cref="View.Removed"/> this is the SuperView <see cref="SubView"/> is being removed from. For
  20. /// <see cref="View.Added"/> it is the SuperView <see cref="SubView"/> is being added to.
  21. /// </summary>
  22. public View SuperView { get; }
  23. }