Browse Source

Added public abstract ResizeScreen method to the ConsoleDriver.

BDisp 3 years ago
parent
commit
9ee3502c61

+ 1 - 1
Terminal.Gui/ConsoleDrivers/CursesDriver/CursesDriver.cs

@@ -962,7 +962,7 @@ namespace Terminal.Gui {
 			}
 			}
 		}
 		}
 
 
-		void ResizeScreen ()
+		public override void ResizeScreen ()
 		{
 		{
 			Clip = new Rect (0, 0, Cols, Rows);
 			Clip = new Rect (0, 0, Cols, Rows);
 			Console.Out.Write ("\x1b[3J");
 			Console.Out.Write ("\x1b[3J");

+ 1 - 1
Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs

@@ -523,7 +523,7 @@ namespace Terminal.Gui {
 			TerminalResized?.Invoke ();
 			TerminalResized?.Invoke ();
 		}
 		}
 
 
-		void ResizeScreen ()
+		public override void ResizeScreen ()
 		{
 		{
 			if (!HeightAsBuffer) {
 			if (!HeightAsBuffer) {
 				if (FakeConsole.WindowHeight > 0) {
 				if (FakeConsole.WindowHeight > 0) {

+ 1 - 1
Terminal.Gui/ConsoleDrivers/NetDriver.cs

@@ -1381,7 +1381,7 @@ namespace Terminal.Gui {
 			Clear ();
 			Clear ();
 		}
 		}
 
 
-		void ResizeScreen ()
+		public override void ResizeScreen ()
 		{
 		{
 			if (!HeightAsBuffer) {
 			if (!HeightAsBuffer) {
 				if (Console.WindowHeight > 0) {
 				if (Console.WindowHeight > 0) {

+ 1 - 1
Terminal.Gui/ConsoleDrivers/WindowsDriver.cs

@@ -1425,7 +1425,7 @@ namespace Terminal.Gui {
 			Colors.Error.Disabled = MakeColor (ConsoleColor.DarkGray, ConsoleColor.White);
 			Colors.Error.Disabled = MakeColor (ConsoleColor.DarkGray, ConsoleColor.White);
 		}
 		}
 
 
-		void ResizeScreen ()
+		public override void ResizeScreen ()
 		{
 		{
 			OutputBuffer = new WindowsConsole.CharInfo [Rows * Cols];
 			OutputBuffer = new WindowsConsole.CharInfo [Rows * Cols];
 			Clip = new Rect (0, 0, Cols, Rows);
 			Clip = new Rect (0, 0, Cols, Rows);

+ 5 - 0
Terminal.Gui/Core/ConsoleDriver.cs

@@ -771,6 +771,11 @@ namespace Terminal.Gui {
 		/// </summary>
 		/// </summary>
 		public abstract void End ();
 		public abstract void End ();
 
 
+		/// <summary>
+		/// Resizes the clip area when the screen is resized.
+		/// </summary>
+		public abstract void ResizeScreen ();
+
 		/// <summary>
 		/// <summary>
 		/// Reset and recreate the contents and the driver buffer.
 		/// Reset and recreate the contents and the driver buffer.
 		/// </summary>
 		/// </summary>