namespace Terminal.Gui; /// Args for events that relate to specific public class ViewEventArgs : EventArgs { /// Creates a new instance of the class. /// public ViewEventArgs (View view) { View = view; } /// The view that the event is about. /// /// Can be different from the sender of the for example if event describes the adding a /// child then sender may be the parent while is the child being added. /// public View View { get; } } /// Event arguments for the event. public class LayoutEventArgs : EventArgs { /// The view-relative bounds of the before it was laid out. public Rectangle OldBounds { get; set; } } /// Event args for draw events public class DrawEventArgs : EventArgs { /// Creates a new instance of the class. /// /// Gets the view-relative rectangle describing the currently visible viewport into the /// . /// public DrawEventArgs (Rectangle rect) { Rectangle = rect; } /// If set to true, the draw operation will be canceled, if applicable. public bool Cancel { get; set; } /// Gets the view-relative rectangle describing the currently visible viewport into the . public Rectangle Rectangle { get; } } /// Defines the event arguments for public class FocusEventArgs : EventArgs { /// Constructs. /// The view that gets or loses focus. public FocusEventArgs (View view) { View = view; } /// /// Indicates if the current focus event has already been processed and the driver should stop notifying any other /// event subscriber. Its important to set this value to true specially when updating any View's layout from inside the /// subscriber method. /// public bool Handled { get; set; } /// Indicates the current view that gets or loses focus. public View View { get; set; } }