using System.ComponentModel; namespace Terminal.Gui; /// Event args for draw events public class DrawEventArgs : CancelEventArgs { /// Creates a new instance of the class. /// /// The Content-relative rectangle describing the new visible viewport into the /// . /// /// /// The Content-relative rectangle describing the old visible viewport into the /// . /// public DrawEventArgs (Rectangle newViewport, Rectangle oldViewport) { NewViewport = newViewport; OldViewport = oldViewport; } /// If set to true, the draw operation will be canceled, if applicable. public bool Cancel { get; set; } /// Gets the Content-relative rectangle describing the old visible viewport into the . public Rectangle OldViewport { get; } /// Gets the Content-relative rectangle describing the currently visible viewport into the . public Rectangle NewViewport { get; } }