FocusEventArgs.cs 819 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Defines the event arguments for <see cref="View.SetFocus(View)"/>
  5. /// </summary>
  6. public class FocusEventArgs : EventArgs {
  7. /// <summary>
  8. /// Constructs.
  9. /// </summary>
  10. /// <param name="view">The view that gets or loses focus.</param>
  11. public FocusEventArgs (View view) { View = view; }
  12. /// <summary>
  13. /// Indicates if the current focus event has already been processed and the driver should stop notifying any other event subscriber.
  14. /// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
  15. /// </summary>
  16. public bool Handled { get; set; }
  17. /// <summary>
  18. /// Indicates the current view that gets or loses focus.
  19. /// </summary>
  20. public View View { get; set; }
  21. }
  22. }