SuperViewChangedEventArgs.cs 987 B

123456789101112131415161718192021222324252627282930313233
  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. {
  9. /// <summary>
  10. /// Creates a new instance of the <see cref="SuperViewChangedEventArgs"/> class.
  11. /// </summary>
  12. /// <param name="parent"></param>
  13. /// <param name="child"></param>
  14. public SuperViewChangedEventArgs (View parent, View child)
  15. {
  16. Parent = parent;
  17. Child = child;
  18. }
  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. /// <summary>
  26. /// The view that is having it's <see cref="View.SuperView"/> changed
  27. /// </summary>
  28. public View Child { get; }
  29. }
  30. }