2
0

SuperViewChangedEventArgs.cs 1.1 KB

12345678910111213141516171819202122232425262728
  1. namespace Terminal.Gui;
  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"/> / <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="parent"></param>
  10. /// <param name="child"></param>
  11. public SuperViewChangedEventArgs (View parent, View child)
  12. {
  13. Parent = parent;
  14. Child = child;
  15. }
  16. // TODO: Child is the wrong name. It should be View.
  17. /// <summary>The view that is having it's <see cref="View.SuperView"/> changed</summary>
  18. public View Child { get; }
  19. // TODO: Parent is the wrong name. It should be SuperView.
  20. /// <summary>
  21. /// The parent. For <see cref="View.Removed"/> this is the old parent (new parent now being null). For
  22. /// <see cref="View.Added"/> it is the new parent to whom view now belongs.
  23. /// </summary>
  24. public View Parent { get; }
  25. }