ObjectActivatedEventArgs.cs 918 B

123456789101112131415161718192021222324
  1. #nullable disable
  2. namespace Terminal.Gui.Views;
  3. /// <summary>Event args for the <see cref="TreeView{T}.ObjectActivated"/> event</summary>
  4. /// <typeparam name="T"></typeparam>
  5. public class ObjectActivatedEventArgs<T> where T : class
  6. {
  7. /// <summary>Creates a new instance documenting activation of the <paramref name="activated"/> object</summary>
  8. /// <param name="tree">Tree in which the activation is happening</param>
  9. /// <param name="activated">What object is being activated</param>
  10. public ObjectActivatedEventArgs (TreeView<T> tree, T activated)
  11. {
  12. Tree = tree;
  13. ActivatedObject = activated;
  14. }
  15. /// <summary>The object that was selected at the time of activation</summary>
  16. /// <value></value>
  17. public T ActivatedObject { get; }
  18. /// <summary>The tree in which the activation occurred</summary>
  19. /// <value></value>
  20. public TreeView<T> Tree { get; }
  21. }