namespace Terminal.Gui.ViewBase; // TODO: CWP: FocusChanging should use an event arg type derived from ResultEventArgs so that its more obvious // TODO: the result can be changed. /// The event arguments for events. public class HasFocusEventArgs : CancelEventArgs { /// Initializes a new instance. /// The current value of . /// The value will have if the event is not cancelled. /// The view that is losing focus. /// The view that is gaining focus. public HasFocusEventArgs (bool currentHasFocus, bool newHasFocus, View? currentFocused, View? newFocused) : base (ref currentHasFocus, ref newHasFocus) { CurrentFocused = currentFocused; NewFocused = newFocused; } /// Gets or sets the view that is losing focus. public View? CurrentFocused { get; set; } /// Gets or sets the view that is gaining focus. public View? NewFocused { get; set; } }