TitleEventArgs.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // Authors:
  3. // Miguel de Icaza ([email protected])
  4. //
  5. // NOTE: Window is functionally identical to FrameView with the following exceptions.
  6. // - Window is a Toplevel
  7. // - FrameView Does not support padding (but should)
  8. // - FrameView Does not support mouse dragging
  9. // - FrameView Does not support IEnumerable
  10. // Any updates done here should probably be done in FrameView as well; TODO: Merge these classes
  11. using System;
  12. using NStack;
  13. namespace Terminal.Gui {
  14. /// <summary>
  15. /// Event arguments for Title change events.
  16. /// </summary>
  17. public class TitleEventArgs : EventArgs {
  18. /// <summary>
  19. /// The new Window Title.
  20. /// </summary>
  21. public ustring NewTitle { get; set; }
  22. /// <summary>
  23. /// The old Window Title.
  24. /// </summary>
  25. public ustring OldTitle { get; set; }
  26. /// <summary>
  27. /// Flag which allows canceling the Title change.
  28. /// </summary>
  29. public bool Cancel { get; set; }
  30. /// <summary>
  31. /// Initializes a new instance of <see cref="TitleEventArgs"/>
  32. /// </summary>
  33. /// <param name="oldTitle">The <see cref="Window.Title"/> that is/has been replaced.</param>
  34. /// <param name="newTitle">The new <see cref="Window.Title"/> to be replaced.</param>
  35. public TitleEventArgs (ustring oldTitle, ustring newTitle)
  36. {
  37. OldTitle = oldTitle;
  38. NewTitle = newTitle;
  39. }
  40. }
  41. }