SuperViewChangedEventArgs.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. namespace Terminal.Gui;
  3. /// <summary>
  4. /// Args for events where the <see cref="View.SuperView"/> of a <see cref="View"/> is changed
  5. /// (e.g. <see cref="View.Removed"/> / <see cref="View.Added"/> events).
  6. /// </summary>
  7. public class SuperViewChangedEventArgs : EventArgs {
  8. /// <summary>
  9. /// Creates a new instance of the <see cref="SuperViewChangedEventArgs"/> class.
  10. /// </summary>
  11. /// <param name="parent"></param>
  12. /// <param name="child"></param>
  13. public SuperViewChangedEventArgs (View parent, View child)
  14. {
  15. Parent = parent;
  16. Child = child;
  17. }
  18. // TODO: Parent is the wrong name. It should be SuperView.
  19. /// <summary>
  20. /// The parent. For <see cref="View.Removed"/> this is the old
  21. /// parent (new parent now being null). For <see cref="View.Added"/>
  22. /// it is the new parent to whom view now belongs.
  23. /// </summary>
  24. public View Parent { get; }
  25. // TODO: Child is the wrong name. It should be View.
  26. /// <summary>
  27. /// The view that is having it's <see cref="View.SuperView"/> changed
  28. /// </summary>
  29. public View Child { get; }
  30. }