#nullable enable namespace Terminal.Gui; /// /// Describes the screen state that you want the console to be in. /// Is designed to be drawn to repeatedly then manifest into the console /// once at the end of iteration after all drawing is finalized. /// public interface IOutputBuffer { /// /// As performance is a concern, we keep track of the dirty lines and only refresh those. /// This is in addition to the dirty flag on each cell. /// public bool [] DirtyLines { get; } /// /// The contents of the application output. The driver outputs this buffer to the terminal when UpdateScreen is called. /// Cell [,] Contents { get; set; } /// /// Gets or sets the clip rectangle that and are subject /// to. /// /// The rectangle describing the of region. public Region? Clip { get; set; } /// /// The that will be used for the next AddRune or AddStr call. /// Attribute CurrentAttribute { get; set; } /// The number of rows visible in the terminal. int Rows { get; set; } /// The number of columns visible in the terminal. int Cols { get; set; } /// /// Gets the row last set by . and are used by /// and to determine where to add content. /// public int Row { get; } /// /// Gets the column last set by . and are used by /// and to determine where to add content. /// public int Col { get; } /// /// The first cell index on left of screen - basically always 0. /// Changing this may have unexpected consequences. /// int Left { get; set; } /// /// The first cell index on top of screen - basically always 0. /// Changing this may have unexpected consequences. /// int Top { get; set; } /// /// Updates the column and row to the specified location in the buffer. /// /// The column to move to. /// The row to move to. void Move (int col, int row); /// Adds the specified rune to the display at the current cursor position. /// Rune to add. void AddRune (Rune rune); /// /// Adds the specified character to the display at the current cursor position. This is a convenience method for /// AddRune. /// /// Character to add. void AddRune (char c); /// Adds the string to the display at the current cursor position. /// String to add. void AddStr (string str); /// Clears the contents of the buffer. void ClearContents (); /// /// Tests whether the specified coordinate is valid for drawing the specified Rune. /// /// Used to determine if one or two columns are required. /// The column. /// The row. /// /// True if the coordinate is valid for the Rune; false otherwise. /// bool IsValidLocation (Rune rune, int col, int row); /// /// Changes the size of the buffer to the given size /// /// /// void SetWindowSize (int cols, int rows); /// /// Fills the given with the given /// symbol using the currently selected attribute. /// /// /// void FillRect (Rectangle rect, Rune rune); /// /// Fills the given with the given /// symbol using the currently selected attribute. /// /// /// void FillRect (Rectangle rect, char rune); }