SuperViewChangedEventArgs.cs 896 B

12345678910111213141516171819202122232425
  1. namespace Terminal.Gui.ViewBase;
  2. /// <summary>
  3. /// Args for events where the <see cref="View.SuperView"/> of a <see cref="View"/> is changed (e.g.
  4. /// <see cref="View.Removed"/>).
  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 view that is having it's <see cref="View.SuperView"/> changed</summary>
  17. public View? SubView { get; }
  18. /// <summary>
  19. /// The parent. For <see cref="View.Removed"/> this is the old parent (new parent now being null).
  20. /// </summary>
  21. public View? SuperView { get; }
  22. }