2
0
Эх сурвалжийг харах

Rename Rect to Rectangle in preparation for removal

Brandon Thetford 1 жил өмнө
parent
commit
a638edeeaf
100 өөрчлөгдсөн 1191 нэмэгдсэн , 1189 устгасан
  1. 4 4
      Terminal.Gui/Application.cs
  2. 6 6
      Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs
  3. 1 1
      Terminal.Gui/ConsoleDrivers/FakeDriver/FakeDriver.cs
  4. 3 3
      Terminal.Gui/ConsoleDrivers/NetDriver.cs
  5. 2 2
      Terminal.Gui/ConsoleDrivers/WindowsDriver.cs
  6. 6 6
      Terminal.Gui/Drawing/LineCanvas.cs
  7. 2 2
      Terminal.Gui/Drawing/StraightLine.cs
  8. 12 12
      Terminal.Gui/Drawing/Thickness.cs
  9. 3 3
      Terminal.Gui/Text/Autocomplete/PopupAutocomplete.cs
  10. 9 9
      Terminal.Gui/Text/TextFormatter.cs
  11. 19 19
      Terminal.Gui/Types/Rectangle.cs
  12. 8 8
      Terminal.Gui/Types/RectangleF.cs
  13. 8 8
      Terminal.Gui/View/Adornment/Adornment.cs
  14. 9 9
      Terminal.Gui/View/Adornment/Border.cs
  15. 38 38
      Terminal.Gui/View/Layout/ViewLayout.cs
  16. 1 1
      Terminal.Gui/View/View.cs
  17. 21 21
      Terminal.Gui/View/ViewDrawing.cs
  18. 3 3
      Terminal.Gui/View/ViewEventArgs.cs
  19. 1 1
      Terminal.Gui/View/ViewSubViews.cs
  20. 5 5
      Terminal.Gui/View/ViewText.cs
  21. 3 3
      Terminal.Gui/Views/ColorPicker.cs
  22. 4 4
      Terminal.Gui/Views/ComboBox.cs
  23. 2 2
      Terminal.Gui/Views/FileDialog.cs
  24. 2 2
      Terminal.Gui/Views/GraphView/Annotations.cs
  25. 6 6
      Terminal.Gui/Views/GraphView/Axis.cs
  26. 3 3
      Terminal.Gui/Views/GraphView/GraphView.cs
  27. 4 4
      Terminal.Gui/Views/GraphView/Series.cs
  28. 4 4
      Terminal.Gui/Views/HexView.cs
  29. 2 2
      Terminal.Gui/Views/Line.cs
  30. 1 1
      Terminal.Gui/Views/LineView.cs
  31. 2 2
      Terminal.Gui/Views/ListView.cs
  32. 2 2
      Terminal.Gui/Views/Menu/ContextMenu.cs
  33. 8 8
      Terminal.Gui/Views/Menu/Menu.cs
  34. 4 4
      Terminal.Gui/Views/Menu/MenuBar.cs
  35. 1 1
      Terminal.Gui/Views/MessageBox.cs
  36. 2 2
      Terminal.Gui/Views/ProgressBar.cs
  37. 5 5
      Terminal.Gui/Views/RadioGroup.cs
  38. 1 1
      Terminal.Gui/Views/ScrollBarView.cs
  39. 5 5
      Terminal.Gui/Views/ScrollView.cs
  40. 3 3
      Terminal.Gui/Views/Slider.cs
  41. 1 1
      Terminal.Gui/Views/StatusBar.cs
  42. 8 8
      Terminal.Gui/Views/TabView.cs
  43. 1 1
      Terminal.Gui/Views/TableView/ListTableSource.cs
  44. 4 4
      Terminal.Gui/Views/TableView/TableSelection.cs
  45. 18 18
      Terminal.Gui/Views/TableView/TableView.cs
  46. 3 3
      Terminal.Gui/Views/TextField.cs
  47. 1 1
      Terminal.Gui/Views/TextValidateField.cs
  48. 8 8
      Terminal.Gui/Views/TextView.cs
  49. 5 5
      Terminal.Gui/Views/TileView.cs
  50. 1 1
      Terminal.Gui/Views/Toplevel.cs
  51. 1 1
      Terminal.Gui/Views/TreeView/TreeView.cs
  52. 3 2
      UICatalog/Scenarios/Animation.cs
  53. 2 2
      UICatalog/Scenarios/Buttons.cs
  54. 6 6
      UICatalog/Scenarios/CharacterMap.cs
  55. 1 1
      UICatalog/Scenarios/GraphViewExample.cs
  56. 2 1
      UICatalog/Scenarios/Images.cs
  57. 2 2
      UICatalog/Scenarios/LabelsAsButtons.cs
  58. 1 1
      UICatalog/Scenarios/LineDrawing.cs
  59. 1 1
      UICatalog/Scenarios/ProgressBarStyles.cs
  60. 5 5
      UICatalog/Scenarios/Scrolling.cs
  61. 1 1
      UICatalog/Scenarios/SingleBackgroundWorker.cs
  62. 1 1
      UICatalog/Scenarios/Snake.cs
  63. 3 3
      UnitTests/Application/ApplicationTests.cs
  64. 5 5
      UnitTests/ConsoleDrivers/ClipRegionTests.cs
  65. 21 21
      UnitTests/Drawing/LineCanvasTests.cs
  66. 4 4
      UnitTests/Drawing/RulerTests.cs
  67. 1 1
      UnitTests/Drawing/StraightLineTests.cs
  68. 48 48
      UnitTests/Drawing/ThicknessTests.cs
  69. 5 5
      UnitTests/TestHelpers.cs
  70. 21 21
      UnitTests/Text/TextFormatterTests.cs
  71. 80 80
      UnitTests/Types/RectangleTests.cs
  72. 16 16
      UnitTests/View/Adornment/AdornmentTests.cs
  73. 34 34
      UnitTests/View/Adornment/BorderTests.cs
  74. 2 2
      UnitTests/View/DrawTests.cs
  75. 4 4
      UnitTests/View/FrameTests.cs
  76. 52 52
      UnitTests/View/Layout/AbsoluteLayoutTests.cs
  77. 14 14
      UnitTests/View/Layout/DimTests.cs
  78. 17 17
      UnitTests/View/Layout/LayoutTests.cs
  79. 23 23
      UnitTests/View/Layout/PosTests.cs
  80. 10 10
      UnitTests/View/Layout/SetRelativeLayoutTests.cs
  81. 13 13
      UnitTests/View/NavigationTests.cs
  82. 25 25
      UnitTests/View/Text/AutoSizeFalseTests.cs
  83. 135 135
      UnitTests/View/Text/AutoSizeTrueTests.cs
  84. 68 68
      UnitTests/View/ViewTests.cs
  85. 2 2
      UnitTests/Views/AllViewsTests.cs
  86. 24 24
      UnitTests/Views/ButtonTests.cs
  87. 33 33
      UnitTests/Views/CheckBoxTests.cs
  88. 1 1
      UnitTests/Views/ColorPickerTests.cs
  89. 5 5
      UnitTests/Views/ComboBoxTests.cs
  90. 31 31
      UnitTests/Views/ContextMenuTests.cs
  91. 3 3
      UnitTests/Views/DateFieldTests.cs
  92. 6 6
      UnitTests/Views/FrameViewTests.cs
  93. 34 34
      UnitTests/Views/GraphViewTests.cs
  94. 20 20
      UnitTests/Views/LabelTests.cs
  95. 2 2
      UnitTests/Views/ListViewTests.cs
  96. 42 42
      UnitTests/Views/MenuBarTests.cs
  97. 8 8
      UnitTests/Views/RadioGroupTests.cs
  98. 5 5
      UnitTests/Views/ScrollBarViewTests.cs
  99. 21 21
      UnitTests/Views/ScrollViewTests.cs
  100. 52 52
      UnitTests/Views/TableViewTests.cs

+ 4 - 4
Terminal.Gui/Application.cs

@@ -1127,7 +1127,7 @@ public static partial class Application
 
     private static View FindDeepestTop (Toplevel start, int x, int y, out int resx, out int resy)
     {
-        Rect startFrame = start.Frame;
+        Rectangle startFrame = start.Frame;
 
         if (!startFrame.Contains (x, y))
         {
@@ -1286,7 +1286,7 @@ public static partial class Application
 
         foreach (Toplevel t in _topLevels)
         {
-            t.SetRelativeLayout (new Rect (0, 0, args.Size.Width, args.Size.Height));
+            t.SetRelativeLayout (new Rectangle (0, 0, args.Size.Width, args.Size.Height));
             t.LayoutSubviews ();
             t.PositionToplevels ();
             t.OnSizeChanging (new SizeChangedEventArgs (args.Size));
@@ -1424,7 +1424,7 @@ public static partial class Application
     /// <param name="a">The mouse event with coordinates relative to the screen.</param>
     public static void OnMouseEvent (MouseEventEventArgs a)
     {
-        static bool OutsideRect (Point p, Rect r) { return p.X < 0 || p.X > r.Right || p.Y < 0 || p.Y > r.Bottom; }
+        static bool OutsideRect (Point p, Rectangle r) { return p.X < 0 || p.X > r.Right || p.Y < 0 || p.Y > r.Bottom; }
 
         if (IsMouseDisabled)
         {
@@ -1587,7 +1587,7 @@ public static partial class Application
                 return;
             }
 
-            Rect bounds = view.BoundsToScreen (view.Bounds);
+            Rectangle bounds = view.BoundsToScreen (view.Bounds);
 
             if (bounds.Contains (a.MouseEvent.X, a.MouseEvent.Y))
             {

+ 6 - 6
Terminal.Gui/ConsoleDrivers/ConsoleDriver.cs

@@ -39,14 +39,14 @@ public abstract class ConsoleDriver
     internal bool [] _dirtyLines;
 
     /// <summary>Gets the dimensions of the terminal.</summary>
-    public Rect Bounds => new (0, 0, Cols, Rows);
+    public Rectangle Bounds => new (0, 0, Cols, Rows);
 
     /// <summary>
     ///     Gets or sets the clip rectangle that <see cref="AddRune(Rune)"/> and <see cref="AddStr(string)"/> are subject
     ///     to.
     /// </summary>
     /// <value>The rectangle describing the bounds of <see cref="Clip"/>.</value>
-    public Rect Clip { get; set; }
+    public Rectangle Clip { get; set; }
 
     /// <summary>Get the operating system clipboard.</summary>
     public IClipboard Clipboard { get; internal set; }
@@ -320,7 +320,7 @@ public abstract class ConsoleDriver
     {
         // TODO: This method is really "Clear Contents" now and should not be abstract (or virtual)
         Contents = new Cell [Rows, Cols];
-        Clip = new Rect (0, 0, Cols, Rows);
+        Clip = new Rectangle (0, 0, Cols, Rows);
         _dirtyLines = new bool [Rows];
 
         lock (Contents)
@@ -353,7 +353,7 @@ public abstract class ConsoleDriver
     /// <summary>Fills the specified rectangle with the specified rune.</summary>
     /// <param name="rect"></param>
     /// <param name="rune"></param>
-    public void FillRect (Rect rect, Rune rune = default)
+    public void FillRect (Rectangle rect, Rune rune = default)
     {
         for (int r = rect.Y; r < rect.Y + rect.Height; r++)
         {
@@ -367,11 +367,11 @@ public abstract class ConsoleDriver
 
     /// <summary>
     ///     Fills the specified rectangle with the specified <see langword="char"/>. This method is a convenience method
-    ///     that calls <see cref="FillRect(Rect, Rune)"/>.
+    ///     that calls <see cref="FillRect(Rectangle, Rune)"/>.
     /// </summary>
     /// <param name="rect"></param>
     /// <param name="c"></param>
-    public void FillRect (Rect rect, char c) { FillRect (rect, new Rune (c)); }
+    public void FillRect (Rectangle rect, char c) { FillRect (rect, new Rune (c)); }
 
     /// <summary>Gets the terminal cursor visibility.</summary>
     /// <param name="visibility">The current <see cref="CursorVisibility"/></param>

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

@@ -455,7 +455,7 @@ public class FakeDriver : ConsoleDriver
             }
         }
 
-        Clip = new Rect (0, 0, Cols, Rows);
+        Clip = new Rectangle (0, 0, Cols, Rows);
     }
 
     public override void UpdateCursor ()

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

@@ -1205,11 +1205,11 @@ internal class NetDriver : ConsoleDriver
             }
             catch (IOException)
             {
-                Clip = new Rect (0, 0, Cols, Rows);
+                Clip = new Rectangle (0, 0, Cols, Rows);
             }
             catch (ArgumentOutOfRangeException)
             {
-                Clip = new Rect (0, 0, Cols, Rows);
+                Clip = new Rectangle (0, 0, Cols, Rows);
             }
         }
         else
@@ -1217,7 +1217,7 @@ internal class NetDriver : ConsoleDriver
             Console.Out.Write (EscSeqUtils.CSI_SetTerminalWindowSize (Rows, Cols));
         }
 
-        Clip = new Rect (0, 0, Cols, Rows);
+        Clip = new Rectangle (0, 0, Cols, Rows);
     }
 
     #endregion

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

@@ -1330,7 +1330,7 @@ internal class WindowsDriver : ConsoleDriver
         CurrentAttribute = new Attribute (Color.White, Color.Black);
 
         _outputBuffer = new WindowsConsole.ExtendedCharInfo [Rows * Cols];
-        Clip = new Rect (0, 0, Cols, Rows);
+        Clip = new Rectangle (0, 0, Cols, Rows);
 
         _damageRegion = new WindowsConsole.SmallRect
         {
@@ -1724,7 +1724,7 @@ internal class WindowsDriver : ConsoleDriver
     private void ResizeScreen ()
     {
         _outputBuffer = new WindowsConsole.ExtendedCharInfo [Rows * Cols];
-        Clip = new Rect (0, 0, Cols, Rows);
+        Clip = new Rectangle (0, 0, Cols, Rows);
 
         _damageRegion = new WindowsConsole.SmallRect
         {

+ 6 - 6
Terminal.Gui/Drawing/LineCanvas.cs

@@ -48,7 +48,7 @@ public class LineCanvas : IDisposable
         // TODO: Add other resolvers
     };
 
-    private Rect _cachedBounds;
+    private Rectangle _cachedBounds;
 
     /// <summary>Creates a new instance.</summary>
     public LineCanvas ()
@@ -134,7 +134,7 @@ public class LineCanvas : IDisposable
         Attribute? attribute = default
     )
     {
-        _cachedBounds = Rect.Empty;
+        _cachedBounds = Rectangle.Empty;
         _lines.Add (new StraightLine (start, length, orientation, style, attribute));
     }
 
@@ -142,14 +142,14 @@ public class LineCanvas : IDisposable
     /// <param name="line"></param>
     public void AddLine (StraightLine line)
     {
-        _cachedBounds = Rect.Empty;
+        _cachedBounds = Rectangle.Empty;
         _lines.Add (line);
     }
 
     /// <summary>Clears all lines from the LineCanvas.</summary>
     public void Clear ()
     {
-        _cachedBounds = Rect.Empty;
+        _cachedBounds = Rectangle.Empty;
         _lines.Clear ();
     }
 
@@ -157,7 +157,7 @@ public class LineCanvas : IDisposable
     ///     Clears any cached states from the canvas Call this method if you make changes to lines that have already been
     ///     added.
     /// </summary>
-    public void ClearCache () { _cachedBounds = Rect.Empty; }
+    public void ClearCache () { _cachedBounds = Rectangle.Empty; }
 
     /// <summary>
     ///     Evaluates the lines that have been added to the canvas and returns a map containing the glyphs and their
@@ -200,7 +200,7 @@ public class LineCanvas : IDisposable
     /// </summary>
     /// <param name="inArea">A rectangle to constrain the search by.</param>
     /// <returns>A map of the points within the canvas that intersect with <paramref name="inArea"/>.</returns>
-    public Dictionary<Point, Rune> GetMap (Rect inArea)
+    public Dictionary<Point, Rune> GetMap (Rectangle inArea)
     {
         Dictionary<Point, Rune> map = new ();
 

+ 2 - 2
Terminal.Gui/Drawing/StraightLine.cs

@@ -45,7 +45,7 @@ public class StraightLine
     ///     Gets the rectangle that describes the bounds of the canvas. Location is the coordinates of the line that is
     ///     furthest left/top and Size is defined by the line that extends the furthest right/bottom.
     /// </summary>
-    internal Rect Bounds
+    internal Rectangle Bounds
     {
         get
         {
@@ -59,7 +59,7 @@ public class StraightLine
             int width = Orientation == Orientation.Horizontal ? size : 1;
             int height = Orientation == Orientation.Vertical ? size : 1;
 
-            return new Rect (x, y, width, height);
+            return new Rectangle (x, y, width, height);
         }
     }
 

+ 12 - 12
Terminal.Gui/Drawing/Thickness.cs

@@ -9,10 +9,10 @@ namespace Terminal.Gui;
 /// </summary>
 /// <remarks>
 ///     <para>
-///         Use the helper API (<see cref="GetInside(Rect)"/> to get the rectangle describing the insides of the frame,
+///         Use the helper API (<see cref="GetInside(Rectangle)"/> to get the rectangle describing the insides of the frame,
 ///         with the thickness widths subtracted.
 ///     </para>
-///     <para>Use the helper API (<see cref="Draw(Rect, string)"/> to draw the frame with the specified thickness.</para>
+///     <para>Use the helper API (<see cref="Draw(Rectangle, string)"/> to draw the frame with the specified thickness.</para>
 /// </remarks>
 public class Thickness : IEquatable<Thickness>
 {
@@ -87,15 +87,15 @@ public class Thickness : IEquatable<Thickness>
 
     /// <summary>
     ///     Gets whether the specified coordinates lie within the thickness (inside the bounding rectangle but outside of
-    ///     the rectangle described by <see cref="GetInside(Rect)"/>.
+    ///     the rectangle described by <see cref="GetInside(Rectangle)"/>.
     /// </summary>
     /// <param name="outside">Describes the location and size of the rectangle that contains the thickness.</param>
     /// <param name="x">The x coord to check.</param>
     /// <param name="y">The y coord to check.</param>
     /// <returns><see langword="true"/> if the specified coordinate is within the thickness; <see langword="false"/> otherwise.</returns>
-    public bool Contains (Rect outside, int x, int y)
+    public bool Contains (Rectangle outside, int x, int y)
     {
-        Rect inside = GetInside (outside);
+        Rectangle inside = GetInside (outside);
 
         return outside.Contains (x, y) && !inside.Contains (x, y);
     }
@@ -111,11 +111,11 @@ public class Thickness : IEquatable<Thickness>
     /// <param name="rect">The location and size of the rectangle that bounds the thickness rectangle, in screen coordinates.</param>
     /// <param name="label">The diagnostics label to draw on the bottom of the <see cref="Bottom"/>.</param>
     /// <returns>The inner rectangle remaining to be drawn.</returns>
-    public Rect Draw (Rect rect, string label = null)
+    public Rectangle Draw (Rectangle rect, string label = null)
     {
         if (rect.Size.Width < 1 || rect.Size.Height < 1)
         {
-            return Rect.Empty;
+            return Rectangle.Empty;
         }
 
         var clearChar = (Rune)' ';
@@ -141,20 +141,20 @@ public class Thickness : IEquatable<Thickness>
         // Draw the Top side
         if (Top > 0)
         {
-            Application.Driver.FillRect (new Rect (rect.X, rect.Y, rect.Width, Math.Min (rect.Height, Top)), topChar);
+            Application.Driver.FillRect (new Rectangle (rect.X, rect.Y, rect.Width, Math.Min (rect.Height, Top)), topChar);
         }
 
         // Draw the Left side
         if (Left > 0)
         {
-            Application.Driver.FillRect (new Rect (rect.X, rect.Y, Math.Min (rect.Width, Left), rect.Height), leftChar);
+            Application.Driver.FillRect (new Rectangle (rect.X, rect.Y, Math.Min (rect.Width, Left), rect.Height), leftChar);
         }
 
         // Draw the Right side			
         if (Right > 0)
         {
             Application.Driver.FillRect (
-                                         new Rect (
+                                         new Rectangle (
                                                    Math.Max (0, rect.X + rect.Width - Right),
                                                    rect.Y,
                                                    Math.Min (rect.Width, Right),
@@ -168,7 +168,7 @@ public class Thickness : IEquatable<Thickness>
         if (Bottom > 0)
         {
             Application.Driver.FillRect (
-                                         new Rect (
+                                         new Rectangle (
                                                    rect.X,
                                                    rect.Y + Math.Max (0, rect.Height - Bottom),
                                                    rect.Width,
@@ -266,7 +266,7 @@ public class Thickness : IEquatable<Thickness>
     /// </remarks>
     /// <param name="rect">The source rectangle</param>
     /// <returns></returns>
-    public Rect GetInside (Rect rect)
+    public Rectangle GetInside (Rectangle rect)
     {
         int x = rect.X + Left;
         int y = rect.Y + Top;

+ 3 - 3
Terminal.Gui/Text/Autocomplete/PopupAutocomplete.cs

@@ -357,14 +357,14 @@ public abstract partial class PopupAutocomplete : AutocompleteBase
 
         if (PopupInsideContainer)
         {
-            popup.Frame = new Rect (
+            popup.Frame = new Rectangle (
                                     new Point (HostControl.Frame.X + renderAt.X, HostControl.Frame.Y + renderAt.Y),
                                     new Size (width, height)
                                    );
         }
         else
         {
-            popup.Frame = new Rect (
+            popup.Frame = new Rectangle (
                                     new Point (HostControl.Frame.X + renderAt.X, renderAt.Y),
                                     new Size (width, height)
                                    );
@@ -520,7 +520,7 @@ public abstract partial class PopupAutocomplete : AutocompleteBase
     {
         if (Visible && popup is null)
         {
-            popup = new Popup (this) { Frame = Rect.Empty };
+            popup = new Popup (this) { Frame = Rectangle.Empty };
             top?.Add (popup);
         }
 

+ 9 - 9
Terminal.Gui/Text/TextFormatter.cs

@@ -216,7 +216,7 @@ public class TextFormatter
     /// <summary>Gets or sets whether the <see cref="TextFormatter"/> needs to format the text.</summary>
     /// <remarks>
     ///     <para>If <see langword="false"/> when Draw is called, the Draw call will be faster.</para>
-    ///     <para>Used by <see cref="Draw(Rect, Attribute, Attribute, Rect, bool, ConsoleDriver)"/></para>
+    ///     <para>Used by <see cref="Draw(Rectangle, Attribute, Attribute, Rectangle, bool, ConsoleDriver)"/></para>
     ///     <para>Set to <see langword="true"/> when any of the properties of <see cref="TextFormatter"/> are set.</para>
     ///     <para>Set to <see langword="false"/> when the text is formatted (if <see cref="GetLines"/> is accessed).</para>
     /// </remarks>
@@ -307,10 +307,10 @@ public class TextFormatter
     /// <param name="driver">The console driver currently used by the application.</param>
     /// <exception cref="ArgumentOutOfRangeException"></exception>
     public void Draw (
-        Rect bounds,
+        Rectangle bounds,
         Attribute normalColor,
         Attribute hotColor,
-        Rect containerBounds = default,
+        Rectangle containerBounds = default,
         ConsoleDriver driver = null
     )
     {
@@ -338,13 +338,13 @@ public class TextFormatter
         }
 
         bool isVertical = IsVerticalDirection (Direction);
-        Rect maxBounds = bounds;
+        Rectangle maxBounds = bounds;
 
         if (driver is { })
         {
-            maxBounds = containerBounds == default (Rect)
+            maxBounds = containerBounds == default (Rectangle)
                             ? bounds
-                            : new Rect (
+                            : new Rectangle (
                                         Math.Max (containerBounds.X, bounds.X),
                                         Math.Max (containerBounds.Y, bounds.Y),
                                         Math.Max (
@@ -1851,7 +1851,7 @@ public class TextFormatter
     /// <param name="direction">The text direction.</param>
     /// <param name="tabWidth">The number of columns used for a tab.</param>
     /// <returns></returns>
-    public static Rect CalcRect (
+    public static Rectangle CalcRect (
         int x,
         int y,
         string text,
@@ -1861,7 +1861,7 @@ public class TextFormatter
     {
         if (string.IsNullOrEmpty (text))
         {
-            return new Rect (new Point (x, y), Size.Empty);
+            return new Rectangle (new Point (x, y), Size.Empty);
         }
 
         int w, h;
@@ -1978,7 +1978,7 @@ public class TextFormatter
             h = vh;
         }
 
-        return new Rect (x, y, w, h);
+        return new Rectangle (x, y, w, h);
     }
 
     /// <summary>Finds the HotKey and its location in text.</summary>

+ 19 - 19
Terminal.Gui/Types/Rect.cs → Terminal.Gui/Types/Rectangle.cs

@@ -11,7 +11,7 @@
 namespace Terminal.Gui;
 
 /// <summary>Stores a set of four integers that represent the location and size of a rectangle</summary>
-public struct Rect
+public struct Rectangle
 {
     private int width;
     private int height;
@@ -54,18 +54,18 @@ public struct Rect
 
     /// <summary>Empty Shared Field</summary>
     /// <remarks>An uninitialized Rectangle Structure.</remarks>
-    public static readonly Rect Empty;
+    public static readonly Rectangle Empty;
 
     /// <summary>FromLTRB Shared Method</summary>
     /// <remarks>Produces a Rectangle structure from left, top, right and bottom coordinates.</remarks>
-    public static Rect FromLTRB (
+    public static Rectangle FromLTRB (
         int left,
         int top,
         int right,
         int bottom
     )
     {
-        return new Rect (
+        return new Rectangle (
                          left,
                          top,
                          right - left,
@@ -78,9 +78,9 @@ public struct Rect
     ///     Produces a new Rect by inflating an existing Rect by the specified coordinate values. The rectangle is
     ///     enlarged in both directions along an axis.
     /// </remarks>
-    public static Rect Inflate (Rect rect, int x, int y)
+    public static Rectangle Inflate (Rectangle rect, int x, int y)
     {
-        var r = new Rect (rect.Location, rect.Size);
+        var r = new Rectangle (rect.Location, rect.Size);
         r.Inflate (x, y);
 
         return r;
@@ -110,7 +110,7 @@ public struct Rect
 
     /// <summary>Intersect Shared Method</summary>
     /// <remarks>Produces a new Rectangle by intersecting 2 existing Rectangles. Returns Empty if there is no intersection.</remarks>
-    public static Rect Intersect (Rect a, Rect b)
+    public static Rectangle Intersect (Rectangle a, Rectangle b)
     {
         // MS.NET returns a non-empty rectangle if the two rectangles
         // touch each other
@@ -129,11 +129,11 @@ public struct Rect
 
     /// <summary>Intersect Method</summary>
     /// <remarks>Replaces the Rectangle with the intersection of itself and another Rectangle.</remarks>
-    public void Intersect (Rect rect) { this = Intersect (this, rect); }
+    public void Intersect (Rectangle rect) { this = Intersect (this, rect); }
 
     /// <summary>Produces the uninion of two rectangles.</summary>
     /// <remarks>Produces a new Rectangle from the union of 2 existing Rectangles.</remarks>
-    public static Rect Union (Rect a, Rect b)
+    public static Rectangle Union (Rectangle a, Rectangle b)
     {
         //int x1 = Math.Min (a.X, b.X);
         //int x2 = Math.Max (a.X + a.Width, b.X + b.Width);
@@ -146,7 +146,7 @@ public struct Rect
         int y1 = Math.Min (a.Y, b.Y);
         int y2 = Math.Max (a.Y + Math.Abs (a.Height), b.Y + Math.Abs (b.Height));
 
-        return new Rect (x1, y1, x2 - x1, y2 - y1);
+        return new Rectangle (x1, y1, x2 - x1, y2 - y1);
     }
 
     /// <summary>Equality Operator</summary>
@@ -154,14 +154,14 @@ public struct Rect
     ///     Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size
     ///     properties of the two Rectangles.
     /// </remarks>
-    public static bool operator == (Rect left, Rect right) { return left.Location == right.Location && left.Size == right.Size; }
+    public static bool operator == (Rectangle left, Rectangle right) { return left.Location == right.Location && left.Size == right.Size; }
 
     /// <summary>Inequality Operator</summary>
     /// <remarks>
     ///     Compares two Rectangle objects. The return value is based on the equivalence of the Location and Size
     ///     properties of the two Rectangles.
     /// </remarks>
-    public static bool operator != (Rect left, Rect right) { return left.Location != right.Location || left.Size != right.Size; }
+    public static bool operator != (Rectangle left, Rectangle right) { return left.Location != right.Location || left.Size != right.Size; }
 
     // -----------------------
     // Public Constructors
@@ -169,7 +169,7 @@ public struct Rect
 
     /// <summary>Rectangle Constructor</summary>
     /// <remarks>Creates a Rectangle from Point and Size values.</remarks>
-    public Rect (Point location, Size size)
+    public Rectangle (Point location, Size size)
     {
         X = location.X;
         Y = location.Y;
@@ -181,7 +181,7 @@ public struct Rect
 
     /// <summary>Rectangle Constructor</summary>
     /// <remarks>Creates a Rectangle from a specified x,y location and width and height values.</remarks>
-    public Rect (int x, int y, int width, int height)
+    public Rectangle (int x, int y, int width, int height)
     {
         X = x;
         Y = y;
@@ -245,18 +245,18 @@ public struct Rect
 
     /// <summary>Contains Method</summary>
     /// <remarks>Checks if a Rectangle lies entirely within this Rectangle.</remarks>
-    public bool Contains (Rect rect) { return rect == Intersect (this, rect); }
+    public bool Contains (Rectangle rect) { return rect == Intersect (this, rect); }
 
     /// <summary>Equals Method</summary>
     /// <remarks>Checks equivalence of this Rectangle and another object.</remarks>
     public override bool Equals (object obj)
     {
-        if (!(obj is Rect))
+        if (!(obj is Rectangle))
         {
             return false;
         }
 
-        return this == (Rect)obj;
+        return this == (Rectangle)obj;
     }
 
     /// <summary>GetHashCode Method</summary>
@@ -265,9 +265,9 @@ public struct Rect
 
     /// <summary>IntersectsWith Method</summary>
     /// <remarks>Checks if a Rectangle intersects with this one.</remarks>
-    public bool IntersectsWith (Rect rect) { return !(Left >= rect.Right || Right <= rect.Left || Top >= rect.Bottom || Bottom <= rect.Top); }
+    public bool IntersectsWith (Rectangle rect) { return !(Left >= rect.Right || Right <= rect.Left || Top >= rect.Bottom || Bottom <= rect.Top); }
 
-    private bool IntersectsWithInclusive (Rect r) { return !(Left > r.Right || Right < r.Left || Top > r.Bottom || Bottom < r.Top); }
+    private bool IntersectsWithInclusive (Rectangle r) { return !(Left > r.Right || Right < r.Left || Top > r.Bottom || Bottom < r.Top); }
 
     /// <summary>Offset Method</summary>
     /// <remarks>Moves the Rectangle a specified distance.</remarks>

+ 8 - 8
Terminal.Gui/Types/RectangleF.cs

@@ -143,19 +143,19 @@ public struct RectangleF : IEquatable<RectangleF>
 
     /// <summary>
     ///     Determines if the specified point is contained within the rectangular region defined by this
-    ///     <see cref='Terminal.Gui.Rect'/> .
+    ///     <see cref='Rectangle'/> .
     /// </summary>
     public bool Contains (float x, float y) { return X <= x && x < X + Width && Y <= y && y < Y + Height; }
 
     /// <summary>
     ///     Determines if the specified point is contained within the rectangular region defined by this
-    ///     <see cref='Terminal.Gui.Rect'/> .
+    ///     <see cref='Rectangle'/> .
     /// </summary>
     public bool Contains (PointF pt) { return Contains (pt.X, pt.Y); }
 
     /// <summary>
     ///     Determines if the rectangular region represented by <paramref name="rect"/> is entirely contained within the
-    ///     rectangular region represented by this <see cref='Terminal.Gui.Rect'/> .
+    ///     rectangular region represented by this <see cref='Rectangle'/> .
     /// </summary>
     public bool Contains (RectangleF rect)
     {
@@ -168,7 +168,7 @@ public struct RectangleF : IEquatable<RectangleF>
     /// <summary>Gets the hash code for this <see cref='Terminal.Gui.RectangleF'/>.</summary>
     public override int GetHashCode () { return (Height.GetHashCode () + Width.GetHashCode ()) ^ (X.GetHashCode () + Y.GetHashCode ()); }
 
-    /// <summary>Inflates this <see cref='Terminal.Gui.Rect'/> by the specified amount.</summary>
+    /// <summary>Inflates this <see cref='Rectangle'/> by the specified amount.</summary>
     public void Inflate (float x, float y)
     {
         X -= x;
@@ -177,10 +177,10 @@ public struct RectangleF : IEquatable<RectangleF>
         Height += 2 * y;
     }
 
-    /// <summary>Inflates this <see cref='Terminal.Gui.Rect'/> by the specified amount.</summary>
+    /// <summary>Inflates this <see cref='Rectangle'/> by the specified amount.</summary>
     public void Inflate (SizeF size) { Inflate (size.Width, size.Height); }
 
-    /// <summary>Creates a <see cref='Terminal.Gui.Rect'/> that is inflated by the specified amount.</summary>
+    /// <summary>Creates a <see cref='Rectangle'/> that is inflated by the specified amount.</summary>
     public static RectangleF Inflate (RectangleF rect, float x, float y)
     {
         RectangleF r = rect;
@@ -249,8 +249,8 @@ public struct RectangleF : IEquatable<RectangleF>
         Y += y;
     }
 
-    /// <summary>Converts the specified <see cref='Terminal.Gui.Rect'/> to a <see cref='Terminal.Gui.RectangleF'/>.</summary>
-    public static implicit operator RectangleF (Rect r) { return new RectangleF (r.X, r.Y, r.Width, r.Height); }
+    /// <summary>Converts the specified <see cref='Rectangle'/> to a <see cref='Terminal.Gui.RectangleF'/>.</summary>
+    public static implicit operator RectangleF (Rectangle r) { return new RectangleF (r.X, r.Y, r.Width, r.Height); }
 
     /// <summary>
     ///     Converts the <see cref='Terminal.Gui.RectangleF.Location'/> and <see cref='Terminal.Gui.RectangleF.Size'/> of

+ 8 - 8
Terminal.Gui/View/Adornment/Adornment.cs

@@ -31,9 +31,9 @@ public class Adornment : View
     public Adornment (View parent) { Parent = parent; }
 
     /// <summary>Gets the rectangle that describes the inner area of the Adornment. The Location is always (0,0).</summary>
-    public override Rect Bounds
+    public override Rectangle Bounds
     {
-        get => Thickness?.GetInside (new Rect (Point.Empty, Frame.Size)) ?? new Rect (Point.Empty, Frame.Size);
+        get => Thickness?.GetInside (new Rectangle (Point.Empty, Frame.Size)) ?? new Rectangle (Point.Empty, Frame.Size);
         set => throw new InvalidOperationException ("It makes no sense to set Bounds of a Thickness.");
     }
 
@@ -87,7 +87,7 @@ public class Adornment : View
         // Adornments are *Children* of a View, not SubViews. Thus View.BoundsToScreen will not work.
         // To get the screen-relative coordinates of a Adornment, we need to know who
         // the Parent is
-        Rect parentFrame = Parent?.Frame ?? Frame;
+        Rectangle parentFrame = Parent?.Frame ?? Frame;
         rrow = row + parentFrame.Y;
         rcol = col + parentFrame.X;
 
@@ -97,12 +97,12 @@ public class Adornment : View
     }
 
     /// <inheritdoc/>
-    public override Rect FrameToScreen ()
+    public override Rectangle FrameToScreen ()
     {
         // Adornments are *Children* of a View, not SubViews. Thus View.FrameToScreen will not work.
         // To get the screen-relative coordinates of a Adornment, we need to know who
         // the Parent is
-        Rect ret = Parent?.Frame ?? Frame;
+        Rectangle ret = Parent?.Frame ?? Frame;
         ret.Size = Frame.Size;
 
         ret.Location = Parent?.FrameToScreen ().Location ?? ret.Location;
@@ -117,14 +117,14 @@ public class Adornment : View
     public override bool OnDrawAdornments () { return false; }
 
     /// <summary>Redraws the Adornments that comprise the <see cref="Adornment"/>.</summary>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (Thickness == Thickness.Empty)
         {
             return;
         }
 
-        Rect screenBounds = BoundsToScreen (Frame);
+        Rectangle screenBounds = BoundsToScreen (Frame);
 
         Attribute normalAttr = GetNormalColor ();
 
@@ -141,7 +141,7 @@ public class Adornment : View
             }
         }
 
-        TextFormatter?.Draw (screenBounds, normalAttr, normalAttr, Rect.Empty);
+        TextFormatter?.Draw (screenBounds, normalAttr, normalAttr, Rectangle.Empty);
 
         //base.OnDrawContent (contentArea);
     }

+ 9 - 9
Terminal.Gui/View/Adornment/Border.cs

@@ -103,10 +103,10 @@ public class Border : Adornment
     /// <param name="region">View-relative region for the frame to be drawn.</param>
     /// <param name="clear">If set to <see langword="true"/> it clear the region.</param>
     [Obsolete ("This method is obsolete in v2. Use use LineCanvas or Frame instead.", false)]
-    public void DrawFrame (Rect region, bool clear)
+    public void DrawFrame (Rectangle region, bool clear)
     {
-        Rect savedClip = ClipToBounds ();
-        Rect screenBounds = BoundsToScreen (region);
+        Rectangle savedClip = ClipToBounds ();
+        Rectangle screenBounds = BoundsToScreen (region);
 
         if (clear)
         {
@@ -196,7 +196,7 @@ public class Border : Adornment
     /// <summary>Draws the title for a Window-style view.</summary>
     /// <param name="region">Screen relative region where the title will be drawn.</param>
     /// <param name="title">The title.</param>
-    public void DrawTitle (Rect region, string title)
+    public void DrawTitle (Rectangle region, string title)
     {
         int width = region.Width;
 
@@ -213,7 +213,7 @@ public class Border : Adornment
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -223,7 +223,7 @@ public class Border : Adornment
         }
 
         //Driver.SetAttribute (Colors.ColorSchemes ["Error"].Normal);
-        Rect screenBounds = BoundsToScreen (Frame);
+        Rectangle screenBounds = BoundsToScreen (Frame);
 
         //OnDrawSubviews (bounds); 
 
@@ -232,7 +232,7 @@ public class Border : Adornment
         // The border adornment (and title) are drawn at the outermost edge of border; 
         // For Border
         // ...thickness extends outward (border/title is always as far in as possible)
-        var borderBounds = new Rect (
+        var borderBounds = new Rectangle (
                                      screenBounds.X + Math.Max (0, Thickness.Left - 1),
                                      screenBounds.Y + Math.Max (0, Thickness.Top - 1),
                                      Math.Max (
@@ -302,7 +302,7 @@ public class Border : Adornment
         {
             Attribute prevAttr = Driver.GetAttribute ();
             Driver.SetAttribute (Parent.HasFocus ? Parent.GetFocusColor () : Parent.GetNormalColor ());
-            DrawTitle (new Rect (borderBounds.X, titleY, maxTitleWidth, 1), Parent?.Title);
+            DrawTitle (new Rectangle (borderBounds.X, titleY, maxTitleWidth, 1), Parent?.Title);
             Driver.SetAttribute (prevAttr);
         }
 
@@ -491,7 +491,7 @@ public class Border : Adornment
                         Driver.SetAttribute (Parent.HasFocus ? Parent.GetHotNormalColor () : Parent.GetNormalColor ());
                     }
 
-                    DrawTitle (new Rect (borderBounds.X, titleY, Parent.Title.GetColumns (), 1), Parent?.Title);
+                    DrawTitle (new Rectangle (borderBounds.X, titleY, Parent.Title.GetColumns (), 1), Parent?.Title);
                     Driver.SetAttribute (prevAttr);
                 }
 

+ 38 - 38
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -37,7 +37,7 @@ public enum LayoutStyle
 public partial class View
 {
     private bool _autoSize;
-    private Rect _frame;
+    private Rectangle _frame;
     private Dim _height = Dim.Sized (0);
     private Dim _width = Dim.Sized (0);
     private Pos _x = Pos.At (0);
@@ -155,7 +155,7 @@ public partial class View
     ///     </para>
     ///     <para>
     ///         Altering the Bounds will eventually (when the view is next laid out) cause the
-    ///         <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/> methods to be called.
+    ///         <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
     ///         Because <see cref="Bounds"/> coordinates are relative to the upper-left corner of the <see cref="View"/>, the
@@ -163,7 +163,7 @@ public partial class View
     ///         obtain the size of the area of the view for tasks such as drawing the view's contents.
     ///     </para>
     /// </remarks>
-    public virtual Rect Bounds
+    public virtual Rectangle Bounds
     {
         get
         {
@@ -179,7 +179,7 @@ public partial class View
             // BUGBUG: I think there's a bug here. This should be && not ||
             if (Margin is null || Border is null || Padding is null)
             {
-                return new Rect (default (Point), Frame.Size);
+                return new Rectangle (default (Point), Frame.Size);
             }
 
             int width = Math.Max (
@@ -195,7 +195,7 @@ public partial class View
                                    Frame.Size.Height - Margin.Thickness.Vertical - Border.Thickness.Vertical - Padding.Thickness.Vertical
                                   );
 
-            return new Rect (Point.Empty, new Size (width, height));
+            return new Rectangle (Point.Empty, new Size (width, height));
         }
         set
         {
@@ -209,7 +209,7 @@ public partial class View
                                 );
             }
 #endif // DEBUG
-            Frame = new Rect (
+            Frame = new Rectangle (
                               Frame.Location,
                               new Size (
                                         value.Size.Width
@@ -239,16 +239,16 @@ public partial class View
     ///     <para>This causes <see cref="LayoutStyle"/> to be <see cref="LayoutStyle.Absolute"/>.</para>
     ///     <para>
     ///         Altering the Frame will eventually (when the view hierarchy is next laid out via  see
-    ///         cref="LayoutSubviews"/>) cause <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/>
+    ///         cref="LayoutSubviews"/>) cause <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/>
     ///         methods to be called.
     ///     </para>
     /// </remarks>
-    public Rect Frame
+    public Rectangle Frame
     {
         get => _frame;
         set
         {
-            _frame = new Rect (value.X, value.Y, Math.Max (value.Width, 0), Math.Max (value.Height, 0));
+            _frame = new Rectangle (value.X, value.Y, Math.Max (value.Width, 0), Math.Max (value.Height, 0));
 
             // If Frame gets set, by definition, the View is now LayoutStyle.Absolute, so
             // set all Pos/Dim to Absolute values.
@@ -273,12 +273,12 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         If set to a relative value (e.g. <see cref="Dim.Fill(int)"/>) the value is indeterminate until the view has
-    ///         been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rect)"/> has been
+    ///         been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rectangle)"/> has been
     ///         called.
     ///     </para>
     ///     <para>
     ///         Changing this property will eventually (when the view is next drawn) cause the
-    ///         <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/> methods to be called.
+    ///         <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
     ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
@@ -398,12 +398,12 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         If set to a relative value (e.g. <see cref="Dim.Fill(int)"/>) the value is indeterminate until the view has
-    ///         been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rect)"/> has been
+    ///         been initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rectangle)"/> has been
     ///         called.
     ///     </para>
     ///     <para>
     ///         Changing this property will eventually (when the view is next drawn) cause the
-    ///         <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/> methods to be called.
+    ///         <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
     ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
@@ -439,11 +439,11 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         If set to a relative value (e.g. <see cref="Pos.Center"/>) the value is indeterminate until the view has been
-    ///         initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rect)"/> has been called.
+    ///         initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rectangle)"/> has been called.
     ///     </para>
     ///     <para>
     ///         Changing this property will eventually (when the view is next drawn) cause the
-    ///         <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/> methods to be called.
+    ///         <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
     ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
@@ -466,11 +466,11 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         If set to a relative value (e.g. <see cref="Pos.Center"/>) the value is indeterminate until the view has been
-    ///         initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rect)"/> has been called.
+    ///         initialized ( <see cref="IsInitialized"/> is true) and <see cref="SetRelativeLayout(Rectangle)"/> has been called.
     ///     </para>
     ///     <para>
     ///         Changing this property will eventually (when the view is next drawn) cause the
-    ///         <see cref="LayoutSubview(View, Rect)"/> and <see cref="OnDrawContent(Rect)"/> methods to be called.
+    ///         <see cref="LayoutSubview(View, Rectangle)"/> and <see cref="OnDrawContent(Rectangle)"/> methods to be called.
     ///     </para>
     ///     <para>
     ///         Changing this property will cause <see cref="Frame"/> to be updated. If the new value is not of type
@@ -498,11 +498,11 @@ public partial class View
     public event EventHandler Initialized;
 
     /// <summary>Converts a <see cref="Bounds"/>-relative region to a screen-relative region.</summary>
-    public Rect BoundsToScreen (Rect region)
+    public Rectangle BoundsToScreen (Rectangle region)
     {
         BoundsToScreen (region.X, region.Y, out int x, out int y, false);
 
-        return new Rect (x, y, region.Width, region.Height);
+        return new Rectangle (x, y, region.Width, region.Height);
     }
 
     /// <summary>
@@ -561,7 +561,7 @@ public partial class View
             return null;
         }
 
-        Rect startFrame = start.Frame;
+        Rectangle startFrame = start.Frame;
 
         if (start.InternalSubviews is { })
         {
@@ -600,9 +600,9 @@ public partial class View
 
     /// <summary>Gets the <see cref="Frame"/> with a screen-relative location.</summary>
     /// <returns>The location and size of the view in screen-relative coordinates.</returns>
-    public virtual Rect FrameToScreen ()
+    public virtual Rectangle FrameToScreen ()
     {
-        Rect ret = Frame;
+        Rectangle ret = Frame;
         View super = SuperView;
 
         while (super is { })
@@ -683,7 +683,7 @@ public partial class View
 
         LayoutAdornments ();
 
-        Rect oldBounds = Bounds;
+        Rectangle oldBounds = Bounds;
         OnLayoutStarted (new LayoutEventArgs { OldBounds = oldBounds });
 
         SetTextFormatterSize ();
@@ -696,7 +696,7 @@ public partial class View
 
         foreach (View v in ordered)
         {
-            LayoutSubview (v, new Rect (GetBoundsOffset (), Bounds.Size));
+            LayoutSubview (v, new Rectangle (GetBoundsOffset (), Bounds.Size));
         }
 
         // If the 'to' is rooted to 'from' and the layoutstyle is Computed it's a special-case.
@@ -853,7 +853,7 @@ public partial class View
 
         if (Margin.Frame.Size != Frame.Size)
         {
-            Margin._frame = new Rect (Point.Empty, Frame.Size);
+            Margin._frame = new Rectangle (Point.Empty, Frame.Size);
             Margin.X = 0;
             Margin.Y = 0;
             Margin.Width = Frame.Size.Width;
@@ -862,11 +862,11 @@ public partial class View
             Margin.SetNeedsDisplay ();
         }
 
-        Rect border = Margin.Thickness.GetInside (Margin.Frame);
+        Rectangle border = Margin.Thickness.GetInside (Margin.Frame);
 
         if (border != Border.Frame)
         {
-            Border._frame = new Rect (new Point (border.Location.X, border.Location.Y), border.Size);
+            Border._frame = new Rectangle (new Point (border.Location.X, border.Location.Y), border.Size);
             Border.X = border.Location.X;
             Border.Y = border.Location.Y;
             Border.Width = border.Size.Width;
@@ -875,11 +875,11 @@ public partial class View
             Border.SetNeedsDisplay ();
         }
 
-        Rect padding = Border.Thickness.GetInside (Border.Frame);
+        Rectangle padding = Border.Thickness.GetInside (Border.Frame);
 
         if (padding != Padding.Frame)
         {
-            Padding._frame = new Rect (new Point (padding.Location.X, padding.Location.Y), padding.Size);
+            Padding._frame = new Rectangle (new Point (padding.Location.X, padding.Location.Y), padding.Size);
             Padding.X = padding.Location.X;
             Padding.Y = padding.Location.Y;
             Padding.Width = padding.Size.Width;
@@ -908,7 +908,7 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         Determines the relative bounds of the <see cref="View"/> and its <see cref="Frame"/>s, and then calls
-    ///         <see cref="SetRelativeLayout(Rect)"/> to update the view.
+    ///         <see cref="SetRelativeLayout(Rectangle)"/> to update the view.
     ///     </para>
     /// </remarks>
     internal void OnResizeNeeded ()
@@ -917,9 +917,9 @@ public partial class View
         // TODO: Until then leave it `internal` and non-virtual
         // First try SuperView.Bounds, then Application.Top, then Driver.Bounds.
         // Finally, if none of those are valid, use int.MaxValue (for Unit tests).
-        Rect relativeBounds = SuperView is { IsInitialized: true } ? SuperView.Bounds :
+        Rectangle relativeBounds = SuperView is { IsInitialized: true } ? SuperView.Bounds :
                               Application.Top is { } && Application.Top.IsInitialized ? Application.Top.Bounds :
-                              Application.Driver?.Bounds ?? new Rect (0, 0, int.MaxValue, int.MaxValue);
+                              Application.Driver?.Bounds ?? new Rectangle (0, 0, int.MaxValue, int.MaxValue);
         SetRelativeLayout (relativeBounds);
 
         // TODO: Determine what, if any of the below is actually needed here.
@@ -968,7 +968,7 @@ public partial class View
     ///     The rectangle describing the SuperView's Bounds (nominally the same as
     ///     <c>this.SuperView.Bounds</c>).
     /// </param>
-    internal void SetRelativeLayout (Rect superviewBounds)
+    internal void SetRelativeLayout (Rectangle superviewBounds)
     {
         Debug.Assert (_x is { });
         Debug.Assert (_y is { });
@@ -996,7 +996,7 @@ public partial class View
         // This method is called recursively if pos is Pos.PosCombine
         (int newLocation, int newDimension) GetNewLocationAndDimension (
             bool width,
-            Rect superviewBounds,
+            Rectangle superviewBounds,
             Pos pos,
             Dim dim,
             int autosizeDimension
@@ -1137,7 +1137,7 @@ public partial class View
         // vertical/height
         (newY, newH) = GetNewLocationAndDimension (false, superviewBounds, _y, _height, autosize.Height);
 
-        var r = new Rect (newX, newY, newW, newH);
+        var r = new Rectangle (newX, newY, newW, newH);
 
         if (Frame != r)
         {
@@ -1175,7 +1175,7 @@ public partial class View
             {
                 // Set the frame. Do NOT use `Frame` as it overwrites X, Y, Width, and Height, making
                 // the view LayoutStyle.Absolute.
-                _frame = new Rect (Frame.Location, autosize);
+                _frame = new Rectangle (Frame.Location, autosize);
 
                 if (autosize.Width == 0)
                 {
@@ -1391,7 +1391,7 @@ public partial class View
         return canSetWidth;
     }
 
-    private void LayoutSubview (View v, Rect contentArea)
+    private void LayoutSubview (View v, Rectangle contentArea)
     {
         //if (v.LayoutStyle == LayoutStyle.Computed) {
         v.SetRelativeLayout (contentArea);
@@ -1430,7 +1430,7 @@ public partial class View
 
         if (boundsChanged)
         {
-            Bounds = new Rect (Bounds.X, Bounds.Y, canSizeW ? rW : Bounds.Width, canSizeH ? rH : Bounds.Height);
+            Bounds = new Rectangle (Bounds.X, Bounds.Y, canSizeW ? rW : Bounds.Width, canSizeH ? rH : Bounds.Height);
         }
 
         return boundsChanged;

+ 1 - 1
Terminal.Gui/View/View.cs

@@ -73,7 +73,7 @@ namespace Terminal.Gui;
 ///         a View can be accessed with the <see cref="SuperView"/> property.
 ///     </para>
 ///     <para>
-///         To flag a region of the View's <see cref="Bounds"/> to be redrawn call <see cref="SetNeedsDisplay(Rect)"/>.
+///         To flag a region of the View's <see cref="Bounds"/> to be redrawn call <see cref="SetNeedsDisplay(Rectangle)"/>.
 ///         To flag the entire view for redraw call <see cref="SetNeedsDisplay()"/>.
 ///     </para>
 ///     <para>

+ 21 - 21
Terminal.Gui/View/ViewDrawing.cs

@@ -3,7 +3,7 @@
 public partial class View
 {
     // The view-relative region that needs to be redrawn. Marked internal for unit tests.
-    internal Rect _needsDisplayRect = Rect.Empty;
+    internal Rectangle _needsDisplayRect = Rectangle.Empty;
     private ColorScheme _colorScheme;
 
     /// <summary>The color scheme for this view, if it is not defined, it returns the <see cref="SuperView"/>'s color scheme.</summary>
@@ -35,7 +35,7 @@ public partial class View
     /// <summary>Gets or sets whether the view needs to be redrawn.</summary>
     public bool NeedsDisplay
     {
-        get => _needsDisplayRect != Rect.Empty;
+        get => _needsDisplayRect != Rectangle.Empty;
         set
         {
             if (value)
@@ -98,7 +98,7 @@ public partial class View
     /// <summary>Clears the specified screen-relative rectangle with the normal background.</summary>
     /// <remarks></remarks>
     /// <param name="regionScreen">The screen-relative rectangle to clear.</param>
-    public void Clear (Rect regionScreen)
+    public void Clear (Rectangle regionScreen)
     {
         if (Driver is null)
         {
@@ -118,18 +118,18 @@ public partial class View
     /// <remarks>
     ///     <para>
     ///         If <see cref="ConsoleDriver.Clip"/> and <see cref="Bounds"/> do not intersect, the clip region will be set to
-    ///         <see cref="Rect.Empty"/>.
+    ///         <see cref="Rectangle.Empty"/>.
     ///     </para>
     /// </remarks>
-    public Rect ClipToBounds ()
+    public Rectangle ClipToBounds ()
     {
         if (Driver is null)
         {
-            return Rect.Empty;
+            return Rectangle.Empty;
         }
 
-        Rect previous = Driver.Clip;
-        Driver.Clip = Rect.Intersect (previous, BoundsToScreen (Bounds));
+        Rectangle previous = Driver.Clip;
+        Driver.Clip = Rectangle.Intersect (previous, BoundsToScreen (Bounds));
 
         return previous;
     }
@@ -140,7 +140,7 @@ public partial class View
     /// </summary>
     /// <remarks>
     ///     <para>
-    ///         Always use <see cref="Bounds"/> (view-relative) when calling <see cref="OnDrawContent(Rect)"/>, NOT
+    ///         Always use <see cref="Bounds"/> (view-relative) when calling <see cref="OnDrawContent(Rectangle)"/>, NOT
     ///         <see cref="Frame"/> (superview-relative).
     ///     </para>
     ///     <para>
@@ -148,7 +148,7 @@ public partial class View
     ///         was set globally on the driver.
     ///     </para>
     ///     <para>
-    ///         Overrides of <see cref="OnDrawContent(Rect)"/> must ensure they do not set <c>Driver.Clip</c> to a clip
+    ///         Overrides of <see cref="OnDrawContent(Rectangle)"/> must ensure they do not set <c>Driver.Clip</c> to a clip
     ///         region larger than the <ref name="Bounds"/> property, as this will cause the driver to clip the entire region.
     ///     </para>
     /// </remarks>
@@ -161,7 +161,7 @@ public partial class View
 
         OnDrawAdornments ();
 
-        Rect prevClip = ClipToBounds ();
+        Rectangle prevClip = ClipToBounds ();
 
         if (ColorScheme is { })
         {
@@ -367,7 +367,7 @@ public partial class View
     ///     <see cref="View"/>
     /// </param>
     /// <remarks>This method will be called before any subviews added with <see cref="Add(View)"/> have been drawn.</remarks>
-    public virtual void OnDrawContent (Rect contentArea)
+    public virtual void OnDrawContent (Rectangle contentArea)
     {
         if (NeedsDisplay)
         {
@@ -389,7 +389,7 @@ public partial class View
                                  BoundsToScreen (contentArea),
                                  HasFocus ? GetFocusColor () : GetNormalColor (),
                                  HasFocus ? ColorScheme.HotFocus : GetHotNormalColor (),
-                                 Rect.Empty
+                                 Rectangle.Empty
                                 );
             SetSubViewNeedsDisplay ();
         }
@@ -434,7 +434,7 @@ public partial class View
     ///     This method will be called after any subviews removed with <see cref="Remove(View)"/> have been completed
     ///     drawing.
     /// </remarks>
-    public virtual void OnDrawContentComplete (Rect contentArea) { DrawContentComplete?.Invoke (this, new DrawEventArgs (contentArea)); }
+    public virtual void OnDrawContentComplete (Rectangle contentArea) { DrawContentComplete?.Invoke (this, new DrawEventArgs (contentArea)); }
 
     // TODO: Make this cancelable
     /// <summary>
@@ -451,7 +451,7 @@ public partial class View
         }
 
         // If we have a SuperView, it'll render our frames.
-        if (!SuperViewRendersLineCanvas && LineCanvas.Bounds != Rect.Empty)
+        if (!SuperViewRendersLineCanvas && LineCanvas.Bounds != Rectangle.Empty)
         {
             foreach (KeyValuePair<Point, Cell> p in LineCanvas.GetCellMap ())
             {
@@ -510,7 +510,7 @@ public partial class View
     ///     redrawn will be the <paramref name="region"/>.
     /// </remarks>
     /// <param name="region">The Bounds-relative region that needs to be redrawn.</param>
-    public void SetNeedsDisplay (Rect region)
+    public void SetNeedsDisplay (Rectangle region)
     {
         if (!IsInitialized)
         {
@@ -529,7 +529,7 @@ public partial class View
             int y = Math.Min (_needsDisplayRect.Y, region.Y);
             int w = Math.Max (_needsDisplayRect.Width, region.Width);
             int h = Math.Max (_needsDisplayRect.Height, region.Height);
-            _needsDisplayRect = new Rect (x, y, w, h);
+            _needsDisplayRect = new Rectangle (x, y, w, h);
         }
 
         _superView?.SetSubViewNeedsDisplay ();
@@ -553,7 +553,7 @@ public partial class View
         {
             if (subview.Frame.IntersectsWith (region))
             {
-                Rect subviewRegion = Rect.Intersect (subview.Frame, region);
+                Rectangle subviewRegion = Rectangle.Intersect (subview.Frame, region);
                 subviewRegion.X -= subview.Frame.X;
                 subviewRegion.Y -= subview.Frame.Y;
                 subview.SetNeedsDisplay (subviewRegion);
@@ -575,12 +575,12 @@ public partial class View
     /// <summary>Clears <see cref="NeedsDisplay"/> and <see cref="SubViewNeedsDisplay"/>.</summary>
     protected void ClearNeedsDisplay ()
     {
-        _needsDisplayRect = Rect.Empty;
+        _needsDisplayRect = Rectangle.Empty;
         SubViewNeedsDisplay = false;
     }
 
     // Clips a rectangle in screen coordinates to the dimensions currently available on the screen
-    internal Rect ScreenClip (Rect regionScreen)
+    internal Rectangle ScreenClip (Rectangle regionScreen)
     {
         int x = regionScreen.X < 0 ? 0 : regionScreen.X;
         int y = regionScreen.Y < 0 ? 0 : regionScreen.Y;
@@ -593,6 +593,6 @@ public partial class View
                     ? Driver.Rows - regionScreen.Y
                     : regionScreen.Height;
 
-        return new Rect (x, y, w, h);
+        return new Rectangle (x, y, w, h);
     }
 }

+ 3 - 3
Terminal.Gui/View/ViewEventArgs.cs

@@ -19,7 +19,7 @@ public class ViewEventArgs : EventArgs
 public class LayoutEventArgs : EventArgs
 {
     /// <summary>The view-relative bounds of the <see cref="View"/> before it was laid out.</summary>
-    public Rect OldBounds { get; set; }
+    public Rectangle OldBounds { get; set; }
 }
 
 /// <summary>Event args for draw events</summary>
@@ -30,13 +30,13 @@ public class DrawEventArgs : EventArgs
     ///     Gets the view-relative rectangle describing the currently visible viewport into the
     ///     <see cref="View"/>.
     /// </param>
-    public DrawEventArgs (Rect rect) { Rect = rect; }
+    public DrawEventArgs (Rectangle rect) { Rectangle = rect; }
 
     /// <summary>If set to true, the draw operation will be canceled, if applicable.</summary>
     public bool Cancel { get; set; }
 
     /// <summary>Gets the view-relative rectangle describing the currently visible viewport into the <see cref="View"/>.</summary>
-    public Rect Rect { get; }
+    public Rectangle Rectangle { get; }
 }
 
 /// <summary>Defines the event arguments for <see cref="View.SetFocus()"/></summary>

+ 1 - 1
Terminal.Gui/View/ViewSubViews.cs

@@ -193,7 +193,7 @@ public partial class View
             return;
         }
 
-        Rect touched = view.Frame;
+        Rectangle touched = view.Frame;
         _subviews.Remove (view);
         _tabIndexes.Remove (view);
         view._superView = null;

+ 5 - 5
Terminal.Gui/View/ViewText.cs

@@ -133,7 +133,7 @@ public partial class View
             y = Bounds.Y;
         }
 
-        Rect rect = TextFormatter.CalcRect (x, y, TextFormatter.Text, TextFormatter.Direction);
+        Rectangle rect = TextFormatter.CalcRect (x, y, TextFormatter.Text, TextFormatter.Direction);
 
         int newWidth = rect.Size.Width
                        - GetHotKeySpecifierLength ()
@@ -232,7 +232,7 @@ public partial class View
 
     private bool IsValidAutoSize (out Size autoSize)
     {
-        Rect rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
+        Rectangle rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
 
         autoSize = new Size (
                              rect.Size.Width - GetHotKeySpecifierLength (),
@@ -246,7 +246,7 @@ public partial class View
 
     private bool IsValidAutoSizeHeight (Dim height)
     {
-        Rect rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
+        Rectangle rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
         int dimValue = height.Anchor (0);
 
         return !((ValidatePosDim && !(height is Dim.DimAbsolute))
@@ -255,7 +255,7 @@ public partial class View
 
     private bool IsValidAutoSizeWidth (Dim width)
     {
-        Rect rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
+        Rectangle rect = TextFormatter.CalcRect (_frame.X, _frame.Y, TextFormatter.Text, TextDirection);
         int dimValue = width.Anchor (0);
 
         return !((ValidatePosDim && !(width is Dim.DimAbsolute))
@@ -340,7 +340,7 @@ public partial class View
             // TODO: This is a hack.
             //_width  = size.Width;
             //_height = size.Height;
-            _frame = new Rect (_frame.Location, size);
+            _frame = new Rectangle (_frame.Location, size);
 
             //throw new InvalidOperationException ("This is a hack.");
             return true;

+ 3 - 3
Terminal.Gui/Views/ColorPicker.cs

@@ -157,7 +157,7 @@ public class ColorPicker : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -223,11 +223,11 @@ public class ColorPicker : View
 
         if (selected)
         {
-            DrawFocusRect (new Rect (x * BoxWidth, y * BoxHeight, BoxWidth, BoxHeight));
+            DrawFocusRect (new Rectangle (x * BoxWidth, y * BoxHeight, BoxWidth, BoxHeight));
         }
     }
 
-    private void DrawFocusRect (Rect rect)
+    private void DrawFocusRect (Rectangle rect)
     {
         var lc = new LineCanvas ();
 

+ 4 - 4
Terminal.Gui/Views/ComboBox.cs

@@ -282,7 +282,7 @@ public class ComboBox : View
     public virtual void OnCollapsed () { Collapsed?.Invoke (this, EventArgs.Empty); }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -488,7 +488,7 @@ public class ComboBox : View
             OnOpenSelectedItem ();
         }
 
-        Rect rect = _listview.BoundsToScreen (_listview.IsInitialized ? _listview.Bounds : Rect.Empty);
+        Rectangle rect = _listview.BoundsToScreen (_listview.IsInitialized ? _listview.Bounds : Rectangle.Empty);
         Reset (true);
         _listview.Clear (rect);
         _listview.TabStop = false;
@@ -834,12 +834,12 @@ public class ComboBox : View
             return res;
         }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             Attribute current = ColorScheme.Focus;
             Driver.SetAttribute (current);
             Move (0, 0);
-            Rect f = Frame;
+            Rectangle f = Frame;
             int item = TopItem;
             bool focused = HasFocus;
             int col = AllowsMarking ? 2 : 0;

+ 2 - 2
Terminal.Gui/Views/FileDialog.cs

@@ -407,7 +407,7 @@ public class FileDialog : Dialog
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -516,7 +516,7 @@ public class FileDialog : Dialog
 
             _allowedTypeMenuBar.DrawContentComplete += (s, e) =>
                                                        {
-                                                           _allowedTypeMenuBar.Move (e.Rect.Width - 1, 0);
+                                                           _allowedTypeMenuBar.Move (e.Rectangle.Width - 1, 0);
                                                            Driver.AddRune (Glyphs.DownArrow);
                                                        };
 

+ 2 - 2
Terminal.Gui/Views/GraphView/Annotations.cs

@@ -108,14 +108,14 @@ public class LegendAnnotation : View, IAnnotation
     private readonly List<Tuple<GraphCellToRender, string>> _entries = new ();
 
     /// <summary>Creates a new empty legend at the empty screen coordinates.</summary>
-    public LegendAnnotation () : this (Rect.Empty) { }
+    public LegendAnnotation () : this (Rectangle.Empty) { }
 
     /// <summary>Creates a new empty legend at the given screen coordinates.</summary>
     /// <param name="legendBounds">
     ///     Defines the area available for the legend to render in (within the graph).  This is in
     ///     screen units (i.e. not graph space)
     /// </param>
-    public LegendAnnotation (Rect legendBounds)
+    public LegendAnnotation (Rectangle legendBounds)
     {
         X = legendBounds.X;
         Y = legendBounds.Y;

+ 6 - 6
Terminal.Gui/Views/GraphView/Axis.cs

@@ -140,7 +140,7 @@ public class HorizontalAxis : Axis
             return;
         }
 
-        Rect bounds = graph.Bounds;
+        Rectangle bounds = graph.Bounds;
 
         IEnumerable<AxisIncrementToRender> labels = GetLabels (graph, bounds);
 
@@ -174,7 +174,7 @@ public class HorizontalAxis : Axis
             return;
         }
 
-        Rect bounds = graph.Bounds;
+        Rectangle bounds = graph.Bounds;
 
         graph.Move (0, 0);
 
@@ -225,7 +225,7 @@ public class HorizontalAxis : Axis
         Application.Driver.AddRune (Glyphs.HLine);
     }
 
-    private IEnumerable<AxisIncrementToRender> GetLabels (GraphView graph, Rect bounds)
+    private IEnumerable<AxisIncrementToRender> GetLabels (GraphView graph, Rectangle bounds)
     {
         // if no labels
         if (Increment == 0)
@@ -317,7 +317,7 @@ public class VerticalAxis : Axis
             return;
         }
 
-        Rect bounds = graph.Bounds;
+        Rectangle bounds = graph.Bounds;
         IEnumerable<AxisIncrementToRender> labels = GetLabels (graph, bounds);
 
         foreach (AxisIncrementToRender label in labels)
@@ -356,7 +356,7 @@ public class VerticalAxis : Axis
             return;
         }
 
-        Rect bounds = graph.Bounds;
+        Rectangle bounds = graph.Bounds;
 
         int x = GetAxisXPosition (graph);
 
@@ -412,7 +412,7 @@ public class VerticalAxis : Axis
         return graph.Bounds.Height;
     }
 
-    private IEnumerable<AxisIncrementToRender> GetLabels (GraphView graph, Rect bounds)
+    private IEnumerable<AxisIncrementToRender> GetLabels (GraphView graph, Rectangle bounds)
     {
         // if no labels
         if (Increment == 0)

+ 3 - 3
Terminal.Gui/Views/GraphView/GraphView.cs

@@ -197,7 +197,7 @@ public class GraphView : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (CellSize.X == 0 || CellSize.Y == 0)
         {
@@ -256,7 +256,7 @@ public class GraphView : View
 
         SetDriverColorToGraphColor ();
 
-        var drawBounds = new Rect ((int)MarginLeft, 0, graphScreenWidth, graphScreenHeight);
+        var drawBounds = new Rectangle ((int)MarginLeft, 0, graphScreenWidth, graphScreenHeight);
 
         RectangleF graphSpace = ScreenToGraphSpace (drawBounds);
 
@@ -325,7 +325,7 @@ public class GraphView : View
     /// <summary>Returns the section of the graph that is represented by the screen area.</summary>
     /// <param name="screenArea"></param>
     /// <returns></returns>
-    public RectangleF ScreenToGraphSpace (Rect screenArea)
+    public RectangleF ScreenToGraphSpace (Rectangle screenArea)
     {
         // get position of the bottom left
         RectangleF pos = ScreenToGraphSpace (screenArea.Left, screenArea.Bottom - 1);

+ 4 - 4
Terminal.Gui/Views/GraphView/Series.cs

@@ -12,7 +12,7 @@ public interface ISeries
     /// <param name="graph">Graph series is to be drawn onto</param>
     /// <param name="drawBounds">Visible area of the graph in Console Screen units (excluding margins)</param>
     /// <param name="graphBounds">Visible area of the graph in Graph space units</param>
-    void DrawSeries (GraphView graph, Rect drawBounds, RectangleF graphBounds);
+    void DrawSeries (GraphView graph, Rectangle drawBounds, RectangleF graphBounds);
 }
 
 /// <summary>Series composed of any number of discrete data points</summary>
@@ -29,7 +29,7 @@ public class ScatterSeries : ISeries
     public List<PointF> Points { get; set; } = new ();
 
     /// <summary>Draws all points directly onto the graph</summary>
-    public void DrawSeries (GraphView graph, Rect drawBounds, RectangleF graphBounds)
+    public void DrawSeries (GraphView graph, Rectangle drawBounds, RectangleF graphBounds)
     {
         if (Fill.Color.HasValue)
         {
@@ -105,7 +105,7 @@ public class MultiBarSeries : ISeries
     /// <param name="graph"></param>
     /// <param name="drawBounds"></param>
     /// <param name="graphBounds"></param>
-    public void DrawSeries (GraphView graph, Rect drawBounds, RectangleF graphBounds)
+    public void DrawSeries (GraphView graph, Rectangle drawBounds, RectangleF graphBounds)
     {
         foreach (BarSeries bar in subSeries)
         {
@@ -172,7 +172,7 @@ public class BarSeries : ISeries
     /// <param name="graph"></param>
     /// <param name="drawBounds">Screen area of the graph excluding margins</param>
     /// <param name="graphBounds">Graph space area that should be drawn into <paramref name="drawBounds"/></param>
-    public virtual void DrawSeries (GraphView graph, Rect drawBounds, RectangleF graphBounds)
+    public virtual void DrawSeries (GraphView graph, Rectangle drawBounds, RectangleF graphBounds)
     {
         for (var i = 0; i < Bars.Count; i++)
         {

+ 4 - 4
Terminal.Gui/Views/HexView.cs

@@ -344,7 +344,7 @@ public class HexView : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Attribute currentAttribute;
         Attribute current = ColorScheme.Focus;
@@ -352,7 +352,7 @@ public class HexView : View
         Move (0, 0);
 
         // BUGBUG: Bounds!!!!
-        Rect frame = Frame;
+        Rectangle frame = Frame;
 
         int nblocks = bytesPerLine / bsize;
         var data = new byte [nblocks * bsize * frame.Height];
@@ -364,7 +364,7 @@ public class HexView : View
 
         for (var line = 0; line < frame.Height; line++)
         {
-            var lineRect = new Rect (0, line, frame.Width, 1);
+            var lineRect = new Rectangle (0, line, frame.Width, 1);
 
             if (!Bounds.Contains (lineRect))
             {
@@ -787,7 +787,7 @@ public class HexView : View
         int line = delta / bytesPerLine;
 
         // BUGBUG: Bounds!
-        SetNeedsDisplay (new Rect (0, line, Frame.Width, 1));
+        SetNeedsDisplay (new Rectangle (0, line, Frame.Width, 1));
     }
 
     private bool ToggleSide ()

+ 2 - 2
Terminal.Gui/Views/Line.cs

@@ -15,7 +15,7 @@ public class Line : View
     /// <inheritdoc/>
     public override bool OnDrawAdornments ()
     {
-        Rect screenBounds = BoundsToScreen (Bounds);
+        Rectangle screenBounds = BoundsToScreen (Bounds);
         LineCanvas lc;
 
         lc = SuperView?.LineCanvas;
@@ -37,5 +37,5 @@ public class Line : View
     //}
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea) { OnDrawAdornments (); }
+    public override void OnDrawContent (Rectangle contentArea) { OnDrawAdornments (); }
 }

+ 1 - 1
Terminal.Gui/Views/LineView.cs

@@ -54,7 +54,7 @@ public class LineView : View
     public Rune? StartingAnchor { get; set; }
 
     /// <summary>Draws the line including any starting/ending anchors</summary>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 

+ 2 - 2
Terminal.Gui/Views/ListView.cs

@@ -615,14 +615,14 @@ public class ListView : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
         Attribute current = ColorScheme.Focus;
         Driver.SetAttribute (current);
         Move (0, 0);
-        Rect f = Bounds;
+        Rectangle f = Bounds;
         int item = _top;
         bool focused = HasFocus;
         int col = _allowsMarking ? 2 : 0;

+ 2 - 2
Terminal.Gui/Views/Menu/ContextMenu.cs

@@ -142,7 +142,7 @@ public sealed class ContextMenu : IDisposable
 
         _container = Application.Current;
         _container.Closing += Container_Closing;
-        Rect frame = Application.Driver.Bounds;
+        Rectangle frame = Application.Driver.Bounds;
         Point position = Position;
 
         if (Host is { })
@@ -157,7 +157,7 @@ public sealed class ContextMenu : IDisposable
             }
         }
 
-        Rect rect = Menu.MakeFrame (position.X, position.Y, MenuItems.Children);
+        Rectangle rect = Menu.MakeFrame (position.X, position.Y, MenuItems.Children);
 
         if (rect.Right >= frame.Right)
         {

+ 8 - 8
Terminal.Gui/Views/Menu/Menu.cs

@@ -298,11 +298,11 @@ internal sealed class Menu : View
     internal int _currentChild;
     internal View _previousSubFocused;
 
-    internal static Rect MakeFrame (int x, int y, MenuItem [] items, Menu parent = null)
+    internal static Rectangle MakeFrame (int x, int y, MenuItem [] items, Menu parent = null)
     {
         if (items is null || items.Length == 0)
         {
-            return new Rect ();
+            return new Rectangle ();
         }
 
         int minX = x;
@@ -321,7 +321,7 @@ internal sealed class Menu : View
             minY = Math.Max (Driver.Rows - maxH, 0);
         }
 
-        return new Rect (minX, minY, maxW, maxH);
+        return new Rectangle (minX, minY, maxW, maxH);
     }
 
     internal required MenuBar Host
@@ -766,15 +766,15 @@ internal sealed class Menu : View
         return !item.IsEnabled () ? ColorScheme.Disabled : GetNormalColor ();
     }
 
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (_barItems.Children is null)
         {
             return;
         }
 
-        Rect savedClip = Driver.Clip;
-        Driver.Clip = new Rect (0, 0, Driver.Cols, Driver.Rows);
+        Rectangle savedClip = Driver.Clip;
+        Driver.Clip = new Rectangle (0, 0, Driver.Cols, Driver.Rows);
         Driver.SetAttribute (GetNormalColor ());
 
         OnDrawAdornments ();
@@ -903,10 +903,10 @@ internal sealed class Menu : View
 
                     // The -3 is left/right border + one space (not sure what for)
                     tf.Draw (
-                             BoundsToScreen (new Rect (1, i, Frame.Width - 3, 1)),
+                             BoundsToScreen (new Rectangle (1, i, Frame.Width - 3, 1)),
                              i == _currentChild ? ColorScheme.Focus : GetNormalColor (),
                              i == _currentChild ? ColorScheme.HotFocus : ColorScheme.HotNormal,
-                             SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rect)
+                             SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rectangle)
                             );
                 }
                 else

+ 4 - 4
Terminal.Gui/Views/Menu/MenuBar.cs

@@ -469,7 +469,7 @@ public class MenuBar : View
     public event EventHandler<MenuOpeningEventArgs> MenuOpening;
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Move (0, 0);
         Driver.SetAttribute (GetNormalColor ());
@@ -865,7 +865,7 @@ public class MenuBar : View
             return Point.Empty;
         }
 
-        Rect superViewFrame = SuperView is null ? Driver.Bounds : SuperView.Frame;
+        Rectangle superViewFrame = SuperView is null ? Driver.Bounds : SuperView.Frame;
         View sv = SuperView is null ? Application.Current : SuperView;
         Point boundsOffset = sv.GetBoundsOffset ();
 
@@ -882,8 +882,8 @@ public class MenuBar : View
     /// <returns>The location offset.</returns>
     internal Point GetScreenOffsetFromCurrent ()
     {
-        Rect screen = Driver.Bounds;
-        Rect currentFrame = Application.Current.Frame;
+        Rectangle screen = Driver.Bounds;
+        Rectangle currentFrame = Application.Current.Frame;
         Point boundsOffset = Application.Top.GetBoundsOffset ();
 
         return new Point (screen.X - currentFrame.X - boundsOffset.X, screen.Y - currentFrame.Y - boundsOffset.Y);

+ 1 - 1
Terminal.Gui/Views/MessageBox.cs

@@ -394,7 +394,7 @@ public static class MessageBox
                         }
 
                         // TODO: replace with Dim.Fit when implemented
-                        Rect maxBounds = d.SuperView?.Bounds ?? Application.Top.Bounds;
+                        Rectangle maxBounds = d.SuperView?.Bounds ?? Application.Top.Bounds;
 
                         if (wrapMessage)
                         {

+ 2 - 2
Terminal.Gui/Views/ProgressBar.cs

@@ -143,7 +143,7 @@ public class ProgressBar : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Driver.SetAttribute (GetHotNormalColor ());
 
@@ -193,7 +193,7 @@ public class ProgressBar : View
                       BoundsToScreen (Bounds),
                       attr,
                       ColorScheme.Normal,
-                      SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rect)
+                      SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rectangle)
                      );
         }
     }

+ 5 - 5
Terminal.Gui/Views/RadioGroup.cs

@@ -203,7 +203,7 @@ public class RadioGroup : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -398,11 +398,11 @@ public class RadioGroup : View
         }
     }
 
-    private static Rect MakeRect (int x, int y, List<string> radioLabels)
+    private static Rectangle MakeRect (int x, int y, List<string> radioLabels)
     {
         if (radioLabels is null)
         {
-            return new Rect (x, y, 0, 0);
+            return new Rectangle (x, y, 0, 0);
         }
 
         var width = 0;
@@ -412,7 +412,7 @@ public class RadioGroup : View
             width = Math.Max (s.GetColumns () + 2, width);
         }
 
-        return new Rect (x, y, width, radioLabels.Count);
+        return new Rectangle (x, y, width, radioLabels.Count);
     }
 
     private void MoveDown ()
@@ -454,7 +454,7 @@ public class RadioGroup : View
         switch (_orientation)
         {
             case Orientation.Vertical:
-                Rect r = MakeRect (0, 0, radioLabels);
+                Rectangle r = MakeRect (0, 0, radioLabels);
 
                 if (IsInitialized)
                 {

+ 1 - 1
Terminal.Gui/Views/ScrollBarView.cs

@@ -449,7 +449,7 @@ public class ScrollBarView : View
     public virtual void OnChangedPosition () { ChangedPosition?.Invoke (this, EventArgs.Empty); }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (ColorScheme is null || ((!_showScrollIndicator || Size == 0) && AutoHideScrollBars && Visible))
         {

+ 5 - 5
Terminal.Gui/Views/ScrollView.cs

@@ -126,7 +126,7 @@ public class ScrollView : View
                            }
 
                            SetContentOffset (_contentOffset);
-                           _contentView.Frame = new Rect (ContentOffset, ContentSize);
+                           _contentView.Frame = new Rectangle (ContentOffset, ContentSize);
                            _vertical.ChangedPosition += delegate { ContentOffset = new Point (ContentOffset.X, _vertical.Position); };
                            _horizontal.ChangedPosition += delegate { ContentOffset = new Point (_horizontal.Position, ContentOffset.Y); };
                        };
@@ -187,7 +187,7 @@ public class ScrollView : View
             if (_contentSize != value)
             {
                 _contentSize = value;
-                _contentView.Frame = new Rect (_contentOffset, value);
+                _contentView.Frame = new Rectangle (_contentOffset, value);
                 _vertical.Size = _contentSize.Height;
                 _horizontal.Size = _contentSize.Width;
                 SetNeedsDisplay ();
@@ -380,11 +380,11 @@ public class ScrollView : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         SetViewsNeedsDisplay ();
 
-        Rect savedClip = ClipToBounds ();
+        Rectangle savedClip = ClipToBounds ();
 
         // TODO: It's bad practice for views to always clear a view. It negates clipping.
         Clear ();
@@ -590,7 +590,7 @@ public class ScrollView : View
     private void SetContentOffset (Point offset)
     {
         _contentOffset = new Point (-Math.Abs (offset.X), -Math.Abs (offset.Y));
-        _contentView.Frame = new Rect (_contentOffset, _contentSize);
+        _contentView.Frame = new Rectangle (_contentOffset, _contentSize);
         int p = Math.Max (0, -_contentOffset.Y);
 
         if (_vertical.Position != p)

+ 3 - 3
Terminal.Gui/Views/Slider.cs

@@ -775,7 +775,7 @@ public class Slider<T> : View
 
         if (_config._sliderOrientation == Orientation.Horizontal)
         {
-            Bounds = new Rect (
+            Bounds = new Rectangle (
                                Bounds.Location,
                                new Size (
                                          int.Min (
@@ -791,7 +791,7 @@ public class Slider<T> : View
         }
         else
         {
-            Bounds = new Rect (
+            Bounds = new Rectangle (
                                Bounds.Location,
                                new Size (
                                          int.Min (
@@ -994,7 +994,7 @@ public class Slider<T> : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         // TODO: make this more surgical to reduce repaint
 

+ 1 - 1
Terminal.Gui/Views/StatusBar.cs

@@ -172,7 +172,7 @@ public class StatusBar : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Move (0, 0);
         Driver.SetAttribute (GetNormalColor ());

+ 8 - 8
Terminal.Gui/Views/TabView.cs

@@ -311,13 +311,13 @@ public class TabView : View
     public int EnsureValidScrollOffsets (int value) { return Math.Max (Math.Min (value, Tabs.Count - 1), 0); }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Driver.SetAttribute (GetNormalColor ());
 
         if (Tabs.Any ())
         {
-            Rect savedClip = ClipToBounds ();
+            Rectangle savedClip = ClipToBounds ();
             _tabsBar.OnDrawContent (contentArea);
             _contentView.SetNeedsDisplay ();
             _contentView.Draw ();
@@ -326,7 +326,7 @@ public class TabView : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContentComplete (Rect contentArea) { _tabsBar.OnDrawContentComplete (contentArea); }
+    public override void OnDrawContentComplete (Rectangle contentArea) { _tabsBar.OnDrawContentComplete (contentArea); }
 
     /// <summary>
     ///     Removes the given <paramref name="tab"/> from <see cref="Tabs"/>. Caller is responsible for disposing the
@@ -437,7 +437,7 @@ public class TabView : View
 
     /// <summary>Returns which tabs to render at each x location.</summary>
     /// <returns></returns>
-    private IEnumerable<TabToRender> CalculateViewport (Rect bounds)
+    private IEnumerable<TabToRender> CalculateViewport (Rectangle bounds)
     {
         UnSetCurrentTabs ();
 
@@ -657,7 +657,7 @@ public class TabView : View
             return false;
         }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             _host._tabLocations = _host.CalculateViewport (Bounds).ToArray ();
 
@@ -670,7 +670,7 @@ public class TabView : View
             Driver.SetAttribute (GetNormalColor ());
         }
 
-        public override void OnDrawContentComplete (Rect contentArea)
+        public override void OnDrawContentComplete (Rectangle contentArea)
         {
             if (_host._tabLocations is null)
             {
@@ -683,7 +683,7 @@ public class TabView : View
             for (var i = 0; i < tabLocations.Length; i++)
             {
                 View tab = tabLocations [i].Tab;
-                Rect vts = tab.BoundsToScreen (tab.Bounds);
+                Rectangle vts = tab.BoundsToScreen (tab.Bounds);
                 var lc = new LineCanvas ();
                 int selectedOffset = _host.Style.ShowTopLine && tabLocations [i].IsSelected ? 0 : 1;
 
@@ -1115,7 +1115,7 @@ public class TabView : View
 
                     int lastSelectedTab = !_host.Style.ShowTopLine && i == selectedTab ? 1 :
                                           _host.Style.TabsOnBottom ? 1 : 0;
-                    Rect tabsBarVts = BoundsToScreen (Bounds);
+                    Rectangle tabsBarVts = BoundsToScreen (Bounds);
                     int lineLength = tabsBarVts.Right - vts.Right;
 
                     // Right horizontal line

+ 1 - 1
Terminal.Gui/Views/TableView/ListTableSource.cs

@@ -16,7 +16,7 @@ public class ListTableSource : ITableSource
     public ListColumnStyle Style;
 
     private readonly TableView _tableView;
-    private Rect _lastBounds;
+    private Rectangle _lastBounds;
     private IList _lastList;
     private int _lastMaxCellWidth;
     private int _lastMinCellWidth;

+ 4 - 4
Terminal.Gui/Views/TableView/TableSelection.cs

@@ -6,10 +6,10 @@ public class TableSelection
     /// <summary>Creates a new selected area starting at the origin corner and covering the provided rectangular area</summary>
     /// <param name="origin"></param>
     /// <param name="rect"></param>
-    public TableSelection (Point origin, Rect rect)
+    public TableSelection (Point origin, Rectangle rect)
     {
         Origin = origin;
-        Rect = rect;
+        Rectangle = rect;
     }
 
     /// <summary>
@@ -18,11 +18,11 @@ public class TableSelection
     /// </summary>
     public bool IsToggled { get; set; }
 
-    /// <summary>Corner of the <see cref="Rect"/> where selection began</summary>
+    /// <summary>Corner of the <see cref="Rectangle"/> where selection began</summary>
     /// <value></value>
     public Point Origin { get; set; }
 
     /// <summary>Area selected</summary>
     /// <value></value>
-    public Rect Rect { get; set; }
+    public Rectangle Rectangle { get; set; }
 }

+ 18 - 18
Terminal.Gui/Views/TableView/TableView.cs

@@ -673,13 +673,13 @@ public class TableView : View
         foreach (TableSelection region in oldRegions)
         {
             // ignore regions entirely below current table state
-            if (region.Rect.Top >= Table.Rows)
+            if (region.Rectangle.Top >= Table.Rows)
             {
                 continue;
             }
 
             // ignore regions entirely too far right of table columns
-            if (region.Rect.Left >= Table.Columns)
+            if (region.Rectangle.Left >= Table.Columns)
             {
                 continue;
             }
@@ -691,11 +691,11 @@ public class TableView : View
                                       );
 
             // ensure regions do not go over edge of table bounds
-            region.Rect = Rect.FromLTRB (
-                                         region.Rect.Left,
-                                         region.Rect.Top,
-                                         Math.Max (Math.Min (region.Rect.Right, Table.Columns), 0),
-                                         Math.Max (Math.Min (region.Rect.Bottom, Table.Rows), 0)
+            region.Rectangle = Rectangle.FromLTRB (
+                                         region.Rectangle.Left,
+                                         region.Rectangle.Top,
+                                         Math.Max (Math.Min (region.Rectangle.Right, Table.Columns), 0),
+                                         Math.Max (Math.Min (region.Rectangle.Bottom, Table.Rows), 0)
                                         );
 
             MultiSelectedRegions.Push (region);
@@ -722,11 +722,11 @@ public class TableView : View
         if (MultiSelect && MultiSelectedRegions.Any ())
         {
             // Quiz any cells for whether they are selected.  For performance we only need to check those between the top left and lower right vertex of selection regions
-            int yMin = MultiSelectedRegions.Min (r => r.Rect.Top);
-            int yMax = MultiSelectedRegions.Max (r => r.Rect.Bottom);
+            int yMin = MultiSelectedRegions.Min (r => r.Rectangle.Top);
+            int yMax = MultiSelectedRegions.Max (r => r.Rectangle.Bottom);
 
-            int xMin = FullRowSelect ? 0 : MultiSelectedRegions.Min (r => r.Rect.Left);
-            int xMax = FullRowSelect ? Table.Columns : MultiSelectedRegions.Max (r => r.Rect.Right);
+            int xMin = FullRowSelect ? 0 : MultiSelectedRegions.Min (r => r.Rectangle.Left);
+            int xMax = FullRowSelect ? Table.Columns : MultiSelectedRegions.Max (r => r.Rectangle.Right);
 
             for (int y = yMin; y < yMax; y++)
             {
@@ -895,7 +895,7 @@ public class TableView : View
     }
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         base.OnDrawContent (contentArea);
 
@@ -1123,7 +1123,7 @@ public class TableView : View
         MultiSelectedRegions.Push (
                                    new TableSelection (
                                                        new Point (SelectedColumn, SelectedRow),
-                                                       new Rect (0, 0, Table.Columns, table.Rows)
+                                                       new Rectangle (0, 0, Table.Columns, table.Rows)
                                                       )
                                   );
         Update ();
@@ -1334,7 +1334,7 @@ public class TableView : View
     /// <param name="bounds"></param>
     /// <param name="padding"></param>
     /// <returns></returns>
-    private IEnumerable<ColumnToRender> CalculateViewport (Rect bounds, int padding = 1)
+    private IEnumerable<ColumnToRender> CalculateViewport (Rectangle bounds, int padding = 1)
     {
         if (TableIsNullOrInvisible ())
         {
@@ -1498,7 +1498,7 @@ public class TableView : View
         int right = Math.Max (Math.Max (pt1X, pt2X), 0);
 
         // Rect class is inclusive of Top Left but exclusive of Bottom Right so extend by 1
-        return new TableSelection (new Point (pt1X, pt1Y), new Rect (left, top, right - left + 1, bot - top + 1))
+        return new TableSelection (new Point (pt1X, pt1Y), new Rectangle (left, top, right - left + 1, bot - top + 1))
         {
             IsToggled = toggle
         };
@@ -1545,10 +1545,10 @@ public class TableView : View
 
         if (FullRowSelect)
         {
-            return MultiSelectedRegions.Where (r => r.Rect.Bottom > row && r.Rect.Top <= row);
+            return MultiSelectedRegions.Where (r => r.Rectangle.Bottom > row && r.Rectangle.Top <= row);
         }
 
-        return MultiSelectedRegions.Where (r => r.Rect.Contains (col, row));
+        return MultiSelectedRegions.Where (r => r.Rectangle.Contains (col, row));
     }
 
     /// <summary>
@@ -2235,7 +2235,7 @@ public class TableView : View
         public bool IsVeryLast { get; }
 
         /// <summary>
-        ///     The width that the column should occupy as calculated by <see cref="CalculateViewport(Rect, int)"/>.  Note
+        ///     The width that the column should occupy as calculated by <see cref="CalculateViewport(Rectangle, int)"/>.  Note
         ///     that this includes space for padding i.e. the separator between columns.
         /// </summary>
         public int Width { get; internal set; }

+ 3 - 3
Terminal.Gui/Views/TextField.cs

@@ -970,7 +970,7 @@ public class TextField : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         _isDrawing = true;
 
@@ -1193,8 +1193,8 @@ public class TextField : View
 
         int pos = _cursorPosition - ScrollOffset + Math.Min (Frame.X, 0);
         int offB = OffSetBackground ();
-        Rect containerFrame = SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rect);
-        Rect thisFrame = BoundsToScreen (Bounds);
+        Rectangle containerFrame = SuperView?.BoundsToScreen (SuperView.Bounds) ?? default (Rectangle);
+        Rectangle thisFrame = BoundsToScreen (Bounds);
 
         if (pos > -1
             && col >= pos

+ 1 - 1
Terminal.Gui/Views/TextValidateField.cs

@@ -555,7 +555,7 @@ namespace Terminal.Gui
         }
 
         /// <inheritdoc/>
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             if (_provider is null)
             {

+ 8 - 8
Terminal.Gui/Views/TextView.cs

@@ -3602,7 +3602,7 @@ public class TextView : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         _isDrawing = true;
 
@@ -4505,7 +4505,7 @@ public class TextView : View
                 _wrapNeeded = true;
             }
 
-            DoSetNeedsDisplay (new Rect (0, CurrentRow - _topRow, Frame.Width, CurrentRow - _topRow + 1));
+            DoSetNeedsDisplay (new Rectangle (0, CurrentRow - _topRow, Frame.Width, CurrentRow - _topRow + 1));
         }
         else
         {
@@ -4525,7 +4525,7 @@ public class TextView : View
             }
 
             DoSetNeedsDisplay (
-                               new Rect (
+                               new Rectangle (
                                          CurrentColumn - _leftColumn,
                                          CurrentRow - _topRow,
                                          Frame.Width,
@@ -4551,7 +4551,7 @@ public class TextView : View
         }
     }
 
-    private void DoSetNeedsDisplay (Rect rect)
+    private void DoSetNeedsDisplay (Rectangle rect)
     {
         if (_wrapNeeded)
         {
@@ -5086,7 +5086,7 @@ public class TextView : View
 
         UpdateWrapModel ();
 
-        DoSetNeedsDisplay (new Rect (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
+        DoSetNeedsDisplay (new Rectangle (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
 
         _lastWasKill = setLastWasKill;
         DoNeededAction ();
@@ -5191,7 +5191,7 @@ public class TextView : View
 
         UpdateWrapModel ();
 
-        DoSetNeedsDisplay (new Rect (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
+        DoSetNeedsDisplay (new Rectangle (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
 
         _lastWasKill = setLastWasKill;
         DoNeededAction ();
@@ -5261,7 +5261,7 @@ public class TextView : View
 
         UpdateWrapModel ();
 
-        DoSetNeedsDisplay (new Rect (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
+        DoSetNeedsDisplay (new Rectangle (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
         DoNeededAction ();
     }
 
@@ -5320,7 +5320,7 @@ public class TextView : View
 
         UpdateWrapModel ();
 
-        DoSetNeedsDisplay (new Rect (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
+        DoSetNeedsDisplay (new Rectangle (0, CurrentRow - _topRow, Frame.Width, Frame.Height));
         DoNeededAction ();
     }
 

+ 5 - 5
Terminal.Gui/Views/TileView.cs

@@ -156,11 +156,11 @@ public class TileView : View
             return;
         }
 
-        Rect contentArea = Bounds;
+        Rectangle contentArea = Bounds;
 
         if (HasBorder ())
         {
-            contentArea = new Rect (
+            contentArea = new Rectangle (
                                     contentArea.X + 1,
                                     contentArea.Y + 1,
                                     Math.Max (0, contentArea.Width - 2),
@@ -177,7 +177,7 @@ public class TileView : View
     public override bool OnDrawAdornments () { return false; }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         Driver.SetAttribute (ColorScheme.Normal);
         Clear ();
@@ -756,7 +756,7 @@ public class TileView : View
         return false;
     }
 
-    private void Setup (Rect contentArea)
+    private void Setup (Rectangle contentArea)
     {
         if (contentArea.IsEmpty || contentArea.Height <= 0 || contentArea.Width <= 0)
         {
@@ -969,7 +969,7 @@ public class TileView : View
             return false;
         }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             base.OnDrawContent (contentArea);
 

+ 1 - 1
Terminal.Gui/Views/Toplevel.cs

@@ -347,7 +347,7 @@ public partial class Toplevel : View
     }
 
     /// <inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (!Visible)
         {

+ 1 - 1
Terminal.Gui/Views/TreeView/TreeView.cs

@@ -1139,7 +1139,7 @@ public class TreeView<T> : View, ITreeView where T : class
     public event EventHandler<ObjectActivatedEventArgs<T>> ObjectActivated;
 
     ///<inheritdoc/>
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         if (roots is null)
         {

+ 3 - 2
UICatalog/Scenarios/Animation.cs

@@ -7,6 +7,7 @@ using SixLabors.ImageSharp;
 using SixLabors.ImageSharp.PixelFormats;
 using SixLabors.ImageSharp.Processing;
 using Terminal.Gui;
+using Rectangle = Terminal.Gui.Rectangle;
 
 namespace UICatalog.Scenarios;
 
@@ -160,10 +161,10 @@ public class Animation : Scenario
         private int frameCount;
         private Image<Rgba32> [] fullResImages;
         private Image<Rgba32> [] matchSizes;
-        private Rect oldSize = Rect.Empty;
+        private Rectangle oldSize = Rectangle.Empty;
         public void NextFrame () { currentFrame = (currentFrame + 1) % frameCount; }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             base.OnDrawContent (contentArea);
 

+ 2 - 2
UICatalog/Scenarios/Buttons.cs

@@ -183,7 +183,7 @@ public class Buttons : Scenario
 
         moveBtnA.Clicked += (s, e) =>
                             {
-                                moveBtnA.Frame = new Rect (
+                                moveBtnA.Frame = new Rectangle (
                                                            moveBtnA.Frame.X + 5,
                                                            moveBtnA.Frame.Y,
                                                            moveBtnA.Frame.Width,
@@ -200,7 +200,7 @@ public class Buttons : Scenario
 
         sizeBtnA.Clicked += (s, e) =>
                             {
-                                sizeBtnA.Frame = new Rect (
+                                sizeBtnA.Frame = new Rectangle (
                                                            sizeBtnA.Frame.X,
                                                            sizeBtnA.Frame.Y,
                                                            sizeBtnA.Frame.Width + 5,

+ 6 - 6
UICatalog/Scenarios/CharacterMap.cs

@@ -513,7 +513,7 @@ internal class CharMap : ScrollView
     private static int RowWidth => RowLabelWidth + COLUMN_WIDTH * 16;
     public event EventHandler<ListViewItemEventArgs> Hover;
 
-    public override void OnDrawContent (Rect contentArea)
+    public override void OnDrawContent (Rectangle contentArea)
     {
         //if (ShowHorizontalScrollIndicator && ContentSize.Height < (int)(MaxCodePoint / 16 + 2)) {
         //	//ContentSize = new Size (CharMap.RowWidth, (int)(MaxCodePoint / 16 + 2));
@@ -538,14 +538,14 @@ internal class CharMap : ScrollView
     }
 
     //public void CharMap_DrawContent (object s, DrawEventArgs a)
-    public override void OnDrawContentComplete (Rect contentArea)
+    public override void OnDrawContentComplete (Rectangle contentArea)
     {
         if (contentArea.Height == 0 || contentArea.Width == 0)
         {
             return;
         }
 
-        var viewport = new Rect (
+        var viewport = new Rectangle (
                                  ContentOffset,
                                  new Size (
                                            Math.Max (Bounds.Width - (ShowVerticalScrollIndicator ? 1 : 0), 0),
@@ -553,12 +553,12 @@ internal class CharMap : ScrollView
                                           )
                                 );
 
-        Rect oldClip = ClipToBounds ();
+        Rectangle oldClip = ClipToBounds ();
 
         if (ShowHorizontalScrollIndicator)
         {
             // ClipToBounds doesn't know about the scroll indicators, so if off, subtract one from height
-            Driver.Clip = new Rect (
+            Driver.Clip = new Rectangle (
                                     Driver.Clip.Location,
                                     new Size (Driver.Clip.Width, Driver.Clip.Height - 1)
                                    );
@@ -567,7 +567,7 @@ internal class CharMap : ScrollView
         if (ShowVerticalScrollIndicator)
         {
             // ClipToBounds doesn't know about the scroll indicators, so if off, subtract one from width
-            Driver.Clip = new Rect (
+            Driver.Clip = new Rectangle (
                                     Driver.Clip.Location,
                                     new Size (Driver.Clip.Width - 1, Driver.Clip.Height)
                                    );

+ 1 - 1
UICatalog/Scenarios/GraphViewExample.cs

@@ -254,7 +254,7 @@ public class GraphViewExample : Scenario
 
         _graphView.AxisY.Minimum = 0;
 
-        var legend = new LegendAnnotation (new Rect (_graphView.Bounds.Width - 20, 0, 20, 5));
+        var legend = new LegendAnnotation (new Rectangle (_graphView.Bounds.Width - 20, 0, 20, 5));
 
         legend.AddEntry (
                          new GraphCellToRender (stiple, series.SubSeries.ElementAt (0).OverrideBarColor),

+ 2 - 1
UICatalog/Scenarios/Images.cs

@@ -7,6 +7,7 @@ using SixLabors.ImageSharp.PixelFormats;
 using SixLabors.ImageSharp.Processing;
 using Terminal.Gui;
 using Color = Terminal.Gui.Color;
+using Rectangle = Terminal.Gui.Rectangle;
 
 namespace UICatalog.Scenarios;
 
@@ -105,7 +106,7 @@ public class Images : Scenario
         private Image<Rgba32> _fullResImage;
         private Image<Rgba32> _matchSize;
 
-        public override void OnDrawContent (Rect bounds)
+        public override void OnDrawContent (Rectangle bounds)
         {
             base.OnDrawContent (bounds);
 

+ 2 - 2
UICatalog/Scenarios/LabelsAsButtons.cs

@@ -224,7 +224,7 @@ public class LabelsAsLabels : Scenario
 
         moveBtnA.Clicked += (s, e) =>
                             {
-                                moveBtnA.Frame = new Rect (
+                                moveBtnA.Frame = new Rectangle (
                                                            moveBtnA.Frame.X + 5,
                                                            moveBtnA.Frame.Y,
                                                            moveBtnA.Frame.Width,
@@ -246,7 +246,7 @@ public class LabelsAsLabels : Scenario
 
         sizeBtnA.Clicked += (s, e) =>
                             {
-                                sizeBtnA.Frame = new Rect (
+                                sizeBtnA.Frame = new Rectangle (
                                                            sizeBtnA.Frame.X,
                                                            sizeBtnA.Frame.Y,
                                                            sizeBtnA.Frame.Width + 5,

+ 1 - 1
UICatalog/Scenarios/LineDrawing.cs

@@ -36,7 +36,7 @@ public class LineDrawing : Scenario
         public DrawingArea () { AddLayer (); }
         public LineStyle LineStyle { get; set; }
 
-        public override void OnDrawContentComplete (Rect contentArea)
+        public override void OnDrawContentComplete (Rectangle contentArea)
         {
             base.OnDrawContentComplete (contentArea);
 

+ 1 - 1
UICatalog/Scenarios/ProgressBarStyles.cs

@@ -70,7 +70,7 @@ public class ProgressBarStyles : Scenario
                                          dialog.X = pbList.Frame.X;
                                          dialog.Y = pbList.Frame.Height;
 
-                                         dialog.Bounds = new Rect (0, 0, colorPicker.Frame.Width, colorPicker.Frame.Height);
+                                         dialog.Bounds = new Rectangle (0, 0, colorPicker.Frame.Width, colorPicker.Frame.Height);
 
                                          Application.Top.LayoutSubviews ();
                                      };

+ 5 - 5
UICatalog/Scenarios/Scrolling.cs

@@ -280,11 +280,11 @@ public class Scrolling : Scenario
     {
         private readonly int _h = 50;
         private readonly int _w = 40;
-        public Box10x (int x, int y) { Frame = new Rect (x, y, 20, 10); }
+        public Box10x (int x, int y) { Frame = new Rectangle (x, y, 20, 10); }
         public bool WantCursorPosition { get; set; } = false;
         public Size GetContentSize () { return new Size (_w, _h); }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             //Point pos = new Point (region.X, region.Y);
             Driver.SetAttribute (ColorScheme.Focus);
@@ -315,7 +315,7 @@ public class Scrolling : Scenario
         private int _h = 50;
         private int _w = 40;
 
-        public Filler (Rect rect)
+        public Filler (Rectangle rect)
         {
             _w = rect.Width;
             _h = rect.Height;
@@ -324,10 +324,10 @@ public class Scrolling : Scenario
 
         public Size GetContentSize () { return new Size (_w, _h); }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             Driver.SetAttribute (ColorScheme.Focus);
-            Rect f = Frame;
+            Rectangle f = Frame;
             _w = 0;
             _h = 0;
 

+ 1 - 1
UICatalog/Scenarios/SingleBackgroundWorker.cs

@@ -209,7 +209,7 @@ public class SingleBackgroundWorker : Scenario
 
         public StagingUIController (DateTime? start, List<string> list)
         {
-            Rect frame = Application.Top.Frame;
+            Rectangle frame = Application.Top.Frame;
             _top = new Toplevel { X = frame.X, Y = frame.Y, Width = frame.Width, Height = frame.Height };
 
             _top.KeyDown += (s, e) =>

+ 1 - 1
UICatalog/Scenarios/Snake.cs

@@ -309,7 +309,7 @@ public class Snake : Scenario
 
         public SnakeState State { get; }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             base.OnDrawContent (contentArea);
 

+ 3 - 3
UnitTests/Application/ApplicationTests.cs

@@ -39,11 +39,11 @@ public class ApplicationTests
     [AutoInitShutdown]
     public void Begin_Sets_Application_Top_To_Console_Size ()
     {
-        Assert.Equal (new Rect (0, 0, 80, 25), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), Application.Top.Frame);
         Application.Begin (Application.Top);
-        Assert.Equal (new Rect (0, 0, 80, 25), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), Application.Top.Frame);
         ((FakeDriver)Application.Driver).SetBufferSize (5, 5);
-        Assert.Equal (new Rect (0, 0, 5, 5), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 5), Application.Top.Frame);
     }
 
     [Fact]

+ 5 - 5
UnitTests/ConsoleDrivers/ClipRegionTests.cs

@@ -38,12 +38,12 @@ public class ClipRegionTests
         Assert.Equal ((Rune)'x', driver.Contents [5, 5].Rune);
 
         // Clear the contents
-        driver.FillRect (new Rect (0, 0, driver.Rows, driver.Cols), ' ');
+        driver.FillRect (new Rectangle (0, 0, driver.Rows, driver.Cols), ' ');
         Assert.Equal ((Rune)' ', driver.Contents [0, 0].Rune);
 
         // Setup the region with a single rectangle, fill screen with 'x'
-        driver.Clip = new Rect (5, 5, 5, 5);
-        driver.FillRect (new Rect (0, 0, driver.Rows, driver.Cols), 'x');
+        driver.Clip = new Rectangle (5, 5, 5, 5);
+        driver.FillRect (new Rectangle (0, 0, driver.Rows, driver.Cols), 'x');
         Assert.Equal ((Rune)' ', driver.Contents [0, 0].Rune);
         Assert.Equal ((Rune)' ', driver.Contents [4, 9].Rune);
         Assert.Equal ((Rune)'x', driver.Contents [5, 5].Rune);
@@ -66,7 +66,7 @@ public class ClipRegionTests
         Application.Init (driver);
 
         // Define a clip rectangle
-        driver.Clip = Rect.Empty;
+        driver.Clip = Rectangle.Empty;
 
         // negative
         Assert.False (driver.IsValidLocation (4, 5));
@@ -111,7 +111,7 @@ public class ClipRegionTests
         Assert.False (driver.IsValidLocation (driver.Cols, driver.Rows));
 
         // Define a clip rectangle
-        driver.Clip = new Rect (5, 5, 5, 5);
+        driver.Clip = new Rectangle (5, 5, 5, 5);
 
         // positive
         Assert.True (driver.IsValidLocation (5, 5));

+ 21 - 21
UnitTests/Drawing/LineCanvasTests.cs

@@ -293,7 +293,7 @@ public class LineCanvasTests
         View v = GetCanvas (out LineCanvas lc);
         v.Width = 10;
         v.Height = 10;
-        v.Bounds = new Rect (0, 0, 10, 10);
+        v.Bounds = new Rectangle (0, 0, 10, 10);
 
         lc.AddLine (new Point (x1, y1), len1, o1, s1);
         lc.AddLine (new Point (x2, y2), len2, o2, s2);
@@ -380,7 +380,7 @@ public class LineCanvasTests
         canvas.AddLine (new Point (x, y), length, Orientation.Horizontal, LineStyle.Single);
         canvas.AddLine (new Point (x, y), length, Orientation.Vertical, LineStyle.Single);
 
-        Assert.Equal (new Rect (expectedX, expectedY, expectedWidth, expectedHeight), canvas.Bounds);
+        Assert.Equal (new Rectangle (expectedX, expectedY, expectedWidth, expectedHeight), canvas.Bounds);
     }
 
     [InlineData (
@@ -461,7 +461,7 @@ public class LineCanvasTests
         var canvas = new LineCanvas ();
         canvas.AddLine (new Point (x, y), length, Orientation.Horizontal, LineStyle.Single);
 
-        Assert.Equal (new Rect (expectedX, expectedY, expectedWidth, expectedHeight), canvas.Bounds);
+        Assert.Equal (new Rectangle (expectedX, expectedY, expectedWidth, expectedHeight), canvas.Bounds);
     }
 
     [Fact]
@@ -483,27 +483,27 @@ public class LineCanvasTests
 
         // Add a short horiz line for ╔╡
         lc.AddLine (new Point (x, y), 2, Orientation.Horizontal, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 2, 1), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 1), lc.Bounds);
 
         //LHS line down
         lc.AddLine (new Point (x, y), height, Orientation.Vertical, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 2, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 2), lc.Bounds);
 
         //Vertical line before Title, results in a ╡
         lc.AddLine (new Point (x + 1, y), 0, Orientation.Vertical, LineStyle.Single);
-        Assert.Equal (new Rect (x, y, 2, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 2), lc.Bounds);
 
         //Vertical line after Title, results in a ╞
         lc.AddLine (new Point (x + 2, y), 0, Orientation.Vertical, LineStyle.Single);
-        Assert.Equal (new Rect (x, y, 3, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 3, 2), lc.Bounds);
 
         // remainder of top line
         lc.AddLine (new Point (x + 2, y), width - 1, Orientation.Horizontal, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 4, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 4, 2), lc.Bounds);
 
         //RHS line down
         lc.AddLine (new Point (x + width, y), height, Orientation.Vertical, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 4, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 4, 2), lc.Bounds);
 
         TestHelpers.AssertEqual (
                                  output,
@@ -533,27 +533,27 @@ public class LineCanvasTests
 
         // Add a short horiz line for ╔╡
         lc.AddLine (new Point (x, y), 2, Orientation.Horizontal, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 2, 1), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 1), lc.Bounds);
 
         //LHS line down
         lc.AddLine (new Point (x, y), height, Orientation.Vertical, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 2, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 2), lc.Bounds);
 
         //Vertical line before Title, results in a ╡
         lc.AddLine (new Point (x + 1, y), 0, Orientation.Vertical, LineStyle.Single);
-        Assert.Equal (new Rect (x, y, 2, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 2, 2), lc.Bounds);
 
         //Vertical line after Title, results in a ╞
         lc.AddLine (new Point (x + 2, y), 0, Orientation.Vertical, LineStyle.Single);
-        Assert.Equal (new Rect (x, y, 3, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 3, 2), lc.Bounds);
 
         // remainder of top line
         lc.AddLine (new Point (x + 2, y), width - 1, Orientation.Horizontal, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 4, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 4, 2), lc.Bounds);
 
         //RHS line down
         lc.AddLine (new Point (x + width, y), height, Orientation.Vertical, LineStyle.Double);
-        Assert.Equal (new Rect (x, y, 4, 2), lc.Bounds);
+        Assert.Equal (new Rectangle (x, y, 4, 2), lc.Bounds);
 
         TestHelpers.AssertEqual (
                                  output,
@@ -570,13 +570,13 @@ public class LineCanvasTests
     {
         var lc = new LineCanvas ();
 
-        Assert.Equal (Rect.Empty, lc.Bounds);
+        Assert.Equal (Rectangle.Empty, lc.Bounds);
 
         lc.AddLine (new Point (0, 0), 2, Orientation.Horizontal, LineStyle.Double);
-        Assert.NotEqual (Rect.Empty, lc.Bounds);
+        Assert.NotEqual (Rectangle.Empty, lc.Bounds);
 
         lc.Clear ();
-        Assert.Equal (Rect.Empty, lc.Bounds);
+        Assert.Equal (Rectangle.Empty, lc.Bounds);
     }
 
     [InlineData (0, 0, Orientation.Horizontal, "─")]
@@ -873,7 +873,7 @@ public class LineCanvasTests
         //// Left Up
         //canvas.AddLine (new Point (0, 3), -3, Orientation.Vertical, LineStyle.Single);
 
-        Assert.Equal (new Rect (0, 0, 2, 2), canvas.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), canvas.Bounds);
 
         Dictionary<Point, Rune> map = canvas.GetMap ();
         Assert.Equal (2, map.Count);
@@ -990,7 +990,7 @@ public class LineCanvasTests
         View v = GetCanvas (out LineCanvas lc);
         v.Width = 10;
         v.Height = 10;
-        v.Bounds = new Rect (0, 0, 10, 10);
+        v.Bounds = new Rectangle (0, 0, 10, 10);
 
         lc.AddLine (new Point (x1, y1), length, o1, s1);
 
@@ -1304,7 +1304,7 @@ public class LineCanvasTests
     /// <returns></returns>
     private View GetCanvas (out LineCanvas canvas, int offsetX = 0, int offsetY = 0)
     {
-        var v = new View { Width = 10, Height = 5, Bounds = new Rect (0, 0, 10, 5) };
+        var v = new View { Width = 10, Height = 5, Bounds = new Rectangle (0, 0, 10, 5) };
         Application.Top.Add (v);
         Application.Begin (Application.Top);
 

+ 4 - 4
UnitTests/Drawing/RulerTests.cs

@@ -51,7 +51,7 @@ public class RulerTests
         Application.Top.Add (f);
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (len + 5, 5);
-        Assert.Equal (new Rect (0, 0, len + 5, 5), f.Frame);
+        Assert.Equal (new Rectangle (0, 0, len + 5, 5), f.Frame);
 
         var r = new Ruler ();
         Assert.Equal (Orientation.Horizontal, r.Orientation);
@@ -123,7 +123,7 @@ public class RulerTests
         Application.Top.Add (f);
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (len + 5, 5);
-        Assert.Equal (new Rect (0, 0, len + 5, 5), f.Frame);
+        Assert.Equal (new Rectangle (0, 0, len + 5, 5), f.Frame);
 
         var r = new Ruler ();
         Assert.Equal (Orientation.Horizontal, r.Orientation);
@@ -168,7 +168,7 @@ public class RulerTests
         Application.Top.Add (f);
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (5, len + 5);
-        Assert.Equal (new Rect (0, 0, 5, len + 5), f.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, len + 5), f.Frame);
 
         var r = new Ruler ();
         r.Orientation = Orientation.Vertical;
@@ -300,7 +300,7 @@ public class RulerTests
         Application.Top.Add (f);
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (5, len + 5);
-        Assert.Equal (new Rect (0, 0, 5, len + 5), f.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, len + 5), f.Frame);
 
         var r = new Ruler ();
         r.Orientation = Orientation.Vertical;

+ 1 - 1
UnitTests/Drawing/StraightLineTests.cs

@@ -322,6 +322,6 @@ public class StraightLineTests
     {
         var sl = new StraightLine (new Point (x, y), length, orientation, LineStyle.Single);
 
-        Assert.Equal (new Rect (expectedX, expectedY, expectedWidth, expectedHeight), sl.Bounds);
+        Assert.Equal (new Rectangle (expectedX, expectedY, expectedWidth, expectedHeight), sl.Bounds);
     }
 }

+ 48 - 48
UnitTests/Drawing/ThicknessTests.cs

@@ -60,11 +60,11 @@ public class ThicknessTests
     {
         ((FakeDriver)Application.Driver).SetBufferSize (60, 60);
         var t = new Thickness (0, 0, 0, 0);
-        var r = new Rect (5, 5, 40, 15);
+        var r = new Rectangle (5, 5, 40, 15);
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FramePadding;
 
         Application.Driver.FillRect (
-                                     new Rect (0, 0, Application.Driver.Cols, Application.Driver.Rows),
+                                     new Rectangle (0, 0, Application.Driver.Cols, Application.Driver.Rows),
                                      (Rune)' '
                                     );
         t.Draw (r, "Test");
@@ -77,11 +77,11 @@ public class ThicknessTests
                                                      );
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (5, 5, 40, 15);
+        r = new Rectangle (5, 5, 40, 15);
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FramePadding;
 
         Application.Driver.FillRect (
-                                     new Rect (0, 0, Application.Driver.Cols, Application.Driver.Rows),
+                                     new Rectangle (0, 0, Application.Driver.Cols, Application.Driver.Rows),
                                      (Rune)' '
                                     );
         t.Draw (r, "Test");
@@ -108,11 +108,11 @@ public class ThicknessTests
                                                      );
 
         t = new Thickness (1, 2, 3, 4);
-        r = new Rect (5, 5, 40, 15);
+        r = new Rectangle (5, 5, 40, 15);
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FramePadding;
 
         Application.Driver.FillRect (
-                                     new Rect (0, 0, Application.Driver.Cols, Application.Driver.Rows),
+                                     new Rectangle (0, 0, Application.Driver.Cols, Application.Driver.Rows),
                                      (Rune)' '
                                     );
         t.Draw (r, "Test");
@@ -139,11 +139,11 @@ public class ThicknessTests
                                                      );
 
         t = new Thickness (-1, 1, 1, 1);
-        r = new Rect (5, 5, 40, 15);
+        r = new Rectangle (5, 5, 40, 15);
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FramePadding;
 
         Application.Driver.FillRect (
-                                     new Rect (0, 0, Application.Driver.Cols, Application.Driver.Rows),
+                                     new Rectangle (0, 0, Application.Driver.Cols, Application.Driver.Rows),
                                      (Rune)' '
                                     );
         t.Draw (r, "Test");
@@ -182,7 +182,7 @@ public class ThicknessTests
 
         ((FakeDriver)Application.Driver).SetBufferSize (45, 20);
         var t = new Thickness (0, 0, 0, 0);
-        var r = new Rect (2, 2, 40, 15);
+        var r = new Rectangle (2, 2, 40, 15);
         Application.Refresh ();
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FrameRuler;
         t.Draw (r, "Test");
@@ -214,7 +214,7 @@ public class ThicknessTests
                                             );
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (1, 1, 40, 15);
+        r = new Rectangle (1, 1, 40, 15);
         Application.Refresh ();
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FrameRuler;
         t.Draw (r, "Test");
@@ -246,7 +246,7 @@ public class ThicknessTests
                                             );
 
         t = new Thickness (1, 2, 3, 4);
-        r = new Rect (2, 2, 40, 15);
+        r = new Rectangle (2, 2, 40, 15);
         Application.Refresh ();
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FrameRuler;
         t.Draw (r, "Test");
@@ -278,7 +278,7 @@ public class ThicknessTests
                                                      );
 
         t = new Thickness (-1, 1, 1, 1);
-        r = new Rect (5, 5, 40, 15);
+        r = new Rectangle (5, 5, 40, 15);
         Application.Refresh ();
         ConsoleDriver.Diagnostics |= ConsoleDriver.DiagnosticFlags.FrameRuler;
         t.Draw (r, "Test");
@@ -344,15 +344,15 @@ public class ThicknessTests
     public void GetInsideTests_Mixed_Pos_Neg_Thickness_Non_Empty_Size ()
     {
         var t = new Thickness (-1, 1, -1, 1);
-        var r = new Rect (0, 0, 3, 3);
-        Rect inside = t.GetInside (r);
+        var r = new Rectangle (0, 0, 3, 3);
+        Rectangle inside = t.GetInside (r);
         Assert.Equal (-1, inside.X);
         Assert.Equal (1, inside.Y);
         Assert.Equal (5, inside.Width);
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (-1, 1, -1, 1);
-        r = new Rect (-1, -1, 3, 3);
+        r = new Rectangle (-1, -1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (-2, inside.X);
         Assert.Equal (0, inside.Y);
@@ -360,7 +360,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (-1, 1, -1, 1);
-        r = new Rect (1, 1, 3, 3);
+        r = new Rectangle (1, 1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (2, inside.Y);
@@ -368,7 +368,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (-2, -1, 0, 1);
-        r = new Rect (-1, 0, 50, 60);
+        r = new Rectangle (-1, 0, 50, 60);
         inside = t.GetInside (r);
         Assert.Equal (-3, inside.X);
         Assert.Equal (-1, inside.Y);
@@ -380,15 +380,15 @@ public class ThicknessTests
     public void GetInsideTests_Negative_Thickness_Non_Empty_Size ()
     {
         var t = new Thickness (-1, -1, -1, -1);
-        var r = new Rect (0, 0, 3, 3);
-        Rect inside = t.GetInside (r);
+        var r = new Rectangle (0, 0, 3, 3);
+        Rectangle inside = t.GetInside (r);
         Assert.Equal (-1, inside.X);
         Assert.Equal (-1, inside.Y);
         Assert.Equal (5, inside.Width);
         Assert.Equal (5, inside.Height);
 
         t = new Thickness (-1, -1, -1, -1);
-        r = new Rect (-1, -1, 3, 3);
+        r = new Rectangle (-1, -1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (-2, inside.X);
         Assert.Equal (-2, inside.Y);
@@ -396,7 +396,7 @@ public class ThicknessTests
         Assert.Equal (5, inside.Height);
 
         t = new Thickness (-1, -1, -1, -1);
-        r = new Rect (1, 1, 3, 3);
+        r = new Rectangle (1, 1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -404,7 +404,7 @@ public class ThicknessTests
         Assert.Equal (5, inside.Height);
 
         t = new Thickness (-1, -2, -3, -4);
-        r = new Rect (-1, 0, 50, 60);
+        r = new Rectangle (-1, 0, 50, 60);
         inside = t.GetInside (r);
         Assert.Equal (-2, inside.X);
         Assert.Equal (-2, inside.Y);
@@ -416,15 +416,15 @@ public class ThicknessTests
     public void GetInsideTests_Positive_Thickness_Non_Empty_Size ()
     {
         var t = new Thickness (1, 1, 1, 1);
-        var r = new Rect (0, 0, 3, 3);
-        Rect inside = t.GetInside (r);
+        var r = new Rectangle (0, 0, 3, 3);
+        Rectangle inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
         Assert.Equal (1, inside.Width);
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (-1, -1, 3, 3);
+        r = new Rectangle (-1, -1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -432,7 +432,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (1, 1, 3, 3);
+        r = new Rectangle (1, 1, 3, 3);
         inside = t.GetInside (r);
         Assert.Equal (2, inside.X);
         Assert.Equal (2, inside.Y);
@@ -440,7 +440,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (1, 2, 3, 4);
-        r = new Rect (-1, 0, 50, 60);
+        r = new Rectangle (-1, 0, 50, 60);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (2, inside.Y);
@@ -452,15 +452,15 @@ public class ThicknessTests
     public void GetInsideTests_Positive_Thickness_Too_Small_Rect_Means_Empty_Size ()
     {
         var t = new Thickness (1, 1, 1, 1);
-        var r = Rect.Empty;
-        Rect inside = t.GetInside (r);
+        var r = Rectangle.Empty;
+        Rectangle inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
         Assert.Equal (0, inside.Width);
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (0, 0, 1, 1);
+        r = new Rectangle (0, 0, 1, 1);
         inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
@@ -468,7 +468,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (1, 1, 1, 1);
+        r = new Rectangle (1, 1, 1, 1);
         inside = t.GetInside (r);
         Assert.Equal (2, inside.X);
         Assert.Equal (2, inside.Y);
@@ -476,7 +476,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (0, 0, 1, 0);
+        r = new Rectangle (0, 0, 1, 0);
         inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
@@ -484,7 +484,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (0, 0, 0, 1);
+        r = new Rectangle (0, 0, 0, 1);
         inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
@@ -492,7 +492,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (-1, -1, 0, 1);
+        r = new Rectangle (-1, -1, 0, 1);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -500,7 +500,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (0, 0, 2, 2);
+        r = new Rectangle (0, 0, 2, 2);
         inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
@@ -508,7 +508,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (-1, -1, 2, 2);
+        r = new Rectangle (-1, -1, 2, 2);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -516,7 +516,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 1, 1, 1);
-        r = new Rect (1, 1, 2, 2);
+        r = new Rectangle (1, 1, 2, 2);
         inside = t.GetInside (r);
         Assert.Equal (2, inside.X);
         Assert.Equal (2, inside.Y);
@@ -524,7 +524,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (1, 2, 3, 4);
-        r = new Rect (-1, 0, 4, 6);
+        r = new Rectangle (-1, 0, 4, 6);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (2, inside.Y);
@@ -536,15 +536,15 @@ public class ThicknessTests
     public void GetInsideTests_Zero_Thickness ()
     {
         var t = new Thickness (0, 0, 0, 0);
-        var r = Rect.Empty;
-        Rect inside = t.GetInside (r);
+        var r = Rectangle.Empty;
+        Rectangle inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
         Assert.Equal (0, inside.Width);
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (0, 0, 0, 0);
-        r = new Rect (0, 0, 1, 1);
+        r = new Rectangle (0, 0, 1, 1);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -552,7 +552,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (0, 0, 0, 0);
-        r = new Rect (1, 1, 1, 1);
+        r = new Rectangle (1, 1, 1, 1);
         inside = t.GetInside (r);
         Assert.Equal (1, inside.X);
         Assert.Equal (1, inside.Y);
@@ -560,7 +560,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (0, 0, 0, 0);
-        r = new Rect (0, 0, 1, 0);
+        r = new Rectangle (0, 0, 1, 0);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -568,7 +568,7 @@ public class ThicknessTests
         Assert.Equal (0, inside.Height);
 
         t = new Thickness (0, 0, 0, 0);
-        r = new Rect (0, 0, 0, 1);
+        r = new Rectangle (0, 0, 0, 1);
         inside = t.GetInside (r);
         Assert.Equal (0, inside.X);
         Assert.Equal (0, inside.Y);
@@ -576,7 +576,7 @@ public class ThicknessTests
         Assert.Equal (1, inside.Height);
 
         t = new Thickness (0, 0, 0, 0);
-        r = new Rect (-1, -1, 0, 1);
+        r = new Rectangle (-1, -1, 0, 1);
         inside = t.GetInside (r);
         Assert.Equal (-1, inside.X);
         Assert.Equal (-1, inside.Y);
@@ -644,7 +644,7 @@ public class ThicknessTests
     [InlineData (-1, -1, 10, 10, -2, -2, false)] // Outside the outer rectangle
     public void TestContains_Uniform1 (int x, int y, int width, int height, int pointX, int pointY, bool expected)
     {
-        var rect = new Rect (x, y, width, height);
+        var rect = new Rectangle (x, y, width, height);
         var thickness = new Thickness (1, 1, 1, 1); // Uniform thickness for simplicity
         bool result = thickness.Contains (rect, pointX, pointY);
         Assert.Equal (expected, result);
@@ -683,7 +683,7 @@ public class ThicknessTests
     [InlineData (-1, -1, 4, 4, 3, 3, false)] // outside outer rect
     public void TestContains_Uniform2 (int x, int y, int width, int height, int pointX, int pointY, bool expected)
     {
-        var rect = new Rect (x, y, width, height);
+        var rect = new Rectangle (x, y, width, height);
         var thickness = new Thickness (2, 2, 2, 2); // Uniform thickness for simplicity
         bool result = thickness.Contains (rect, pointX, pointY);
         Assert.Equal (expected, result);
@@ -718,7 +718,7 @@ public class ThicknessTests
         bool expected
     )
     {
-        var rect = new Rect (x, y, width, height);
+        var rect = new Rectangle (x, y, width, height);
         var thickness = new Thickness (0, 0, 0, 0); // Uniform thickness for simplicity
         bool result = thickness.Contains (rect, pointX, pointY);
         Assert.Equal (expected, result);

+ 5 - 5
UnitTests/TestHelpers.cs

@@ -312,7 +312,7 @@ internal partial class TestHelpers
     /// <param name="output"></param>
     /// <param name="driver">The ConsoleDriver to use. If null <see cref="Application.Driver"/> will be used.</param>
     /// <returns></returns>
-    public static Rect AssertDriverContentsWithFrameAre (
+    public static Rectangle AssertDriverContentsWithFrameAre (
         string expectedLook,
         ITestOutputHelper output,
         ConsoleDriver driver = null
@@ -423,7 +423,7 @@ internal partial class TestHelpers
 
         if (string.Equals (expectedLook, actualLook))
         {
-            return new Rect (x > -1 ? x : 0, y > -1 ? y : 0, w > -1 ? w : 0, h > -1 ? h : 0);
+            return new Rectangle (x > -1 ? x : 0, y > -1 ? y : 0, w > -1 ? w : 0, h > -1 ? h : 0);
         }
 
         // standardize line endings for the comparison
@@ -446,7 +446,7 @@ internal partial class TestHelpers
 
         Assert.Equal (expectedLook, actualLook);
 
-        return new Rect (x > -1 ? x : 0, y > -1 ? y : 0, w > -1 ? w : 0, h > -1 ? h : 0);
+        return new Rectangle (x > -1 ? x : 0, y > -1 ? y : 0, w > -1 ? w : 0, h > -1 ? h : 0);
     }
 
 #pragma warning disable xUnit1013 // Public method should be marked as test
@@ -582,9 +582,9 @@ internal partial class TestHelpers
 
     private static void AddArguments (Type paramType, List<object> pTypes)
     {
-        if (paramType == typeof (Rect))
+        if (paramType == typeof (Rectangle))
         {
-            pTypes.Add (Rect.Empty);
+            pTypes.Add (Rectangle.Empty);
         }
         else if (paramType == typeof (string))
         {

+ 21 - 21
UnitTests/Text/TextFormatterTests.cs

@@ -44,7 +44,7 @@ public class TextFormatterTests
     {
         var testText = "test";
         var expectedSize = new Size ();
-        var testBounds = new Rect (0, 0, 100, 1);
+        var testBounds = new Rectangle (0, 0, 100, 1);
         var tf = new TextFormatter ();
 
         tf.Text = testText;
@@ -91,9 +91,9 @@ public class TextFormatterTests
     [InlineData ("")]
     public void CalcRect_Invalid_Returns_Empty (string text)
     {
-        Assert.Equal (Rect.Empty, TextFormatter.CalcRect (0, 0, text));
-        Assert.Equal (new Rect (new Point (1, 2), Size.Empty), TextFormatter.CalcRect (1, 2, text));
-        Assert.Equal (new Rect (new Point (-1, -2), Size.Empty), TextFormatter.CalcRect (-1, -2, text));
+        Assert.Equal (Rectangle.Empty, TextFormatter.CalcRect (0, 0, text));
+        Assert.Equal (new Rectangle (new Point (1, 2), Size.Empty), TextFormatter.CalcRect (1, 2, text));
+        Assert.Equal (new Rectangle (new Point (-1, -2), Size.Empty), TextFormatter.CalcRect (-1, -2, text));
     }
 
     [Theory]
@@ -109,7 +109,7 @@ public class TextFormatterTests
     [InlineData (" ~  s  gui.cs   master\n↑10", 27, 2)]
     public void CalcRect_MultiLine_Returns_nHigh (string text, int expectedWidth, int expectedLines)
     {
-        Assert.Equal (new Rect (0, 0, expectedWidth, expectedLines), TextFormatter.CalcRect (0, 0, text));
+        Assert.Equal (new Rectangle (0, 0, expectedWidth, expectedLines), TextFormatter.CalcRect (0, 0, text));
         string [] lines = text.Split (text.Contains (Environment.NewLine) ? Environment.NewLine : "\n");
         int maxWidth = lines.Max (s => s.GetColumns ());
         var lineWider = 0;
@@ -124,10 +124,10 @@ public class TextFormatterTests
             }
         }
 
-        Assert.Equal (new Rect (0, 0, maxWidth, expectedLines), TextFormatter.CalcRect (0, 0, text));
+        Assert.Equal (new Rectangle (0, 0, maxWidth, expectedLines), TextFormatter.CalcRect (0, 0, text));
 
         Assert.Equal (
-                      new Rect (
+                      new Rectangle (
                                 0,
                                 0,
                                 lines [lineWider].ToRuneList ().Sum (r => Math.Max (r.GetColumns (), 0)),
@@ -142,8 +142,8 @@ public class TextFormatterTests
     [InlineData (" ~  s  gui.cs   master ↑10")]
     public void CalcRect_SingleLine_Returns_1High (string text)
     {
-        Assert.Equal (new Rect (0, 0, text.GetRuneCount (), 1), TextFormatter.CalcRect (0, 0, text));
-        Assert.Equal (new Rect (0, 0, text.GetColumns (), 1), TextFormatter.CalcRect (0, 0, text));
+        Assert.Equal (new Rectangle (0, 0, text.GetRuneCount (), 1), TextFormatter.CalcRect (0, 0, text));
+        Assert.Equal (new Rectangle (0, 0, text.GetColumns (), 1), TextFormatter.CalcRect (0, 0, text));
     }
 
     [Theory]
@@ -152,7 +152,7 @@ public class TextFormatterTests
     public void CalcRect_With_Combining_Runes (int width, int height, TextDirection textDirection)
     {
         var text = "Les Mise\u0328\u0301rables";
-        Assert.Equal (new Rect (0, 0, width, height), TextFormatter.CalcRect (0, 0, text, textDirection));
+        Assert.Equal (new Rectangle (0, 0, width, height), TextFormatter.CalcRect (0, 0, text, textDirection));
     }
 
     [Theory]
@@ -415,10 +415,10 @@ ssb
         }
 
         tf.Draw (
-                 new Rect (0, 0, width, height),
+                 new Rectangle (0, 0, width, height),
                  new Attribute (ColorName.White, ColorName.Black),
                  new Attribute (ColorName.Blue, ColorName.Black),
-                 default (Rect),
+                 default (Rectangle),
                  driver
                 );
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
@@ -440,7 +440,7 @@ ssb
         var tf = new TextFormatter { Size = new Size (14, 3), Text = "Test\nTest long\nTest long long\n", MultiLine = true };
 
         tf.Draw (
-                 new Rect (1, 1, 19, 3),
+                 new Rectangle (1, 1, 19, 3),
                  attrs [1],
                  attrs [2]);
 
@@ -466,7 +466,7 @@ ssb
         tf.FillRemaining = true;
 
         tf.Draw (
-                 new Rect (1, 1, 19, 3),
+                 new Rectangle (1, 1, 19, 3),
                  attrs [1],
                  attrs [2]);
 
@@ -1286,7 +1286,7 @@ ssb
     public void NeedsFormat_Sets ()
     {
         var testText = "test";
-        var testBounds = new Rect (0, 0, 100, 1);
+        var testBounds = new Rectangle (0, 0, 100, 1);
         var tf = new TextFormatter ();
 
         tf.Text = "test";
@@ -2060,10 +2060,10 @@ ssb
         Assert.Equal (new Size (width, height), tf.Size);
 
         tf.Draw (
-                 new Rect (0, 0, width, height),
+                 new Rectangle (0, 0, width, height),
                  new Attribute (ColorName.White, ColorName.Black),
                  new Attribute (ColorName.Blue, ColorName.Black),
-                 default (Rect),
+                 default (Rectangle),
                  driver
                 );
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
@@ -2098,10 +2098,10 @@ ssb
         Assert.Equal (new Size (width, height), tf.Size);
 
         tf.Draw (
-                 new Rect (0, 0, width, height),
+                 new Rectangle (0, 0, width, height),
                  new Attribute (ColorName.White, ColorName.Black),
                  new Attribute (ColorName.Blue, ColorName.Black),
-                 default (Rect),
+                 default (Rectangle),
                  driver
                 );
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);
@@ -2136,10 +2136,10 @@ ssb
         Assert.Equal (new Size (width, height), tf.Size);
 
         tf.Draw (
-                 new Rect (0, 0, width, height),
+                 new Rectangle (0, 0, width, height),
                  new Attribute (ColorName.White, ColorName.Black),
                  new Attribute (ColorName.Blue, ColorName.Black),
-                 default (Rect),
+                 default (Rectangle),
                  driver
                 );
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output, driver);

+ 80 - 80
UnitTests/Types/RectTests.cs → UnitTests/Types/RectangleTests.cs

@@ -1,6 +1,6 @@
 namespace Terminal.Gui.TypeTests;
 
-public class RectTests
+public class RectangleTests
 {
     [Theory]
 
@@ -178,7 +178,7 @@ public class RectTests
         int expectedHeight
     )
     {
-        var rect = new Rect (x, y, width, height);
+        var rect = new Rectangle (x, y, width, height);
 
         if (rect.Width + inflateWidth < 0 || rect.Height + inflateHeight < 0)
         {
@@ -195,7 +195,7 @@ public class RectTests
         Assert.Equal (exptectedY, rect.Y);
 
         // Use the other overload (Size)
-        rect = new Rect (x, y, width, height);
+        rect = new Rectangle (x, y, width, height);
 
         if (rect.Width + inflateWidth < 0 || rect.Height + inflateHeight < 0)
         {
@@ -215,7 +215,7 @@ public class RectTests
     [Fact]
     public void Negative_X_Y_Positions ()
     {
-        var rect = new Rect (-10, -5, 100, 50);
+        var rect = new Rectangle (-10, -5, 100, 50);
         int yCount = 0, xCount = 0, yxCount = 0;
 
         for (int line = rect.Y; line < rect.Y + rect.Height; line++)
@@ -238,7 +238,7 @@ public class RectTests
     [Fact]
     public void Positive_X_Y_Positions ()
     {
-        var rect = new Rect (10, 5, 100, 50);
+        var rect = new Rectangle (10, 5, 100, 50);
         int yCount = 0, xCount = 0, yxCount = 0;
 
         for (int line = rect.Y; line < rect.Y + rect.Height; line++)
@@ -261,7 +261,7 @@ public class RectTests
     [Fact]
     public void Rect_Contains ()
     {
-        var rect = new Rect (0, 0, 3, 3);
+        var rect = new Rectangle (0, 0, 3, 3);
         Assert.True (rect.Contains (new Point (1, 1)));
         Assert.True (rect.Contains (new Point (1, 2)));
         Assert.True (rect.Contains (new Point (2, 1)));
@@ -273,17 +273,17 @@ public class RectTests
         Assert.False (rect.Contains (new Point (2, 3)));
         Assert.False (rect.Contains (new Point (3, 3)));
 
-        Assert.True (rect.Contains (new Rect (1, 1, 2, 2)));
-        Assert.True (rect.Contains (new Rect (1, 2, 2, 1)));
-        Assert.True (rect.Contains (new Rect (2, 1, 1, 2)));
-        Assert.True (rect.Contains (new Rect (2, 2, 1, 1)));
-        Assert.True (rect.Contains (new Rect (0, 0, 3, 3)));
+        Assert.True (rect.Contains (new Rectangle (1, 1, 2, 2)));
+        Assert.True (rect.Contains (new Rectangle (1, 2, 2, 1)));
+        Assert.True (rect.Contains (new Rectangle (2, 1, 1, 2)));
+        Assert.True (rect.Contains (new Rectangle (2, 2, 1, 1)));
+        Assert.True (rect.Contains (new Rectangle (0, 0, 3, 3)));
 
-        Assert.False (rect.Contains (new Rect (-1, 1, 3, 3)));
-        Assert.False (rect.Contains (new Rect (1, -1, 3, 3)));
-        Assert.False (rect.Contains (new Rect (3, 2, 3, 3)));
-        Assert.False (rect.Contains (new Rect (2, 3, 3, 3)));
-        Assert.False (rect.Contains (new Rect (3, 3, 3, 3)));
+        Assert.False (rect.Contains (new Rectangle (-1, 1, 3, 3)));
+        Assert.False (rect.Contains (new Rectangle (1, -1, 3, 3)));
+        Assert.False (rect.Contains (new Rectangle (3, 2, 3, 3)));
+        Assert.False (rect.Contains (new Rectangle (2, 3, 3, 3)));
+        Assert.False (rect.Contains (new Rectangle (3, 3, 3, 3)));
 
         Assert.True (rect.Contains (1, 1));
         Assert.True (rect.Contains (1, 2));
@@ -300,43 +300,43 @@ public class RectTests
     [Fact]
     public void Rect_Equals ()
     {
-        var rect1 = new Rect ();
-        var rect2 = new Rect ();
+        var rect1 = new Rectangle ();
+        var rect2 = new Rectangle ();
         Assert.Equal (rect1, rect2);
 
-        rect1 = new Rect (1, 2, 3, 4);
-        rect2 = new Rect (1, 2, 3, 4);
+        rect1 = new Rectangle (1, 2, 3, 4);
+        rect2 = new Rectangle (1, 2, 3, 4);
         Assert.Equal (rect1, rect2);
 
-        rect1 = new Rect (1, 2, 3, 4);
-        rect2 = new Rect (-1, 2, 3, 4);
+        rect1 = new Rectangle (1, 2, 3, 4);
+        rect2 = new Rectangle (-1, 2, 3, 4);
         Assert.NotEqual (rect1, rect2);
     }
 
     [Fact]
     public void Rect_New ()
     {
-        var rect = new Rect ();
+        var rect = new Rectangle ();
         Assert.True (rect.IsEmpty);
 
-        rect = new Rect (new Point (), new Size ());
+        rect = new Rectangle (new Point (), new Size ());
         Assert.True (rect.IsEmpty);
 
-        rect = new Rect (1, 2, 3, 4);
+        rect = new Rectangle (1, 2, 3, 4);
         Assert.False (rect.IsEmpty);
 
-        rect = new Rect (-1, -2, 3, 4);
+        rect = new Rectangle (-1, -2, 3, 4);
         Assert.False (rect.IsEmpty);
 
-        Action action = () => new Rect (1, 2, -3, 4);
+        Action action = () => new Rectangle (1, 2, -3, 4);
         var ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Width must be greater or equal to 0.", ex.Message);
 
-        action = () => new Rect (1, 2, 3, -4);
+        action = () => new Rectangle (1, 2, 3, -4);
         ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Height must be greater or equal to 0.", ex.Message);
 
-        action = () => new Rect (1, 2, -3, -4);
+        action = () => new Rectangle (1, 2, -3, -4);
         ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Width must be greater or equal to 0.", ex.Message);
     }
@@ -344,27 +344,27 @@ public class RectTests
     [Fact]
     public void Rect_SetsValue ()
     {
-        var rect = new Rect { X = 0, Y = 0 };
+        var rect = new Rectangle { X = 0, Y = 0 };
         Assert.True (rect.IsEmpty);
 
-        rect = new Rect { X = -1, Y = -2 };
+        rect = new Rectangle { X = -1, Y = -2 };
         Assert.False (rect.IsEmpty);
 
-        rect = new Rect { Width = 3, Height = 4 };
+        rect = new Rectangle { Width = 3, Height = 4 };
         Assert.False (rect.IsEmpty);
 
-        rect = new Rect { X = -1, Y = -2, Width = 3, Height = 4 };
+        rect = new Rectangle { X = -1, Y = -2, Width = 3, Height = 4 };
         Assert.False (rect.IsEmpty);
 
-        Action action = () => { rect = new Rect { X = -1, Y = -2, Width = -3, Height = 4 }; };
+        Action action = () => { rect = new Rectangle { X = -1, Y = -2, Width = -3, Height = 4 }; };
         var ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Width must be greater or equal to 0.", ex.Message);
 
-        action = () => { rect = new Rect { X = -1, Y = -2, Width = 3, Height = -4 }; };
+        action = () => { rect = new Rectangle { X = -1, Y = -2, Width = 3, Height = -4 }; };
         ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Height must be greater or equal to 0.", ex.Message);
 
-        action = () => { rect = new Rect { X = -1, Y = -2, Width = -3, Height = -4 }; };
+        action = () => { rect = new Rectangle { X = -1, Y = -2, Width = -3, Height = -4 }; };
         ex = Assert.Throws<ArgumentException> (action);
         Assert.Equal ("Width must be greater or equal to 0.", ex.Message);
     }
@@ -372,139 +372,139 @@ public class RectTests
     [Fact]
     public void Union_EmptyRectangles ()
     {
-        var r1 = new Rect (0, 0, 0, 0);
-        var r2 = new Rect (1, 1, 0, 0);
-        Rect result = Rect.Union (r1, r2);
-        Assert.Equal (new Rect (0, 0, 1, 1), result);
+        var r1 = new Rectangle (0, 0, 0, 0);
+        var r2 = new Rectangle (1, 1, 0, 0);
+        Rectangle result = Rectangle.Union (r1, r2);
+        Assert.Equal (new Rectangle (0, 0, 1, 1), result);
     }
 
     [Fact]
     public void Union_NegativeCoords ()
     {
         // arrange
-        var rect1 = new Rect (-2, -2, 4, 4);
-        var rect2 = new Rect (-1, -1, 5, 5);
+        var rect1 = new Rectangle (-2, -2, 4, 4);
+        var rect2 = new Rectangle (-1, -1, 5, 5);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (-2, -2, 6, 6), result);
+        Assert.Equal (new Rectangle (-2, -2, 6, 6), result);
     }
 
     [Fact]
     public void Union_PositiveCoords ()
     {
-        var r1 = new Rect (0, 0, 2, 2);
-        var r2 = new Rect (1, 1, 2, 2);
-        Rect result = Rect.Union (r1, r2);
-        Assert.Equal (new Rect (0, 0, 3, 3), result);
+        var r1 = new Rectangle (0, 0, 2, 2);
+        var r2 = new Rectangle (1, 1, 2, 2);
+        Rectangle result = Rectangle.Union (r1, r2);
+        Assert.Equal (new Rectangle (0, 0, 3, 3), result);
     }
 
     [Fact]
     public void Union_RectangleAHasNegativeCoordinates_ReturnsCombinedRectangle ()
     {
         // arrange
-        var rect1 = new Rect (-2, -2, 5, 5);
-        var rect2 = new Rect (3, 3, 4, 4);
+        var rect1 = new Rectangle (-2, -2, 5, 5);
+        var rect2 = new Rectangle (3, 3, 4, 4);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (-2, -2, 9, 9), result);
+        Assert.Equal (new Rectangle (-2, -2, 9, 9), result);
     }
 
     [Fact]
     public void Union_RectangleAIsLarger_ReturnsA ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 6, 6);
-        var rect2 = new Rect (2, 2, 3, 3);
+        var rect1 = new Rectangle (1, 1, 6, 6);
+        var rect2 = new Rectangle (2, 2, 3, 3);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 6, 6), result);
+        Assert.Equal (new Rectangle (1, 1, 6, 6), result);
     }
 
     [Fact]
     public void Union_RectangleBIsLarger_ReturnsB ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 3, 3);
-        var rect2 = new Rect (2, 2, 6, 6);
+        var rect1 = new Rectangle (1, 1, 3, 3);
+        var rect2 = new Rectangle (2, 2, 6, 6);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 7, 7), result);
+        Assert.Equal (new Rectangle (1, 1, 7, 7), result);
     }
 
     [Fact]
     public void Union_RectanglesDoNotOverlap_ReturnsCombinedRectangle ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 3, 3);
-        var rect2 = new Rect (5, 5, 3, 3);
+        var rect1 = new Rectangle (1, 1, 3, 3);
+        var rect2 = new Rectangle (5, 5, 3, 3);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 7, 7), result);
+        Assert.Equal (new Rectangle (1, 1, 7, 7), result);
     }
 
     [Fact]
     public void Union_RectanglesOverlap_ReturnsCombinedRectangle ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 3, 3);
-        var rect2 = new Rect (2, 2, 3, 3);
+        var rect1 = new Rectangle (1, 1, 3, 3);
+        var rect2 = new Rectangle (2, 2, 3, 3);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 4, 4), result);
+        Assert.Equal (new Rectangle (1, 1, 4, 4), result);
     }
 
     [Fact]
     public void Union_RectanglesTouchHorizontally_ReturnsCombinedRectangle ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 3, 3);
-        var rect2 = new Rect (4, 2, 3, 3);
+        var rect1 = new Rectangle (1, 1, 3, 3);
+        var rect2 = new Rectangle (4, 2, 3, 3);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 6, 4), result);
+        Assert.Equal (new Rectangle (1, 1, 6, 4), result);
     }
 
     [Fact]
     public void Union_RectanglesTouchVertically_ReturnsCombinedRectangle ()
     {
         // arrange
-        var rect1 = new Rect (1, 1, 3, 3);
-        var rect2 = new Rect (2, 4, 3, 3);
+        var rect1 = new Rectangle (1, 1, 3, 3);
+        var rect2 = new Rectangle (2, 4, 3, 3);
 
         // act
-        Rect result = Rect.Union (rect1, rect2);
+        Rectangle result = Rectangle.Union (rect1, rect2);
 
         // assert
-        Assert.Equal (new Rect (1, 1, 4, 6), result);
+        Assert.Equal (new Rectangle (1, 1, 4, 6), result);
     }
 
     [Fact]
     public void Union_SameRectangle ()
     {
-        var r1 = new Rect (0, 0, 2, 2);
-        var r2 = new Rect (0, 0, 2, 2);
-        Rect result = Rect.Union (r1, r2);
-        Assert.Equal (new Rect (0, 0, 2, 2), result);
+        var r1 = new Rectangle (0, 0, 2, 2);
+        var r2 = new Rectangle (0, 0, 2, 2);
+        Rectangle result = Rectangle.Union (r1, r2);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), result);
     }
 }

+ 16 - 16
UnitTests/View/Adornment/AdornmentTests.cs

@@ -15,14 +15,14 @@ public class AdornmentTests
         parent.BeginInit ();
         parent.EndInit ();
 
-        Assert.Equal (new Rect (1, 2, 10, 10), parent.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Margin.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Margin.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 10, 10), parent.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Margin.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Margin.Bounds);
 
         Assert.Null (parent.Margin.SuperView);
-        Rect boundsAsScreen = parent.Margin.BoundsToScreen (new Rect (1, 2, 5, 5));
-        Assert.Equal (new Rect (2, 4, 5, 5), boundsAsScreen);
+        Rectangle boundsAsScreen = parent.Margin.BoundsToScreen (new Rectangle (1, 2, 5, 5));
+        Assert.Equal (new Rectangle (2, 4, 5, 5), boundsAsScreen);
     }
 
     [Fact]
@@ -33,13 +33,13 @@ public class AdornmentTests
         parent.BeginInit ();
         parent.EndInit ();
 
-        Assert.Equal (new Rect (1, 2, 10, 10), parent.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Margin.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Margin.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 10, 10), parent.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Margin.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Margin.Bounds);
 
         Assert.Null (parent.Margin.SuperView);
-        Assert.Equal (new Rect (1, 2, 10, 10), parent.Margin.FrameToScreen ());
+        Assert.Equal (new Rectangle (1, 2, 10, 10), parent.Margin.FrameToScreen ());
     }
 
     [Fact]
@@ -72,7 +72,7 @@ public class AdornmentTests
     public void Setting_Bounds_Throws ()
     {
         var adornment = new Adornment (null);
-        Assert.Throws<InvalidOperationException> (() => adornment.Bounds = new Rect (1, 2, 3, 4));
+        Assert.Throws<InvalidOperationException> (() => adornment.Bounds = new Rectangle (1, 2, 3, 4));
     }
 
     [Fact]
@@ -96,12 +96,12 @@ public class AdornmentTests
         parent.BeginInit ();
         parent.EndInit ();
 
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Bounds);
 
         parent.Margin.Thickness = new Thickness (1);
-        Assert.Equal (new Rect (0, 0, 10, 10), parent.Frame);
-        Assert.Equal (new Rect (0, 0, 8, 8), parent.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), parent.Frame);
+        Assert.Equal (new Rectangle (0, 0, 8, 8), parent.Bounds);
     }
 
     [Fact]

+ 34 - 34
UnitTests/View/Adornment/BorderTests.cs

@@ -98,7 +98,7 @@ public class BorderTests
         switch (width)
         {
             case 1:
-                Assert.Equal (new Rect (0, 0, 1, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 1, 5), win.Frame);
 
                 expected = @"
@@ -107,7 +107,7 @@ public class BorderTests
 
                 break;
             case 2:
-                Assert.Equal (new Rect (0, 0, 2, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 2, 5), win.Frame);
 
                 expected = @"
 ╔╗
@@ -116,7 +116,7 @@ public class BorderTests
 
                 break;
             case 3:
-                Assert.Equal (new Rect (0, 0, 3, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 3, 5), win.Frame);
 
                 expected = @"
 ╔═╗
@@ -125,7 +125,7 @@ public class BorderTests
 
                 break;
             case 4:
-                Assert.Equal (new Rect (0, 0, 4, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 4, 5), win.Frame);
 
                 expected = @"
  ╒╕ 
@@ -135,7 +135,7 @@ public class BorderTests
 
                 break;
             case 5:
-                Assert.Equal (new Rect (0, 0, 5, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 5, 5), win.Frame);
 
                 expected = @"
  ╒═╕ 
@@ -145,7 +145,7 @@ public class BorderTests
 
                 break;
             case 6:
-                Assert.Equal (new Rect (0, 0, 6, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 6, 5), win.Frame);
 
                 expected = @"
  ╒══╕ 
@@ -155,7 +155,7 @@ public class BorderTests
 
                 break;
             case 7:
-                Assert.Equal (new Rect (0, 0, 7, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 7, 5), win.Frame);
 
                 expected = @"
  ╒═══╕ 
@@ -165,7 +165,7 @@ public class BorderTests
 
                 break;
             case 8:
-                Assert.Equal (new Rect (0, 0, 8, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 8, 5), win.Frame);
 
                 expected = @"
  ╒════╕ 
@@ -175,7 +175,7 @@ public class BorderTests
 
                 break;
             case 9:
-                Assert.Equal (new Rect (0, 0, 9, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 9, 5), win.Frame);
 
                 expected = @"
  ╒════╕  
@@ -185,7 +185,7 @@ public class BorderTests
 
                 break;
             case 10:
-                Assert.Equal (new Rect (0, 0, 10, 5), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 10, 5), win.Frame);
 
                 expected = @"
  ╒════╕   
@@ -231,7 +231,7 @@ public class BorderTests
         switch (width)
         {
             case 1:
-                Assert.Equal (new Rect (0, 0, 1, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 1, 4), win.Frame);
 
                 expected = @"
@@ -240,7 +240,7 @@ public class BorderTests
 
                 break;
             case 2:
-                Assert.Equal (new Rect (0, 0, 2, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 2, 4), win.Frame);
 
                 expected = @"
 ╔╗
@@ -249,7 +249,7 @@ public class BorderTests
 
                 break;
             case 3:
-                Assert.Equal (new Rect (0, 0, 3, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 3, 4), win.Frame);
 
                 expected = @"
 ╔═╗
@@ -258,7 +258,7 @@ public class BorderTests
 
                 break;
             case 4:
-                Assert.Equal (new Rect (0, 0, 4, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 4, 4), win.Frame);
 
                 expected = @"
  ╒╕ 
@@ -268,7 +268,7 @@ public class BorderTests
 
                 break;
             case 5:
-                Assert.Equal (new Rect (0, 0, 5, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 5, 4), win.Frame);
 
                 expected = @"
  ╒═╕ 
@@ -278,7 +278,7 @@ public class BorderTests
 
                 break;
             case 6:
-                Assert.Equal (new Rect (0, 0, 6, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 6, 4), win.Frame);
 
                 expected = @"
  ╒══╕ 
@@ -288,7 +288,7 @@ public class BorderTests
 
                 break;
             case 7:
-                Assert.Equal (new Rect (0, 0, 7, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 7, 4), win.Frame);
 
                 expected = @"
  ╒═══╕ 
@@ -298,7 +298,7 @@ public class BorderTests
 
                 break;
             case 8:
-                Assert.Equal (new Rect (0, 0, 8, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 8, 4), win.Frame);
 
                 expected = @"
  ╒════╕ 
@@ -308,7 +308,7 @@ public class BorderTests
 
                 break;
             case 9:
-                Assert.Equal (new Rect (0, 0, 9, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 9, 4), win.Frame);
 
                 expected = @"
  ╒════╕  
@@ -318,7 +318,7 @@ public class BorderTests
 
                 break;
             case 10:
-                Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
 
                 expected = @"
  ╒════╕   
@@ -364,7 +364,7 @@ public class BorderTests
         switch (width)
         {
             case 1:
-                Assert.Equal (new Rect (0, 0, 1, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 1, 4), win.Frame);
 
                 expected = @"
@@ -373,7 +373,7 @@ public class BorderTests
 
                 break;
             case 2:
-                Assert.Equal (new Rect (0, 0, 2, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 2, 4), win.Frame);
 
                 expected = @"
 ╔╗
@@ -382,7 +382,7 @@ public class BorderTests
 
                 break;
             case 3:
-                Assert.Equal (new Rect (0, 0, 3, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 3, 4), win.Frame);
 
                 expected = @"
 ╔═╗
@@ -391,7 +391,7 @@ public class BorderTests
 
                 break;
             case 4:
-                Assert.Equal (new Rect (0, 0, 4, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 4, 4), win.Frame);
 
                 expected = @"
  ╒╕ 
@@ -401,7 +401,7 @@ public class BorderTests
 
                 break;
             case 5:
-                Assert.Equal (new Rect (0, 0, 5, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 5, 4), win.Frame);
 
                 expected = @"
  ╒═╕ 
@@ -411,7 +411,7 @@ public class BorderTests
 
                 break;
             case 6:
-                Assert.Equal (new Rect (0, 0, 6, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 6, 4), win.Frame);
 
                 expected = @"
  ╒══╕ 
@@ -421,7 +421,7 @@ public class BorderTests
 
                 break;
             case 7:
-                Assert.Equal (new Rect (0, 0, 7, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 7, 4), win.Frame);
 
                 expected = @"
  ╒═══╕ 
@@ -431,7 +431,7 @@ public class BorderTests
 
                 break;
             case 8:
-                Assert.Equal (new Rect (0, 0, 8, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 8, 4), win.Frame);
 
                 expected = @"
  ╒════╕ 
@@ -441,7 +441,7 @@ public class BorderTests
 
                 break;
             case 9:
-                Assert.Equal (new Rect (0, 0, 9, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 9, 4), win.Frame);
 
                 expected = @"
  ╒════╕  
@@ -451,7 +451,7 @@ public class BorderTests
 
                 break;
             case 10:
-                Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
+                Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
 
                 expected = @"
  ╒════╕   
@@ -669,8 +669,8 @@ public class BorderTests
 
         var view = new View { X = frameX, Y = frameY, Width = 10, Height = 10 };
         super.Add (view);
-        var expected = new Rect (expectedScreenX, expectedScreenY, 10, 10);
-        Rect actual = view.FrameToScreen ();
+        var expected = new Rectangle (expectedScreenX, expectedScreenY, 10, 10);
+        Rectangle actual = view.FrameToScreen ();
         Assert.Equal (expected, actual);
     }
 
@@ -701,8 +701,8 @@ public class BorderTests
 
         var view = new View { X = frameX, Y = frameY, Width = 10, Height = 10 };
         super.Add (view);
-        var expected = new Rect (expectedScreenX, expectedScreenY, 10, 10);
-        Rect actual = view.FrameToScreen ();
+        var expected = new Rectangle (expectedScreenX, expectedScreenY, 10, 10);
+        Rectangle actual = view.FrameToScreen ();
         Assert.Equal (expected, actual);
     }
 

+ 2 - 2
UnitTests/View/DrawTests.cs

@@ -108,8 +108,8 @@ public class DrawTests
 │これは広いルーンラインです。│
 └────────────────────────────┘";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 10), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 10), pos);
     }
 
     [Fact]

+ 4 - 4
UnitTests/View/FrameTests.cs

@@ -17,8 +17,8 @@ public class FrameTests
     public void FrameToScreen_NoSuperView (int frameX, int frameY, int expectedScreenX, int expectedScreenY)
     {
         var view = new View { X = frameX, Y = frameY, Width = 10, Height = 10 };
-        var expected = new Rect (expectedScreenX, expectedScreenY, 10, 10);
-        Rect actual = view.FrameToScreen ();
+        var expected = new Rectangle (expectedScreenX, expectedScreenY, 10, 10);
+        Rectangle actual = view.FrameToScreen ();
         Assert.Equal (expected, actual);
     }
 
@@ -42,8 +42,8 @@ public class FrameTests
 
         var view = new View { X = frameX, Y = frameY, Width = 10, Height = 10 };
         super.Add (view);
-        var expected = new Rect (expectedScreenX, expectedScreenY, 10, 10);
-        Rect actual = view.FrameToScreen ();
+        var expected = new Rectangle (expectedScreenX, expectedScreenY, 10, 10);
+        Rectangle actual = view.FrameToScreen ();
         Assert.Equal (expected, actual);
     }
 }

+ 52 - 52
UnitTests/View/Layout/AbsoluteLayoutTests.cs

@@ -15,8 +15,8 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_Frame ()
     {
-        var frame = new Rect (1, 2, 3, 4);
-        var newFrame = new Rect (1, 2, 30, 40);
+        var frame = new Rectangle (1, 2, 3, 4);
+        var newFrame = new Rectangle (1, 2, 30, 40);
 
         var v = new View ();
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
@@ -30,7 +30,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
@@ -45,7 +45,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
@@ -54,14 +54,14 @@ public class AbsoluteLayoutTests
         Assert.Equal (Dim.Sized (40), v.Height);
         v.Dispose ();
 
-        newFrame = new Rect (10, 20, 30, 40);
+        newFrame = new Rectangle (10, 20, 30, 40);
         v = new View { Frame = frame };
         v.Frame = newFrame;
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (10), v.X);
@@ -76,7 +76,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (10), v.X);
@@ -90,8 +90,8 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_Height_or_Width_Absolute ()
     {
-        var frame = new Rect (1, 2, 3, 4);
-        var newFrame = new Rect (1, 2, 30, 40);
+        var frame = new Rectangle (1, 2, 3, 4);
+        var newFrame = new Rectangle (1, 2, 30, 40);
 
         var v = new View { Frame = frame };
         v.Height = newFrame.Height;
@@ -100,7 +100,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
@@ -114,7 +114,7 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_Height_or_Width_MakesComputed ()
     {
-        var v = new View { Frame = Rect.Empty };
+        var v = new View { Frame = Rectangle.Empty };
         v.Height = Dim.Fill ();
         v.Width = Dim.Fill ();
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
@@ -125,8 +125,8 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_X_or_Y_Absolute ()
     {
-        var frame = new Rect (1, 2, 3, 4);
-        var newFrame = new Rect (10, 20, 3, 4);
+        var frame = new Rectangle (1, 2, 3, 4);
+        var newFrame = new Rectangle (10, 20, 3, 4);
 
         var v = new View { Frame = frame };
         v.X = newFrame.X;
@@ -135,7 +135,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (newFrame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, newFrame.Width, newFrame.Height),
+                      new Rectangle (0, 0, newFrame.Width, newFrame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal ($"Absolute({newFrame.X})", v.X.ToString ());
@@ -149,7 +149,7 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_X_or_Y_MakesComputed ()
     {
-        var v = new View { Frame = Rect.Empty };
+        var v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
@@ -160,7 +160,7 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_Change_X_Y_Height_Width_Absolute ()
     {
-        var v = new View { Frame = Rect.Empty };
+        var v = new View { Frame = Rectangle.Empty };
         v.X = 1;
         v.Y = 2;
         v.Height = 3;
@@ -168,7 +168,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -176,7 +176,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -187,7 +187,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -198,7 +198,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -209,7 +209,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -220,7 +220,7 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Computed);
         v.Dispose ();
 
-        v = new View { Frame = Rect.Empty };
+        v = new View { Frame = Rectangle.Empty };
         v.X = Pos.Center ();
         v.Y = Pos.Center ();
         v.Width = Dim.Fill ();
@@ -243,13 +243,13 @@ public class AbsoluteLayoutTests
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         v.Dispose ();
 
-        var frame = Rect.Empty;
+        var frame = Rectangle.Empty;
         v = new View { Frame = frame };
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, frame.Width, frame.Height),
+                      new Rectangle (0, 0, frame.Width, frame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (0), v.X);
@@ -258,13 +258,13 @@ public class AbsoluteLayoutTests
         Assert.Equal (Dim.Sized (0), v.Height);
         v.Dispose ();
 
-        frame = new Rect (1, 2, 3, 4);
+        frame = new Rectangle (1, 2, 3, 4);
         v = new View { Frame = frame };
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, frame.Width, frame.Height),
+                      new Rectangle (0, 0, frame.Width, frame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
@@ -278,7 +278,7 @@ public class AbsoluteLayoutTests
         Assert.Equal (frame, v.Frame);
 
         Assert.Equal (
-                      new Rect (0, 0, frame.Width, frame.Height),
+                      new Rectangle (0, 0, frame.Width, frame.Height),
                       v.Bounds
                      ); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
@@ -293,8 +293,8 @@ public class AbsoluteLayoutTests
         // BUGBUG: v2 - I think the default size should be 0,0 not 1,1
         // That is correct it should be 0,0 because AutoSize is false
         // and the size wasn't set on the initializer
-        Assert.Equal (new Rect (frame.X, frame.Y, 0, 0), v.Frame);
-        Assert.Equal (new Rect (0, 0, 0, 0), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
+        Assert.Equal (new Rectangle (frame.X, frame.Y, 0, 0), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (0), v.Width);
@@ -303,8 +303,8 @@ public class AbsoluteLayoutTests
 
         v = new View ();
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
-        Assert.Equal (new Rect (0, 0, 0, 0), v.Frame);
-        Assert.Equal (new Rect (0, 0, 0, 0), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
+        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (0), v.X);
         Assert.Equal (Pos.At (0), v.Y);
         Assert.Equal (Dim.Sized (0), v.Width);
@@ -313,8 +313,8 @@ public class AbsoluteLayoutTests
 
         v = new View { X = frame.X, Y = frame.Y, Width = frame.Width, Height = frame.Height };
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
-        Assert.Equal (new Rect (frame.X, frame.Y, 3, 4), v.Frame);
-        Assert.Equal (new Rect (0, 0, 3, 4), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
+        Assert.Equal (new Rectangle (frame.X, frame.Y, 3, 4), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 4), v.Bounds); // With Absolute Bounds *is* deterministic before Layout
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (3), v.Width);
@@ -326,7 +326,7 @@ public class AbsoluteLayoutTests
     [TestRespondersDisposed]
     public void AbsoluteLayout_LayoutSubviews ()
     {
-        var superRect = new Rect (0, 0, 100, 100);
+        var superRect = new Rectangle (0, 0, 100, 100);
         var super = new View { Frame = superRect, Text = "super" };
         Assert.True (super.LayoutStyle == LayoutStyle.Absolute);
         var v1 = new View { X = 0, Y = 0, Width = 10, Height = 10 };
@@ -340,8 +340,8 @@ public class AbsoluteLayoutTests
         Assert.True (v2.LayoutStyle == LayoutStyle.Absolute);
 
         super.LayoutSubviews ();
-        Assert.Equal (new Rect (0, 0, 10, 10), v1.Frame);
-        Assert.Equal (new Rect (10, 10, 10, 10), v2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), v1.Frame);
+        Assert.Equal (new Rectangle (10, 10, 10, 10), v2.Frame);
         super.Dispose ();
     }
 
@@ -350,19 +350,19 @@ public class AbsoluteLayoutTests
     {
         // TODO: Should we enforce Bounds.X/Y == 0? The code currently ignores value.X/Y which is
         // TODO: correct behavior, but is silent. Perhaps an exception?
-        var frame = new Rect (1, 2, 3, 4);
-        var newBounds = new Rect (10, 20, 30, 40);
+        var frame = new Rectangle (1, 2, 3, 4);
+        var newBounds = new Rectangle (10, 20, 30, 40);
         var view = new View { Frame = frame };
         view.Bounds = newBounds;
-        Assert.Equal (new Rect (0, 0, 30, 40), view.Bounds);
-        Assert.Equal (new Rect (1, 2, 30, 40), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 30, 40), view.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 30, 40), view.Frame);
     }
 
     [Fact]
     public void AbsoluteLayout_Setting_Bounds_Sets_Frame ()
     {
-        var frame = new Rect (1, 2, 3, 4);
-        var newBounds = new Rect (0, 0, 30, 40);
+        var frame = new Rectangle (1, 2, 3, 4);
+        var newBounds = new Rectangle (0, 0, 30, 40);
 
         var v = new View { Frame = frame };
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
@@ -370,18 +370,18 @@ public class AbsoluteLayoutTests
         v.Bounds = newBounds;
         Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
         Assert.Equal (newBounds, v.Bounds);
-        Assert.Equal (new Rect (1, 2, newBounds.Width, newBounds.Height), v.Frame);
-        Assert.Equal (new Rect (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
+        Assert.Equal (new Rectangle (1, 2, newBounds.Width, newBounds.Height), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (30), v.Width);
         Assert.Equal (Dim.Sized (40), v.Height);
 
-        newBounds = new Rect (0, 0, 3, 4);
+        newBounds = new Rectangle (0, 0, 3, 4);
         v.Bounds = newBounds;
         Assert.Equal (newBounds, v.Bounds);
-        Assert.Equal (new Rect (1, 2, newBounds.Width, newBounds.Height), v.Frame);
-        Assert.Equal (new Rect (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
+        Assert.Equal (new Rectangle (1, 2, newBounds.Width, newBounds.Height), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (3), v.Width);
@@ -390,23 +390,23 @@ public class AbsoluteLayoutTests
         v.BorderStyle = LineStyle.Single;
 
         // Bounds should shrink
-        Assert.Equal (new Rect (0, 0, 1, 2), v.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 1, 2), v.Bounds);
 
         // Frame should not change
-        Assert.Equal (new Rect (1, 2, 3, 4), v.Frame);
+        Assert.Equal (new Rectangle (1, 2, 3, 4), v.Frame);
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (3), v.Width);
         Assert.Equal (Dim.Sized (4), v.Height);
 
         // Now set bounds bigger as before
-        newBounds = new Rect (0, 0, 3, 4);
+        newBounds = new Rectangle (0, 0, 3, 4);
         v.Bounds = newBounds;
         Assert.Equal (newBounds, v.Bounds);
 
         // Frame grows because there's now a border
-        Assert.Equal (new Rect (1, 2, 5, 6), v.Frame);
-        Assert.Equal (new Rect (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 5, 6), v.Frame);
+        Assert.Equal (new Rectangle (0, 0, newBounds.Width, newBounds.Height), v.Bounds);
         Assert.Equal (Pos.At (1), v.X);
         Assert.Equal (Pos.At (2), v.Y);
         Assert.Equal (Dim.Sized (5), v.Width);

+ 14 - 14
UnitTests/View/Layout/DimTests.cs

@@ -208,7 +208,7 @@ public class DimTests
         Assert.Equal (2, v.Height = 2);
 
         // Force v to be LayoutStyle.Absolute;
-        v.Frame = new Rect (0, 1, 3, 4);
+        v.Frame = new Rectangle (0, 1, 3, 4);
         Assert.Equal (LayoutStyle.Absolute, v.LayoutStyle);
         t.LayoutSubviews ();
 
@@ -474,13 +474,13 @@ public class DimTests
     [TestRespondersDisposed]
     public void Height_SetsValue ()
     {
-        var testVal = Rect.Empty;
+        var testVal = Rectangle.Empty;
         var testValview = new View { Frame = testVal };
         Dim dim = Dim.Height (testValview);
         Assert.Equal ($"View(Height,View(){testVal})", dim.ToString ());
         testValview.Dispose ();
 
-        testVal = new Rect (1, 2, 3, 4);
+        testVal = new Rectangle (1, 2, 3, 4);
         testValview = new View { Frame = testVal };
         dim = Dim.Height (testValview);
         Assert.Equal ($"View(Height,View(){testVal})", dim.ToString ());
@@ -505,7 +505,7 @@ public class DimTests
         Assert.Equal (dimCombine._right, dimAbsolute);
         Assert.Equal (20, dimCombine.Anchor (100));
 
-        var view = new View { Frame = new Rect (20, 10, 20, 1) };
+        var view = new View { Frame = new Rectangle (20, 10, 20, 1) };
         var dimViewHeight = new Dim.DimView (view, 0);
         Assert.Equal (1, dimViewHeight.Anchor (0));
         var dimViewWidth = new Dim.DimView (view, 1);
@@ -873,13 +873,13 @@ public class DimTests
     [TestRespondersDisposed]
     public void SetsValue ()
     {
-        var testVal = Rect.Empty;
+        var testVal = Rectangle.Empty;
         var testValView = new View { Frame = testVal };
         Dim dim = Dim.Width (testValView);
         Assert.Equal ($"View(Width,View(){testVal})", dim.ToString ());
         testValView.Dispose ();
 
-        testVal = new Rect (1, 2, 3, 4);
+        testVal = new Rectangle (1, 2, 3, 4);
         testValView = new View { Frame = testVal };
         dim = Dim.Width (testValView);
         Assert.Equal ($"View(Width,View(){testVal})", dim.ToString ());
@@ -931,9 +931,9 @@ public class DimTests
     [TestRespondersDisposed]
     public void Width_Equals ()
     {
-        var testRect1 = Rect.Empty;
+        var testRect1 = Rectangle.Empty;
         var view1 = new View { Frame = testRect1 };
-        var testRect2 = Rect.Empty;
+        var testRect2 = Rectangle.Empty;
         var view2 = new View { Frame = testRect2 };
 
         Dim dim1 = Dim.Width (view1);
@@ -945,27 +945,27 @@ public class DimTests
         dim2 = Dim.Width (view2);
         Assert.NotEqual (dim1, dim2);
 
-        testRect1 = new Rect (0, 1, 2, 3);
+        testRect1 = new Rectangle (0, 1, 2, 3);
         view1 = new View { Frame = testRect1 };
-        testRect2 = new Rect (0, 1, 2, 3);
+        testRect2 = new Rectangle (0, 1, 2, 3);
         dim1 = Dim.Width (view1);
         dim2 = Dim.Width (view1);
 
         // FIXED: Dim.Width should support Equals() and this should change to Equal.
         Assert.Equal (dim1, dim2);
 
-        testRect1 = new Rect (0, -1, 2, 3);
+        testRect1 = new Rectangle (0, -1, 2, 3);
         view1 = new View { Frame = testRect1 };
-        testRect2 = new Rect (0, -1, 2, 3);
+        testRect2 = new Rectangle (0, -1, 2, 3);
         dim1 = Dim.Width (view1);
         dim2 = Dim.Width (view1);
 
         // FIXED: Dim.Width should support Equals() and this should change to Equal.
         Assert.Equal (dim1, dim2);
 
-        testRect1 = new Rect (0, -1, 2, 3);
+        testRect1 = new Rectangle (0, -1, 2, 3);
         view1 = new View { Frame = testRect1 };
-        testRect2 = Rect.Empty;
+        testRect2 = Rectangle.Empty;
         view2 = new View { Frame = testRect2 };
         dim1 = Dim.Width (view1);
         dim2 = Dim.Width (view2);

+ 17 - 17
UnitTests/View/Layout/LayoutTests.cs

@@ -190,7 +190,7 @@ public class LayoutTests
         switch (width)
         {
             case 1:
-                Assert.Equal (new Rect (0, 0, 0, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 0, 4), subview.Frame);
 
                 expected = @"
@@ -203,7 +203,7 @@ public class LayoutTests
 
                 break;
             case 2:
-                Assert.Equal (new Rect (0, 0, 0, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 0, 4), subview.Frame);
 
                 expected = @"
 ┌┐
@@ -216,7 +216,7 @@ public class LayoutTests
 
                 break;
             case 3:
-                Assert.Equal (new Rect (0, 0, 0, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 0, 4), subview.Frame);
 
                 expected = @"
 ┌─┐
@@ -229,7 +229,7 @@ public class LayoutTests
 
                 break;
             case 4:
-                Assert.Equal (new Rect (0, 0, 1, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 1, 4), subview.Frame);
 
                 expected = @"
 ┌──┐
@@ -242,7 +242,7 @@ public class LayoutTests
 
                 break;
             case 5:
-                Assert.Equal (new Rect (0, 0, 2, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 2, 4), subview.Frame);
 
                 expected = @"
 ┌───┐
@@ -255,7 +255,7 @@ public class LayoutTests
 
                 break;
             case 6:
-                Assert.Equal (new Rect (0, 0, 3, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 3, 4), subview.Frame);
 
                 expected = @"
 ┌────┐
@@ -268,7 +268,7 @@ public class LayoutTests
 
                 break;
             case 7:
-                Assert.Equal (new Rect (0, 0, 4, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 4, 4), subview.Frame);
 
                 expected = @"
 ┌─────┐
@@ -281,7 +281,7 @@ public class LayoutTests
 
                 break;
             case 8:
-                Assert.Equal (new Rect (0, 0, 5, 4), subview.Frame);
+                Assert.Equal (new Rectangle (0, 0, 5, 4), subview.Frame);
 
                 expected = @"
 ┌──────┐
@@ -294,7 +294,7 @@ public class LayoutTests
 
                 break;
             case 9:
-                Assert.Equal (new Rect (1, 0, 5, 4), subview.Frame);
+                Assert.Equal (new Rectangle (1, 0, 5, 4), subview.Frame);
 
                 expected = @"
 ┌───────┐
@@ -307,7 +307,7 @@ public class LayoutTests
 
                 break;
             case 10:
-                Assert.Equal (new Rect (1, 0, 6, 4), subview.Frame);
+                Assert.Equal (new Rectangle (1, 0, 6, 4), subview.Frame);
 
                 expected = @"
 ┌────────┐
@@ -498,7 +498,7 @@ public class LayoutTests
 
         t.Ready += (s, e) =>
                    {
-                       v.Frame = new Rect (2, 2, 10, 10);
+                       v.Frame = new Rectangle (2, 2, 10, 10);
                        Assert.Equal (2, v.X = 2);
                        Assert.Equal (2, v.Y = 2);
                    };
@@ -543,12 +543,12 @@ public class LayoutTests
 └──────────────────┘",
                                                       _output
                                                      );
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (0, 0, 5, 1), view1.Frame);
-        Assert.Equal (new Rect (0, 0, 20, 10), win1.Frame);
-        Assert.Equal (new Rect (0, 2, 10, 3), win2.Frame);
-        Assert.Equal (new Rect (0, 0, 8, 1), view2.Frame);
-        Assert.Equal (new Rect (0, 0, 7, 1), view3.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 10), win1.Frame);
+        Assert.Equal (new Rectangle (0, 2, 10, 3), win2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 8, 1), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 7, 1), view3.Frame);
         var foundView = View.FindDeepestView (top, 9, 4, out int rx, out int ry);
         Assert.Equal (foundView, view2);
 

+ 23 - 23
UnitTests/View/Layout/PosTests.cs

@@ -47,9 +47,9 @@ public class PosTests
         top.Add (win);
         RunState rs = Application.Begin (top);
 
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (0, 0, 80, 25), win.Frame);
-        Assert.Equal (new Rect (68, 22, 10, 1), tv.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), win.Frame);
+        Assert.Equal (new Rectangle (68, 22, 10, 1), tv.Frame);
         Application.End (rs);
     }
 
@@ -77,11 +77,11 @@ public class PosTests
         top.Add (win, menu, status);
         RunState rs = Application.Begin (top);
 
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (0, 0, 80, 1), menu.Frame);
-        Assert.Equal (new Rect (0, 24, 80, 1), status.Frame);
-        Assert.Equal (new Rect (0, 1, 80, 23), win.Frame);
-        Assert.Equal (new Rect (68, 20, 10, 1), tv.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 1), menu.Frame);
+        Assert.Equal (new Rectangle (0, 24, 80, 1), status.Frame);
+        Assert.Equal (new Rectangle (0, 1, 80, 23), win.Frame);
+        Assert.Equal (new Rectangle (68, 20, 10, 1), tv.Frame);
 
         Application.End (rs);
     }
@@ -296,7 +296,7 @@ public class PosTests
         Assert.Equal (posCombine._right, posFactor);
         Assert.Equal (20, posCombine.Anchor (100));
 
-        var view = new View { Frame = new Rect (20, 10, 20, 1) };
+        var view = new View { Frame = new Rectangle (20, 10, 20, 1) };
         var posViewX = new Pos.PosView (view, 0);
         Assert.Equal (20, posViewX.Anchor (0));
         var posViewY = new Pos.PosView (view, 1);
@@ -622,9 +622,9 @@ public class PosTests
 
         Exception exception = Record.Exception (super.LayoutSubviews);
         Assert.Null (exception);
-        Assert.Equal (new Rect (0, 0, 10, 10), super.Frame);
-        Assert.Equal (new Rect (0, 0, 2, 2), view1.Frame);
-        Assert.Equal (new Rect (8, 0, 2, 2), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), super.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), view1.Frame);
+        Assert.Equal (new Rectangle (8, 0, 2, 2), view2.Frame);
 
         super.Dispose ();
     }
@@ -702,21 +702,21 @@ public class PosTests
     public void PosSide_SetsValue ()
     {
         string side; // used in format string
-        var testRect = Rect.Empty;
+        var testRect = Rectangle.Empty;
         var testInt = 0;
         Pos pos;
 
         // Pos.Left
         side = "x";
         testInt = 0;
-        testRect = Rect.Empty;
+        testRect = Rectangle.Empty;
         pos = Pos.Left (new View ());
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
         pos = Pos.Left (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
-        testRect = new Rect (1, 2, 3, 4);
+        testRect = new Rectangle (1, 2, 3, 4);
         pos = Pos.Left (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
@@ -751,14 +751,14 @@ public class PosTests
         // Pos.X
         side = "x";
         testInt = 0;
-        testRect = Rect.Empty;
+        testRect = Rectangle.Empty;
         pos = Pos.X (new View ());
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
         pos = Pos.X (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
-        testRect = new Rect (1, 2, 3, 4);
+        testRect = new Rectangle (1, 2, 3, 4);
         pos = Pos.X (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
@@ -793,14 +793,14 @@ public class PosTests
         // Pos.Top
         side = "y";
         testInt = 0;
-        testRect = Rect.Empty;
+        testRect = Rectangle.Empty;
         pos = Pos.Top (new View ());
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
         pos = Pos.Top (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
-        testRect = new Rect (1, 2, 3, 4);
+        testRect = new Rectangle (1, 2, 3, 4);
         pos = Pos.Top (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
@@ -835,14 +835,14 @@ public class PosTests
         // Pos.Y
         side = "y";
         testInt = 0;
-        testRect = Rect.Empty;
+        testRect = Rectangle.Empty;
         pos = Pos.Y (new View ());
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
         pos = Pos.Y (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
-        testRect = new Rect (1, 2, 3, 4);
+        testRect = new Rectangle (1, 2, 3, 4);
         pos = Pos.Y (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
@@ -876,7 +876,7 @@ public class PosTests
 
         // Pos.Bottom
         side = "bottom";
-        testRect = Rect.Empty;
+        testRect = Rectangle.Empty;
         testInt = 0;
         pos = Pos.Bottom (new View ());
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
@@ -884,7 +884,7 @@ public class PosTests
         pos = Pos.Bottom (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 
-        testRect = new Rect (1, 2, 3, 4);
+        testRect = new Rectangle (1, 2, 3, 4);
         pos = Pos.Bottom (new View { Frame = testRect });
         Assert.Equal ($"View(side={side},target=View(){testRect})", pos.ToString ());
 

+ 10 - 10
UnitTests/View/Layout/SetRelativeLayoutTests.cs

@@ -10,7 +10,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void AbsolutePosDim_DontChange ()
     {
-        var screen = new Rect (0, 0, 10, 15);
+        var screen = new Rectangle (0, 0, 10, 15);
 
         var view = new View
         {
@@ -31,7 +31,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void ComputedPosDim_StayComputed ()
     {
-        var screen = new Rect (0, 0, 10, 15);
+        var screen = new Rectangle (0, 0, 10, 15);
         var view = new View { X = 1, Y = 2, Width = Dim.Fill (), Height = Dim.Fill () };
 
         Assert.Equal ("Absolute(1)", view.X.ToString ());
@@ -48,7 +48,7 @@ public class SetRelativeLayoutTests
     {
         var view = new View { X = 1, Y = 1, Width = Dim.Fill (), Height = Dim.Fill () };
 
-        view.SetRelativeLayout (new Rect (0, 0, 80, 25));
+        view.SetRelativeLayout (new Rectangle (0, 0, 80, 25));
         Assert.Equal ("Fill(0)", view.Width.ToString ());
         Assert.Equal (1, view.Frame.X);
         Assert.Equal (1, view.Frame.Y);
@@ -63,7 +63,7 @@ public class SetRelativeLayoutTests
         view.Y = 0;
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Fill(0)", view.Width.ToString ());
-        view.SetRelativeLayout (new Rect (0, 0, 80, 25));
+        view.SetRelativeLayout (new Rectangle (0, 0, 80, 25));
         Assert.Equal (0, view.Frame.X);
         Assert.Equal (0, view.Frame.Y);
         Assert.Equal (80, view.Frame.Width);
@@ -77,7 +77,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void Fill_And_PosCenter ()
     {
-        var screen = new Rect (0, 0, 80, 25);
+        var screen = new Rectangle (0, 0, 80, 25);
         var view = new View { X = Pos.Center (), Y = Pos.Center (), Width = Dim.Fill (), Height = Dim.Fill () };
 
         view.SetRelativeLayout (screen);
@@ -139,7 +139,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void Fill_Pos_Outside_Bounds ()
     {
-        var screen = new Rect (0, 0, 80, 25);
+        var screen = new Rectangle (0, 0, 80, 25);
 
         var view = new View
         {
@@ -187,7 +187,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void Fill_Pos_Within_Bounds ()
     {
-        var screen = new Rect (0, 0, 80, 25);
+        var screen = new Rectangle (0, 0, 80, 25);
         var view = new View { X = 1, Y = 1, Width = 5, Height = 4 };
 
         view.SetRelativeLayout (screen);
@@ -351,7 +351,7 @@ public class SetRelativeLayoutTests
         // SetRelativeLayout. In addition, the old test was bogus because it was testing the wrong thing (and 
         // because in v1 Pos.Center was broken in this regard!
 
-        var screen = new Rect (0, 0, 80, 25);
+        var screen = new Rectangle (0, 0, 80, 25);
 
         var view = new View
         {
@@ -385,7 +385,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void PosCombine_PosCenter_Plus_Absolute ()
     {
-        var screen = new Rect (0, 0, 80, 25);
+        var screen = new Rectangle (0, 0, 80, 25);
 
         var view = new View
         {
@@ -403,7 +403,7 @@ public class SetRelativeLayoutTests
     [Fact]
     public void PosDimFunction ()
     {
-        var screen = new Rect (0, 0, 30, 1);
+        var screen = new Rectangle (0, 0, 30, 1);
         var view = new View { Text = "abc", AutoSize = true }; // BUGBUG: AutoSize or Width must be set
         view.X = Pos.AnchorEnd () - Pos.Function (GetViewWidth);
 

+ 13 - 13
UnitTests/View/NavigationTests.cs

@@ -816,13 +816,13 @@ public class NavigationTests
         Application.Begin (top);
 
         Assert.Equal (Application.Current, top);
-        Assert.Equal (new Rect (0, 0, 80, 25), new Rect (0, 0, View.Driver.Cols, View.Driver.Rows));
-        Assert.Equal (new Rect (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows));
+        Assert.Equal (new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
 
         ((FakeDriver)Application.Driver).SetBufferSize (20, 10);
-        Assert.Equal (new Rect (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
-        Assert.Equal (new Rect (0, 0, 20, 10), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 10), top.Frame);
 
         _ = TestHelpers.AssertDriverContentsWithFrameAre (
                                                           @"
@@ -959,16 +959,16 @@ public class NavigationTests
         Application.Begin (top);
 
         Assert.Equal (Application.Current, top);
-        Assert.Equal (new Rect (0, 0, 80, 25), new Rect (0, 0, View.Driver.Cols, View.Driver.Rows));
-        Assert.NotEqual (new Rect (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
-        Assert.Equal (new Rect (3, 2, 20, 10), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows));
+        Assert.NotEqual (new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
+        Assert.Equal (new Rectangle (3, 2, 20, 10), top.Frame);
 
         ((FakeDriver)Application.Driver).SetBufferSize (30, 20);
-        Assert.Equal (new Rect (0, 0, 30, 20), new Rect (0, 0, View.Driver.Cols, View.Driver.Rows));
-        Assert.NotEqual (new Rect (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
-        Assert.Equal (new Rect (3, 2, 20, 10), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 30, 20), new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows));
+        Assert.NotEqual (new Rectangle (0, 0, View.Driver.Cols, View.Driver.Rows), top.Frame);
+        Assert.Equal (new Rectangle (3, 2, 20, 10), top.Frame);
 
-        Rect frame = TestHelpers.AssertDriverContentsWithFrameAre (
+        Rectangle frame = TestHelpers.AssertDriverContentsWithFrameAre (
                                                                    @"
    ┌──────────────────┐
    │                  │
@@ -985,7 +985,7 @@ public class NavigationTests
 
         // mean the output started at col 3 and line 2
         // which result with a width of 23 and a height of 10 on the output
-        Assert.Equal (new Rect (3, 2, 23, 10), frame);
+        Assert.Equal (new Rectangle (3, 2, 23, 10), frame);
 
         // top
         Assert.Equal (new Point (-3, -2), top.ScreenToFrame (0, 0));

+ 25 - 25
UnitTests/View/Text/AutoSizeFalseTests.cs

@@ -50,27 +50,27 @@ public class AutoSizeFalseTests
         Assert.False (view4.IsInitialized);
         Assert.False (view5.IsInitialized);
         Assert.False (view1.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view1.Frame);
         Assert.Equal ("Absolute(10)", view1.Width.ToString ());
         Assert.Equal ("Absolute(5)", view1.Height.ToString ());
         Assert.False (view2.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view2.Frame);
         Assert.Equal ("Absolute(10)", view2.Width.ToString ());
         Assert.Equal ("Absolute(5)", view2.Height.ToString ());
         Assert.False (view3.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view3.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view3.Frame);
         Assert.Equal ("Absolute(10)", view3.Width.ToString ());
         Assert.Equal ("Absolute(5)", view3.Height.ToString ());
         Assert.False (view4.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view4.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view4.Frame);
         Assert.Equal ("Absolute(10)", view4.Width.ToString ());
         Assert.Equal ("Absolute(5)", view4.Height.ToString ());
         Assert.False (view5.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view5.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view5.Frame);
         Assert.Equal ("Absolute(10)", view5.Width.ToString ());
         Assert.Equal ("Absolute(5)", view5.Height.ToString ());
         Assert.False (view6.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view6.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view6.Frame);
         Assert.Equal ("Absolute(10)", view6.Width.ToString ());
         Assert.Equal ("Absolute(5)", view6.Height.ToString ());
 
@@ -83,27 +83,27 @@ public class AutoSizeFalseTests
         Assert.True (view4.IsInitialized);
         Assert.True (view5.IsInitialized);
         Assert.False (view1.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view1.Frame);
         Assert.Equal ("Absolute(10)", view1.Width.ToString ());
         Assert.Equal ("Absolute(5)", view1.Height.ToString ());
         Assert.False (view2.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view2.Frame);
         Assert.Equal ("Absolute(10)", view2.Width.ToString ());
         Assert.Equal ("Absolute(5)", view2.Height.ToString ());
         Assert.False (view3.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view3.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view3.Frame);
         Assert.Equal ("Absolute(10)", view3.Width.ToString ());
         Assert.Equal ("Absolute(5)", view3.Height.ToString ());
         Assert.False (view4.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view4.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view4.Frame);
         Assert.Equal ("Absolute(10)", view4.Width.ToString ());
         Assert.Equal ("Absolute(5)", view4.Height.ToString ());
         Assert.False (view5.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view5.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view5.Frame);
         Assert.Equal ("Absolute(10)", view5.Width.ToString ());
         Assert.Equal ("Absolute(5)", view5.Height.ToString ());
         Assert.False (view6.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 5), view6.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 5), view6.Frame);
         Assert.Equal ("Absolute(10)", view6.Width.ToString ());
         Assert.Equal ("Absolute(5)", view6.Height.ToString ());
     }
@@ -151,7 +151,7 @@ public class AutoSizeFalseTests
     [Fact]
     public void AutoSize_False_ResizeView_With_Dim_Fill_After_IsInitialized ()
     {
-        var super = new View { Frame = new Rect (0, 0, 30, 80) };
+        var super = new View { Frame = new Rectangle (0, 0, 30, 80) };
         var view = new View { Width = Dim.Fill (), Height = Dim.Fill () };
         super.Add (view);
         Assert.False (view.AutoSize);
@@ -214,8 +214,8 @@ public class AutoSizeFalseTests
     {
         var view = new View { Width = Dim.Fill (), Height = Dim.Fill () };
 
-        view.SetRelativeLayout (new Rect (0, 0, 10, 4));
-        Assert.Equal (new Rect (0, 0, 10, 4), view.Frame);
+        view.SetRelativeLayout (new Rectangle (0, 0, 10, 4));
+        Assert.Equal (new Rectangle (0, 0, 10, 4), view.Frame);
         Assert.Equal (new Size (0, 0), view.TextFormatter.Size);
         Assert.False (view.AutoSize);
         Assert.True (view.TextFormatter.NeedsFormat);
@@ -249,10 +249,10 @@ public class AutoSizeFalseTests
 
         Assert.Equal (5, text.Length);
         Assert.False (view.AutoSize);
-        Assert.Equal (new Rect (0, 0, 3, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 1), view.Frame);
         Assert.Equal (new Size (3, 1), view.TextFormatter.Size);
         Assert.Equal (new List<string> { "Vie" }, view.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 10, 4), frame.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), frame.Frame);
 
         frame.LayoutSubviews ();
         frame.Clear ();
@@ -265,8 +265,8 @@ public class AutoSizeFalseTests
 └────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -276,7 +276,7 @@ public class AutoSizeFalseTests
         frame.Clear ();
         frame.Draw ();
 
-        Assert.Equal (new Rect (0, 0, 0, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 1), view.Frame);
         Assert.Equal (new Size (0, 1), view.TextFormatter.Size);
         Assert.Equal (new List<string> { string.Empty }, view.TextFormatter.GetLines ());
 
@@ -288,7 +288,7 @@ public class AutoSizeFalseTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
     }
 
     [Fact]
@@ -324,8 +324,8 @@ public class AutoSizeFalseTests
 
         Assert.False (horizontalView.AutoSize);
         Assert.False (verticalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 20, 1), horizontalView.Frame);
-        Assert.Equal (new Rect (0, 3, 1, 20), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 1), horizontalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 1, 20), verticalView.Frame);
 
         top.Draw ();
 
@@ -364,7 +364,7 @@ public class AutoSizeFalseTests
 └──────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         verticalView.Text = $"最初の行{Environment.NewLine}二行目";
         Assert.True (verticalView.TextFormatter.NeedsFormat);
@@ -376,7 +376,7 @@ public class AutoSizeFalseTests
         Assert.True (verticalView.TextFormatter.NeedsFormat);
 
         top.Draw ();
-        Assert.Equal (new Rect (0, 3, 2, 20), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 2, 20), verticalView.Frame);
 
         expected = @"
 ┌──────────────────────────────┐

+ 135 - 135
UnitTests/View/Text/AutoSizeTrueTests.cs

@@ -355,9 +355,9 @@ public class AutoSizeTrueTests
 
         Assert.True (label.AutoSize);
         Assert.Equal (29, label.Text.Length);
-        Assert.Equal (new Rect (0, 0, 40, 10), top.Frame);
-        Assert.Equal (new Rect (0, 0, 40, 10), win.Frame);
-        Assert.Equal (new Rect (0, 7, 29, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 40, 10), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 40, 10), win.Frame);
+        Assert.Equal (new Rectangle (0, 7, 29, 1), label.Frame);
 
         var expected = @"
 ┌──────────────────────────────────────┐
@@ -402,11 +402,11 @@ public class AutoSizeTrueTests
         RunState rs = Application.Begin (top);
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (0, 0, 80, 1), menu.Frame);
-        Assert.Equal (new Rect (0, 24, 80, 1), status.Frame);
-        Assert.Equal (new Rect (0, 1, 80, 23), win.Frame);
-        Assert.Equal (new Rect (0, 20, 29, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 1), menu.Frame);
+        Assert.Equal (new Rectangle (0, 24, 80, 1), status.Frame);
+        Assert.Equal (new Rectangle (0, 1, 80, 23), win.Frame);
+        Assert.Equal (new Rectangle (0, 20, 29, 1), label.Frame);
 
         var expected = @"
  Menu                                                                           
@@ -466,9 +466,9 @@ public class AutoSizeTrueTests
         ((FakeDriver)Application.Driver).SetBufferSize (40, 10);
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 40, 10), top.Frame);
-        Assert.Equal (new Rect (0, 0, 40, 10), win.Frame);
-        Assert.Equal (new Rect (0, 7, 29, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 40, 10), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 40, 10), win.Frame);
+        Assert.Equal (new Rectangle (0, 7, 29, 1), label.Frame);
 
         var expected = @"
 ┌──────────────────────────────────────┐
@@ -514,11 +514,11 @@ public class AutoSizeTrueTests
         RunState rs = Application.Begin (top);
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (0, 0, 80, 1), menu.Frame);
-        Assert.Equal (new Rect (0, 24, 80, 1), status.Frame);
-        Assert.Equal (new Rect (0, 1, 80, 23), win.Frame);
-        Assert.Equal (new Rect (0, 20, 29, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 1), menu.Frame);
+        Assert.Equal (new Rectangle (0, 24, 80, 1), status.Frame);
+        Assert.Equal (new Rectangle (0, 1, 80, 23), win.Frame);
+        Assert.Equal (new Rectangle (0, 20, 29, 1), label.Frame);
 
         var expected = @"
  Menu                                                                           
@@ -577,8 +577,8 @@ public class AutoSizeTrueTests
                              if (k.KeyCode == KeyCode.Enter)
                              {
                                  ((FakeDriver)Application.Driver).SetBufferSize (22, count + 4);
-                                 Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], _output);
-                                 Assert.Equal (new Rect (0, 0, 22, count + 4), pos);
+                                 Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], _output);
+                                 Assert.Equal (new Rectangle (0, 0, 22, count + 4), pos);
 
                                  if (count < 20)
                                  {
@@ -683,8 +683,8 @@ public class AutoSizeTrueTests
                              if (k.KeyCode == KeyCode.Enter)
                              {
                                  ((FakeDriver)Application.Driver).SetBufferSize (22, count + 4);
-                                 Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], _output);
-                                 Assert.Equal (new Rect (0, 0, 22, count + 4), pos);
+                                 Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expecteds [count], _output);
+                                 Assert.Equal (new Rectangle (0, 0, 22, count + 4), pos);
 
                                  if (count > 0)
                                  {
@@ -814,10 +814,10 @@ public class AutoSizeTrueTests
 
         Assert.Equal (5, text.Length);
         Assert.False (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 3, 0), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 0), label.Frame);
         Assert.Equal (new Size (3, 0), label.TextFormatter.Size);
         Assert.Single (label.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
 
         var expected = @"
 ┌────────┐
@@ -826,8 +826,8 @@ public class AutoSizeTrueTests
 └────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -836,7 +836,7 @@ public class AutoSizeTrueTests
         win.Clear ();
         win.Draw ();
 
-        Assert.Equal (new Rect (0, 0, 0, 0), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), label.Frame);
         Assert.Equal (new Size (0, 0), label.TextFormatter.Size);
 
         Exception exception = Record.Exception (
@@ -855,13 +855,13 @@ public class AutoSizeTrueTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
     }
 
     [Fact]
     public void AutoSize_False_SetWidthHeight_With_Dim_Fill_And_Dim_Absolute_With_Initialization ()
     {
-        var win = new Window { Frame = new Rect (0, 0, 30, 80) };
+        var win = new Window { Frame = new Rectangle (0, 0, 30, 80) };
         var label = new Label ();
         win.Add (label);
         win.BeginInit ();
@@ -1124,10 +1124,10 @@ public class AutoSizeTrueTests
 
         Assert.Equal (5, text.Length);
         Assert.False (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 3, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 1), label.Frame);
         Assert.Equal (new Size (3, 1), label.TextFormatter.Size);
         Assert.Single (label.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
 
         var expected = @"
 ┌────────┐
@@ -1136,8 +1136,8 @@ public class AutoSizeTrueTests
 └────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -1146,7 +1146,7 @@ public class AutoSizeTrueTests
         win.Clear ();
         win.Draw ();
 
-        Assert.Equal (new Rect (0, 0, 0, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 1), label.Frame);
         Assert.Equal (new Size (0, 1), label.TextFormatter.Size);
 
         Exception exception = Record.Exception (
@@ -1165,7 +1165,7 @@ public class AutoSizeTrueTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
     }
 
     [Fact]
@@ -1274,17 +1274,17 @@ public class AutoSizeTrueTests
         Assert.False (view4.IsInitialized);
         Assert.False (view5.IsInitialized);
         Assert.True (view1.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 1), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 1), view1.Frame);
         Assert.Equal ("Absolute(18)", view1.Width.ToString ());
         Assert.Equal ("Absolute(1)", view1.Height.ToString ());
         Assert.True (view2.AutoSize);
         Assert.Equal ("Say Hello view2 你".GetColumns (), view2.Width);
         Assert.Equal (18, view2.Width);
-        Assert.Equal (new Rect (0, 0, 18, 5), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 5), view2.Frame);
         Assert.Equal ("Absolute(18)", view2.Width.ToString ());
         Assert.Equal ("Absolute(5)", view2.Height.ToString ());
         Assert.True (view3.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 1), view3.Frame); // BUGBUG: AutoSize = true, so the height should be 1.
+        Assert.Equal (new Rectangle (0, 0, 18, 1), view3.Frame); // BUGBUG: AutoSize = true, so the height should be 1.
         Assert.Equal ("Absolute(18)", view2.Width.ToString ());
         Assert.Equal ("Absolute(1)", view3.Height.ToString ());
         Assert.True (view4.AutoSize);
@@ -1292,13 +1292,13 @@ public class AutoSizeTrueTests
         Assert.Equal ("Say Hello view4 你".GetColumns (), view2.Width);
         Assert.Equal (18, view2.Width);
 
-        Assert.Equal (new Rect (0, 0, 18, 17), view4.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 17), view4.Frame);
         Assert.Equal ("Absolute(18)", view4.Width.ToString ());
         Assert.Equal ("Absolute(17)", view4.Height.ToString ());
         Assert.True (view5.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 17), view5.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 17), view5.Frame);
         Assert.True (view6.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 17), view6.Frame); // BUGBUG: AutoSize = true, so the Width should be 2.
+        Assert.Equal (new Rectangle (0, 0, 2, 17), view6.Frame); // BUGBUG: AutoSize = true, so the Width should be 2.
 
         top.BeginInit ();
         top.EndInit ();
@@ -1309,28 +1309,28 @@ public class AutoSizeTrueTests
         Assert.True (view4.IsInitialized);
         Assert.True (view5.IsInitialized);
         Assert.True (view1.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 1), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 1), view1.Frame);
         Assert.Equal ("Absolute(18)", view1.Width.ToString ());
         Assert.Equal ("Absolute(1)", view1.Height.ToString ());
         Assert.True (view2.AutoSize);
 
-        Assert.Equal (new Rect (0, 0, 18, 5), view2.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 5), view2.Frame);
         Assert.Equal ("Absolute(18)", view2.Width.ToString ());
         Assert.Equal ("Absolute(5)", view2.Height.ToString ());
         Assert.True (view3.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 1), view3.Frame); // BUGBUG: AutoSize = true, so the height should be 1.
+        Assert.Equal (new Rectangle (0, 0, 18, 1), view3.Frame); // BUGBUG: AutoSize = true, so the height should be 1.
         Assert.Equal ("Absolute(18)", view5.Width.ToString ());
         Assert.Equal ("Absolute(1)", view3.Height.ToString ());
         Assert.True (view4.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 17), view4.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 17), view4.Frame);
         Assert.Equal ("Absolute(18)", view5.Width.ToString ());
         Assert.Equal ("Absolute(17)", view4.Height.ToString ());
         Assert.True (view5.AutoSize);
-        Assert.Equal (new Rect (0, 0, 18, 17), view5.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 17), view5.Frame);
         Assert.Equal ("Absolute(18)", view5.Width.ToString ());
         Assert.Equal ("Absolute(17)", view5.Height.ToString ());
         Assert.True (view6.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 17), view6.Frame); // BUGBUG: AutoSize = true, so the Width should be 2.
+        Assert.Equal (new Rectangle (0, 0, 2, 17), view6.Frame); // BUGBUG: AutoSize = true, so the Width should be 2.
         Assert.Equal ("Absolute(2)", view6.Width.ToString ());
         Assert.Equal ("Absolute(17)", view6.Height.ToString ());
     }
@@ -1379,11 +1379,11 @@ public class AutoSizeTrueTests
 
         Assert.Equal (5, text.Length);
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 5, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), label.Frame);
         Assert.Equal (new Size (5, 1), label.TextFormatter.Size);
         Assert.Equal (new List<string> { "Label" }, label.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), Application.Top.Frame);
 
         var expected = @"
 ┌────────┐
@@ -1392,8 +1392,8 @@ public class AutoSizeTrueTests
 └────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -1401,7 +1401,7 @@ public class AutoSizeTrueTests
         //label.Width = Dim.Fill () - text.Length;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 5, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), label.Frame);
         Assert.Equal (new Size (5, 1), label.TextFormatter.Size);
         Exception exception = Record.Exception (() => Assert.Single (label.TextFormatter.GetLines ()));
         Assert.Null (exception);
@@ -1414,7 +1414,7 @@ public class AutoSizeTrueTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
     }
 
     [Fact]
@@ -1437,11 +1437,11 @@ public class AutoSizeTrueTests
 
         Assert.Equal (5, text.Length);
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 5, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), label.Frame);
         Assert.Equal (new Size (5, 1), label.TextFormatter.Size);
         Assert.Equal (new List<string> { "Label" }, label.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 10, 4), win.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 4), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), Application.Top.Frame);
 
         var expected = @"
 ┌────────┐
@@ -1450,8 +1450,8 @@ public class AutoSizeTrueTests
 └────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -1460,7 +1460,7 @@ public class AutoSizeTrueTests
         Application.Refresh ();
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 5, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), label.Frame);
         Assert.Equal (new Size (5, 1), label.TextFormatter.Size);
         Assert.Single (label.TextFormatter.GetLines ());
 
@@ -1472,7 +1472,7 @@ public class AutoSizeTrueTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 4), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 4), pos);
     }
 
     [Fact]
@@ -1505,7 +1505,7 @@ public class AutoSizeTrueTests
         top.EndInit ();
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 5, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 1), label.Frame);
 
         top.LayoutSubviews ();
         top.Draw ();
@@ -1515,13 +1515,13 @@ HelloX
 Y     
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         label.AutoSize = false;
         label.Width = 10;
         label.Height = 2;
         Assert.False (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 10, 2), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 2), label.Frame);
 
         top.LayoutSubviews ();
         top.Draw ();
@@ -1554,7 +1554,7 @@ Y
         label.Text = "Hello";
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 1, 5), label.Frame); // BUGBUG: AutoSize = true, so the Width should be 1.
+        Assert.Equal (new Rectangle (0, 0, 1, 5), label.Frame); // BUGBUG: AutoSize = true, so the Width should be 1.
 
         var expected = @"
 HX
@@ -1565,7 +1565,7 @@ o
 Y 
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         label.AutoSize = false;
         label.Width = 2;
@@ -1573,7 +1573,7 @@ Y
         Application.Refresh ();
 
         Assert.False (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 10), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 10), label.Frame);
 
         expected = @"
 H X
@@ -1608,13 +1608,13 @@ Y
         RunState rs = Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (15, 15);
 
-        Assert.Equal (new Rect (0, 0, 15, 15), win.Frame);
-        Assert.Equal (new Rect (0, 0, 15, 15), win.Margin.Frame);
-        Assert.Equal (new Rect (0, 0, 15, 15), win.Border.Frame);
-        Assert.Equal (new Rect (1, 1, 13, 13), win.Padding.Frame);
+        Assert.Equal (new Rectangle (0, 0, 15, 15), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 15, 15), win.Margin.Frame);
+        Assert.Equal (new Rectangle (0, 0, 15, 15), win.Border.Frame);
+        Assert.Equal (new Rectangle (1, 1, 13, 13), win.Padding.Frame);
         Assert.False (view.AutoSize);
         Assert.Equal (TextDirection.LeftRight_TopBottom, view.TextDirection);
-        Assert.Equal (Rect.Empty, view.Frame);
+        Assert.Equal (Rectangle.Empty, view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(0)", view.Width.ToString ());
@@ -1638,7 +1638,7 @@ Y
 └─────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         view.Text = "Hello World";
         view.Width = 11;
@@ -1646,7 +1646,7 @@ Y
         win.LayoutSubviews ();
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 11, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 11, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(11)", view.Width.ToString ());
@@ -1677,7 +1677,7 @@ Y
         Application.Refresh ();
         int len = "Hello Worlds".Length;
         Assert.Equal (12, len);
-        Assert.Equal (new Rect (0, 0, len, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, len, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(12)", view.Width.ToString ());
@@ -1706,7 +1706,7 @@ Y
         view.TextDirection = TextDirection.TopBottom_LeftRight;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 12, 12), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 12), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(12)", view.Width.ToString ());
@@ -1736,7 +1736,7 @@ Y
         view.Height = 1;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 12, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(12)", view.Width.ToString ());
@@ -1768,7 +1768,7 @@ Y
         view.PreserveTrailingSpaces = true;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 12, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(12)", view.Width.ToString ());
@@ -1795,13 +1795,13 @@ Y
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         view.PreserveTrailingSpaces = false;
-        Rect f = view.Frame;
+        Rectangle f = view.Frame;
         view.Width = f.Height;
         view.Height = f.Width;
         view.TextDirection = TextDirection.TopBottom_LeftRight;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 1, 12), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 1, 12), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(1)", view.Width.ToString ());
@@ -1830,7 +1830,7 @@ Y
         view.AutoSize = true;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 1, 12), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 1, 12), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(1)", view.Width.ToString ());
@@ -1879,11 +1879,11 @@ Y
 
         Assert.Equal (5, text.Length);
         Assert.True (view.AutoSize);
-        Assert.Equal (new Rect (0, 0, 1, 5), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 1, 5), view.Frame);
         Assert.Equal (new Size (1, 5), view.TextFormatter.Size);
         Assert.Equal (new List<string> { "Views" }, view.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 4, 10), win.Frame);
-        Assert.Equal (new Rect (0, 0, 4, 10), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), Application.Top.Frame);
 
         var expected = @"
 ┌──┐
@@ -1898,8 +1898,8 @@ Y
 └──┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 4, 10), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -1907,7 +1907,7 @@ Y
         //view.Height = Dim.Fill () - text.Length;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 1, 5), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 1, 5), view.Frame);
         Assert.Equal (new Size (1, 5), view.TextFormatter.Size);
         Exception exception = Record.Exception (() => Assert.Single (view.TextFormatter.GetLines ()));
         Assert.Null (exception);
@@ -1926,7 +1926,7 @@ Y
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 4, 10), pos);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), pos);
     }
 
     [Fact]
@@ -1950,11 +1950,11 @@ Y
 
         Assert.Equal (5, text.Length);
         Assert.True (view.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 5), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 5), view.Frame);
         Assert.Equal (new Size (2, 5), view.TextFormatter.Size);
         Assert.Equal (new List<string> { "界View" }, view.TextFormatter.GetLines ());
-        Assert.Equal (new Rect (0, 0, 4, 10), win.Frame);
-        Assert.Equal (new Rect (0, 0, 4, 10), Application.Top.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), Application.Top.Frame);
 
         var expected = @"
 ┌──┐
@@ -1969,8 +1969,8 @@ Y
 └──┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 4, 10), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), pos);
 
         text = "0123456789";
         Assert.Equal (10, text.Length);
@@ -1978,7 +1978,7 @@ Y
         //view.Height = Dim.Fill () - text.Length;
         Application.Refresh ();
 
-        Assert.Equal (new Rect (0, 0, 2, 5), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 5), view.Frame);
         Assert.Equal (new Size (2, 5), view.TextFormatter.Size);
 
         Exception exception = Record.Exception (
@@ -2003,7 +2003,7 @@ Y
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 4, 10), pos);
+        Assert.Equal (new Rectangle (0, 0, 4, 10), pos);
     }
 
     [Fact]
@@ -2047,8 +2047,8 @@ Y
 
         Assert.True (horizontalView.AutoSize);
         Assert.True (verticalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 11, 2), horizontalView.Frame);
-        Assert.Equal (new Rect (0, 3, 11, 11), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 11, 2), horizontalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 11, 11), verticalView.Frame);
 
         var expected = @"
 ┌──────────────────┐
@@ -2073,11 +2073,11 @@ Y
 └──────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         verticalView.Text = $"最初の行{Environment.NewLine}二行目";
         Application.Top.Draw ();
-        Assert.Equal (new Rect (0, 3, 11, 11), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 11, 11), verticalView.Frame);
 
         expected = @"
 ┌──────────────────┐
@@ -2136,7 +2136,7 @@ Y
         Assert.True (verticalView.AutoSize);
         Assert.Equal (new Size (text.GetColumns (), 1), horizontalView.TextFormatter.Size);
         Assert.Equal (new Size (2, 9), verticalView.TextFormatter.Size);
-        Assert.Equal (new Rect (0, 0, 9, 1), horizontalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 9, 1), horizontalView.Frame);
         Assert.Equal ("Absolute(0)", horizontalView.X.ToString ());
         Assert.Equal ("Absolute(0)", horizontalView.Y.ToString ());
 
@@ -2144,7 +2144,7 @@ Y
 
         Assert.Equal ("Absolute(9)", horizontalView.Width.ToString ());
         Assert.Equal ("Absolute(1)", horizontalView.Height.ToString ());
-        Assert.Equal (new Rect (0, 3, 9, 8), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 9, 8), verticalView.Frame);
         Assert.Equal ("Absolute(0)", verticalView.X.ToString ());
         Assert.Equal ("Absolute(3)", verticalView.Y.ToString ());
         Assert.Equal ("Absolute(9)", verticalView.Width.ToString ());
@@ -2175,8 +2175,8 @@ Y
 └────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 22, 22), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 22, 22), pos);
 
         verticalView.Text = "最初_の行二行目";
         Application.Top.Draw ();
@@ -2184,7 +2184,7 @@ Y
         Assert.True (verticalView.AutoSize);
 
         // height was initialized with 8 and can only grow or keep initial value
-        Assert.Equal (new Rect (0, 3, 9, 8), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 3, 9, 8), verticalView.Frame);
         Assert.Equal ("Absolute(0)", verticalView.X.ToString ());
         Assert.Equal ("Absolute(3)", verticalView.Y.ToString ());
         Assert.Equal ("Absolute(9)", verticalView.Width.ToString ());
@@ -2216,7 +2216,7 @@ Y
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 22, 22), pos);
+        Assert.Equal (new Rectangle (0, 0, 22, 22), pos);
         Application.End (rs);
     }
 
@@ -2276,9 +2276,9 @@ Y
         // Here the AutoSize ensuring the right size with width 3 (Dim.Absolute)
         // that was set on the OnAdded method with the text length of 3
         // and height 1 because wasn't set and the text has 1 line
-        Assert.Equal (new Rect (0, 0, 3, 1), lbl.Frame);
-        Assert.Equal (new Rect (0, 0, 3, 1), lbl._needsDisplayRect);
-        Assert.Equal (new Rect (0, 0, 0, 0), lbl.SuperView._needsDisplayRect);
+        Assert.Equal (new Rectangle (0, 0, 3, 1), lbl.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 1), lbl._needsDisplayRect);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), lbl.SuperView._needsDisplayRect);
         Assert.True (lbl.SuperView.LayoutNeeded);
         lbl.SuperView.Draw ();
         Assert.Equal ("12  ", GetContents ());
@@ -2699,12 +2699,12 @@ Y
         ((FakeDriver)Application.Driver).SetBufferSize (50, 50);
 
         Assert.True (horizontalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 12, 1), horizontalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), horizontalView.Frame);
         Assert.Equal (new Size (12, 1), horizontalView.GetSizeNeededForTextWithoutHotKey ());
         Assert.Equal (horizontalView.Frame.Size, horizontalView.GetSizeNeededForTextWithoutHotKey ());
 
         Assert.True (verticalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 11), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 11), verticalView.Frame);
         Assert.Equal (new Size (2, 11), verticalView.GetSizeNeededForTextWithoutHotKey ());
         Assert.Equal (verticalView.Frame.Size, verticalView.GetSizeNeededForTextWithoutHotKey ());
 
@@ -2713,12 +2713,12 @@ Y
         verticalView.Text = text;
 
         Assert.True (horizontalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 12, 1), horizontalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), horizontalView.Frame);
         Assert.Equal (new Size (12, 1), horizontalView.GetSizeNeededForTextWithoutHotKey ());
         Assert.Equal (horizontalView.Frame.Size, horizontalView.GetSizeNeededForTextWithoutHotKey ());
 
         Assert.True (verticalView.AutoSize);
-        Assert.Equal (new Rect (0, 0, 2, 11), verticalView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 11), verticalView.Frame);
         Assert.Equal (new Size (2, 11), verticalView.GetSizeNeededForTextWithoutHotKey ());
         Assert.Equal (verticalView.Frame.Size, verticalView.GetSizeNeededForTextWithoutHotKey ());
     }
@@ -2726,22 +2726,22 @@ Y
     [Fact]
     public void SetRelativeLayout_Respects_AutoSize ()
     {
-        var view = new View { Frame = new Rect (0, 0, 10, 0), AutoSize = true };
+        var view = new View { Frame = new Rectangle (0, 0, 10, 0), AutoSize = true };
         view.Text = "01234567890123456789";
 
         Assert.True (view.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 20, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(20)", view.Width.ToString ());
         Assert.Equal ("Absolute(1)", view.Height.ToString ());
 
-        view.SetRelativeLayout (new Rect (0, 0, 25, 5));
+        view.SetRelativeLayout (new Rectangle (0, 0, 25, 5));
 
         Assert.True (view.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 20, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 1), view.Frame);
         Assert.Equal ("Absolute(0)", view.X.ToString ());
         Assert.Equal ("Absolute(0)", view.Y.ToString ());
         Assert.Equal ("Absolute(20)", view.Width.ToString ());
@@ -2752,11 +2752,11 @@ Y
     [AutoInitShutdown]
     public void Setting_Frame_Dont_Respect_AutoSize_True_On_Layout_Absolute ()
     {
-        var view1 = new View { Frame = new Rect (0, 0, 10, 0), Text = "Say Hello view1 你", AutoSize = true };
+        var view1 = new View { Frame = new Rectangle (0, 0, 10, 0), Text = "Say Hello view1 你", AutoSize = true };
 
         var viewTopBottom_LeftRight = new View
         {
-            Frame = new Rect (0, 0, 0, 10),
+            Frame = new Rectangle (0, 0, 0, 10),
             Text = "Say Hello view2 你",
             AutoSize = true,
             TextDirection =
@@ -2768,7 +2768,7 @@ Y
 
         Assert.True (view1.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, view1.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 18, 1), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 1), view1.Frame);
         Assert.Equal ("Absolute(0)", view1.X.ToString ());
         Assert.Equal ("Absolute(0)", view1.Y.ToString ());
         Assert.Equal ("Absolute(18)", view1.Width.ToString ());
@@ -2776,30 +2776,30 @@ Y
 
         Assert.True (viewTopBottom_LeftRight.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, viewTopBottom_LeftRight.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 18, 17), viewTopBottom_LeftRight.Frame);
+        Assert.Equal (new Rectangle (0, 0, 18, 17), viewTopBottom_LeftRight.Frame);
         Assert.Equal ("Absolute(0)", viewTopBottom_LeftRight.X.ToString ());
         Assert.Equal ("Absolute(0)", viewTopBottom_LeftRight.Y.ToString ());
         Assert.Equal ("Absolute(18)", viewTopBottom_LeftRight.Width.ToString ());
         Assert.Equal ("Absolute(17)", viewTopBottom_LeftRight.Height.ToString ());
 
-        view1.Frame = new Rect (0, 0, 25, 4);
+        view1.Frame = new Rectangle (0, 0, 25, 4);
         var firstIteration = false;
         Application.RunIteration (ref rs, ref firstIteration);
 
         Assert.True (view1.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, view1.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 25, 4), view1.Frame);
+        Assert.Equal (new Rectangle (0, 0, 25, 4), view1.Frame);
         Assert.Equal ("Absolute(0)", view1.X.ToString ());
         Assert.Equal ("Absolute(0)", view1.Y.ToString ());
         Assert.Equal ("Absolute(25)", view1.Width.ToString ());
         Assert.Equal ("Absolute(4)", view1.Height.ToString ());
 
-        viewTopBottom_LeftRight.Frame = new Rect (0, 0, 1, 25);
+        viewTopBottom_LeftRight.Frame = new Rectangle (0, 0, 1, 25);
         Application.RunIteration (ref rs, ref firstIteration);
 
         Assert.True (viewTopBottom_LeftRight.AutoSize);
         Assert.Equal (LayoutStyle.Absolute, viewTopBottom_LeftRight.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 2, 25), viewTopBottom_LeftRight.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 25), viewTopBottom_LeftRight.Frame);
         Assert.Equal ("Absolute(0)", viewTopBottom_LeftRight.X.ToString ());
         Assert.Equal ("Absolute(0)", viewTopBottom_LeftRight.Y.ToString ());
         Assert.Equal ("Absolute(2)", viewTopBottom_LeftRight.Width.ToString ());
@@ -2815,8 +2815,8 @@ Y
         Application.Top.Add (label);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (0, 0, 6, 3), label.Frame);
-        Assert.Equal (new Rect (0, 0, 4, 1), label.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 6, 3), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), label.Bounds);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -2837,8 +2837,8 @@ Y
         Application.Top.Add (label);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (0, 0, 6, 3), label.Frame);
-        Assert.Equal (new Rect (0, 0, 4, 1), label.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 6, 3), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), label.Bounds);
         Application.Begin (Application.Top);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -2858,8 +2858,8 @@ Y
         Application.Top.Add (label);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (0, 0, 6, 2), label.Frame);
-        Assert.Equal (new Rect (0, 0, 4, 1), label.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 6, 2), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), label.Bounds);
         Application.Begin (Application.Top);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -3000,7 +3000,7 @@ Y
             Assert.Equal (new Size (width, 1), lblJust.TextFormatter.Size);
         }
 
-        Assert.Equal (new Rect (0, 0, width + 2, 6), frame.Frame);
+        Assert.Equal (new Rectangle (0, 0, width + 2, 6), frame.Frame);
 
         var expected = @"
 ┌────────────────────┐
@@ -3012,8 +3012,8 @@ Y
 "
             ;
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, width + 2, 6), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, width + 2, 6), pos);
     }
 
     [Theory]
@@ -3088,7 +3088,7 @@ Y
             Assert.Equal (new Size (1, 11), lblCenter.TextFormatter.Size);
             Assert.Equal (new Size (1, 11), lblRight.TextFormatter.Size);
             Assert.Equal (new Size (1, height), lblJust.TextFormatter.Size);
-            Assert.Equal (new Rect (0, 0, 9, height + 2), frame.Frame);
+            Assert.Equal (new Rectangle (0, 0, 9, height + 2), frame.Frame);
         }
         else
         {
@@ -3096,7 +3096,7 @@ Y
             Assert.Equal (new Size (1, height), lblCenter.TextFormatter.Size);
             Assert.Equal (new Size (1, height), lblRight.TextFormatter.Size);
             Assert.Equal (new Size (1, height), lblJust.TextFormatter.Size);
-            Assert.Equal (new Rect (0, 0, 9, height + 2), frame.Frame);
+            Assert.Equal (new Rectangle (0, 0, 9, height + 2), frame.Frame);
         }
 
         var expected = @"
@@ -3125,7 +3125,7 @@ Y
 "
             ;
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 9, height + 2), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 9, height + 2), pos);
     }
 }

+ 68 - 68
UnitTests/View/ViewTests.cs

@@ -14,7 +14,7 @@ public class ViewTests
     [TestRespondersDisposed]
     public void Added_Removed ()
     {
-        var v = new View { Frame = new Rect (0, 0, 10, 24) };
+        var v = new View { Frame = new Rectangle (0, 0, 10, 24) };
         var t = new View ();
 
         v.Added += (s, e) =>
@@ -49,8 +49,8 @@ public class ViewTests
 
         view.DrawContent += (s, e) =>
                             {
-                                Rect savedClip = Application.Driver.Clip;
-                                Application.Driver.Clip = new Rect (1, 1, view.Bounds.Width, view.Bounds.Height);
+                                Rectangle savedClip = Application.Driver.Clip;
+                                Application.Driver.Clip = new Rectangle (1, 1, view.Bounds.Width, view.Bounds.Height);
 
                                 for (var row = 0; row < view.Bounds.Height; row++)
                                 {
@@ -82,8 +82,8 @@ public class ViewTests
 └──────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 20, 10), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 20, 10), pos);
 
         view.Clear (view.Frame);
 
@@ -91,7 +91,7 @@ public class ViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (Rect.Empty, pos);
+        Assert.Equal (Rectangle.Empty, pos);
     }
 
     [Fact]
@@ -102,8 +102,8 @@ public class ViewTests
 
         view.DrawContent += (s, e) =>
                             {
-                                Rect savedClip = Application.Driver.Clip;
-                                Application.Driver.Clip = new Rect (1, 1, view.Bounds.Width, view.Bounds.Height);
+                                Rectangle savedClip = Application.Driver.Clip;
+                                Application.Driver.Clip = new Rectangle (1, 1, view.Bounds.Width, view.Bounds.Height);
 
                                 for (var row = 0; row < view.Bounds.Height; row++)
                                 {
@@ -135,8 +135,8 @@ public class ViewTests
 └──────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 20, 10), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 20, 10), pos);
 
         view.Clear (view.Frame);
 
@@ -144,7 +144,7 @@ public class ViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (Rect.Empty, pos);
+        Assert.Equal (Rectangle.Empty, pos);
     }
 
     [Theory]
@@ -168,13 +168,13 @@ public class ViewTests
         {
             Assert.True (v.AutoSize);
             Assert.False (v.CanFocus);
-            Assert.Equal (new Rect (0, 0, 100, 1), v.Frame);
+            Assert.Equal (new Rectangle (0, 0, 100, 1), v.Frame);
         }
         else
         {
             Assert.False (v.AutoSize);
             Assert.True (v.CanFocus);
-            Assert.Equal (new Rect (0, 0, 20, 1), v.Frame);
+            Assert.Equal (new Rectangle (0, 0, 20, 1), v.Frame);
         }
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -259,11 +259,11 @@ At 0,0
                                                       _output
                                                      );
 
-        view.Frame = new Rect (3, 3, 10, 1);
-        Assert.Equal (new Rect (3, 3, 10, 1), view.Frame);
+        view.Frame = new Rectangle (3, 3, 10, 1);
+        Assert.Equal (new Rectangle (3, 3, 10, 1), view.Frame);
         Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 1), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         top.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -310,9 +310,9 @@ At 0,0
         view.Y = 3;
         view.Width = 10;
         view.Height = 1;
-        Assert.Equal (new Rect (3, 3, 10, 1), view.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 30, 2), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (3, 3, 10, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 30, 2), view._needsDisplayRect);
         top.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -355,11 +355,11 @@ At 0,0
                                                       _output
                                                      );
 
-        view.Frame = new Rect (1, 1, 10, 1);
-        Assert.Equal (new Rect (1, 1, 10, 1), view.Frame);
+        view.Frame = new Rectangle (1, 1, 10, 1);
+        Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
         Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 1), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         top.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -404,9 +404,9 @@ At 0,0
         view.Y = 1;
         view.Width = 10;
         view.Height = 1;
-        Assert.Equal (new Rect (1, 1, 10, 1), view.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 30, 2), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 30, 2), view._needsDisplayRect);
         top.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -487,29 +487,29 @@ At 0,0
 
         RunState runState = Application.Begin (top);
 
-        top.LayoutComplete += (s, e) => { Assert.Equal (new Rect (0, 0, 80, 25), top._needsDisplayRect); };
+        top.LayoutComplete += (s, e) => { Assert.Equal (new Rectangle (0, 0, 80, 25), top._needsDisplayRect); };
 
-        frame.LayoutComplete += (s, e) => { Assert.Equal (new Rect (0, 0, 40, 8), frame._needsDisplayRect); };
+        frame.LayoutComplete += (s, e) => { Assert.Equal (new Rectangle (0, 0, 40, 8), frame._needsDisplayRect); };
 
-        label.LayoutComplete += (s, e) => { Assert.Equal (new Rect (0, 0, 38, 1), label._needsDisplayRect); };
+        label.LayoutComplete += (s, e) => { Assert.Equal (new Rectangle (0, 0, 38, 1), label._needsDisplayRect); };
 
-        button.LayoutComplete += (s, e) => { Assert.Equal (new Rect (0, 0, 13, 1), button._needsDisplayRect); };
+        button.LayoutComplete += (s, e) => { Assert.Equal (new Rectangle (0, 0, 13, 1), button._needsDisplayRect); };
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
-        Assert.Equal (new Rect (20, 8, 40, 8), frame.Frame);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Frame);
+        Assert.Equal (new Rectangle (20, 8, 40, 8), frame.Frame);
 
         Assert.Equal (
-                      new Rect (20, 8, 60, 16),
-                      new Rect (
+                      new Rectangle (20, 8, 60, 16),
+                      new Rectangle (
                                 frame.Frame.Left,
                                 frame.Frame.Top,
                                 frame.Frame.Right,
                                 frame.Frame.Bottom
                                )
                      );
-        Assert.Equal (new Rect (0, 0, 30, 1), label.Frame);
-        Assert.Equal (new Rect (0, 1, 13, 1), button.Frame); // this proves frame was set
+        Assert.Equal (new Rectangle (0, 0, 30, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 1, 13, 1), button.Frame); // this proves frame was set
         Application.End (runState);
     }
 
@@ -605,9 +605,9 @@ At 0,0
                                                       _output
                                                      );
 
-        view.Frame = new Rect (3, 3, 10, 1);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 1), view._needsDisplayRect);
+        view.Frame = new Rectangle (3, 3, 10, 1);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         view.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -654,9 +654,9 @@ At 0,0
         view.Y = 3;
         view.Width = 10;
         view.Height = 1;
-        Assert.Equal (new Rect (3, 3, 10, 1), view.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 30, 2), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (3, 3, 10, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 30, 2), view._needsDisplayRect);
         view.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -699,11 +699,11 @@ At 0,0
                                                       _output
                                                      );
 
-        view.Frame = new Rect (1, 1, 10, 1);
-        Assert.Equal (new Rect (1, 1, 10, 1), view.Frame);
+        view.Frame = new Rectangle (1, 1, 10, 1);
+        Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
         Assert.Equal (LayoutStyle.Absolute, view.LayoutStyle);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 1), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view._needsDisplayRect);
         view.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -750,9 +750,9 @@ At 0,0
         view.Y = 1;
         view.Width = 10;
         view.Height = 1;
-        Assert.Equal (new Rect (1, 1, 10, 1), view.Frame);
-        Assert.Equal (new Rect (0, 0, 10, 1), view.Bounds);
-        Assert.Equal (new Rect (0, 0, 30, 2), view._needsDisplayRect);
+        Assert.Equal (new Rectangle (1, 1, 10, 1), view.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 30, 2), view._needsDisplayRect);
         view.Draw ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -1008,7 +1008,7 @@ At 0,0
     [Fact]
     public void Internal_Tests ()
     {
-        var rect = new Rect (1, 1, 10, 1);
+        var rect = new Rectangle (1, 1, 10, 1);
         var view = new View { Frame = rect };
     }
 
@@ -1087,8 +1087,8 @@ At 0,0
         Assert.Equal ("View()(0,0,0,0)", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
-        Assert.Equal (new Rect (0, 0, 0, 0), r.Bounds);
-        Assert.Equal (new Rect (0, 0, 0, 0), r.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), r.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), r.Frame);
         Assert.Null (r.Focused);
         Assert.Null (r.ColorScheme);
         Assert.Equal (0, r.Width);
@@ -1106,14 +1106,14 @@ At 0,0
         r.Dispose ();
 
         // Empty Rect
-        r = new View { Frame = Rect.Empty };
+        r = new View { Frame = Rectangle.Empty };
         Assert.NotNull (r);
         Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle);
         Assert.Equal ("View()(0,0,0,0)", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
-        Assert.Equal (new Rect (0, 0, 0, 0), r.Bounds);
-        Assert.Equal (new Rect (0, 0, 0, 0), r.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), r.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), r.Frame);
         Assert.Null (r.Focused);
         Assert.Null (r.ColorScheme);
         Assert.Equal (0, r.Width);
@@ -1131,14 +1131,14 @@ At 0,0
         r.Dispose ();
 
         // Rect with values
-        r = new View { Frame = new Rect (1, 2, 3, 4) };
+        r = new View { Frame = new Rectangle (1, 2, 3, 4) };
         Assert.NotNull (r);
         Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle);
         Assert.Equal ("View()(1,2,3,4)", r.ToString ());
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
-        Assert.Equal (new Rect (0, 0, 3, 4), r.Bounds);
-        Assert.Equal (new Rect (1, 2, 3, 4), r.Frame);
+        Assert.Equal (new Rectangle (0, 0, 3, 4), r.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 3, 4), r.Frame);
         Assert.Null (r.Focused);
         Assert.Null (r.ColorScheme);
         Assert.Equal (3, r.Width);
@@ -1173,8 +1173,8 @@ At 0,0
     #endif
         Assert.False (r.CanFocus);
         Assert.False (r.HasFocus);
-        Assert.Equal (new Rect (0, 0, 1, 13), r.Bounds);
-        Assert.Equal (new Rect (0, 0, 1, 13), r.Frame);
+        Assert.Equal (new Rectangle (0, 0, 1, 13), r.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 1, 13), r.Frame);
         Assert.Null (r.Focused);
         Assert.Null (r.ColorScheme);
         Assert.False (r.IsCurrentTop);
@@ -1258,7 +1258,7 @@ At 0,0
         var view = new View { X = 1, Y = 2, Width = 3, Height = 4 };
 
         // Object Initializer Absolute
-        var super = new View { Frame = new Rect (0, 0, 10, 10) };
+        var super = new View { Frame = new Rectangle (0, 0, 10, 10) };
         super.Add (view);
         super.BeginInit ();
         super.EndInit ();
@@ -1269,9 +1269,9 @@ At 0,0
         Assert.Equal (3, view.Width);
         Assert.Equal (4, view.Height);
         Assert.False (view.Frame.IsEmpty);
-        Assert.Equal (new Rect (1, 2, 3, 4), view.Frame);
+        Assert.Equal (new Rectangle (1, 2, 3, 4), view.Frame);
         Assert.False (view.Bounds.IsEmpty);
-        Assert.Equal (new Rect (0, 0, 3, 4), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 3, 4), view.Bounds);
 
         view.LayoutSubviews ();
 
@@ -1313,7 +1313,7 @@ At 0,0
         view.Y = 2;
         view.Width = 3;
         view.Height = 4;
-        super = new View { Frame = new Rect (0, 0, 10, 10) };
+        super = new View { Frame = new Rectangle (0, 0, 10, 10) };
         super.Add (view);
         super.BeginInit ();
         super.EndInit ();
@@ -1323,9 +1323,9 @@ At 0,0
         Assert.Equal (3, view.Width);
         Assert.Equal (4, view.Height);
         Assert.False (view.Frame.IsEmpty);
-        Assert.Equal (new Rect (1, 2, 3, 4), view.Frame);
+        Assert.Equal (new Rectangle (1, 2, 3, 4), view.Frame);
         Assert.False (view.Bounds.IsEmpty);
-        Assert.Equal (new Rect (0, 0, 3, 4), view.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 3, 4), view.Bounds);
         super.Dispose ();
     }
 
@@ -1460,7 +1460,7 @@ At 0,0
         public bool IsKeyUp { get; set; }
         public override string Text { get; set; }
 
-        public override void OnDrawContent (Rect contentArea)
+        public override void OnDrawContent (Rectangle contentArea)
         {
             var idx = 0;
 

+ 2 - 2
UnitTests/Views/AllViewsTests.cs

@@ -196,9 +196,9 @@ public class AllViewsTests
     // create the right type of argument for the constructor.
     private static void AddArguments (Type paramType, List<object> pTypes)
     {
-        if (paramType == typeof (Rect))
+        if (paramType == typeof (Rectangle))
         {
-            pTypes.Add (Rect.Empty);
+            pTypes.Add (Rectangle.Empty);
         }
         else if (paramType == typeof (string))
         {

+ 24 - 24
UnitTests/Views/ButtonTests.cs

@@ -90,20 +90,20 @@ public class ButtonTests
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (54, 11);
 
-        Assert.Equal (new Rect (0, 0, 54, 11), win.Frame);
-        Assert.Equal (new Rect (0, 0, 52, 9), tabView.Frame);
-        Assert.Equal (new Rect (0, 0, 50, 7), tab.Frame);
-        Assert.Equal (new Rect (0, 1, 8, 1), view.Frame);
-        Assert.Equal (new Rect (9, 1, 20, 1), txtToFind.Frame);
+        Assert.Equal (new Rectangle (0, 0, 54, 11), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 52, 9), tabView.Frame);
+        Assert.Equal (new Rectangle (0, 0, 50, 7), tab.Frame);
+        Assert.Equal (new Rectangle (0, 1, 8, 1), view.Frame);
+        Assert.Equal (new Rectangle (9, 1, 20, 1), txtToFind.Frame);
 
         Assert.Equal (0, txtToFind.ScrollOffset);
         Assert.Equal (16, txtToFind.CursorPosition);
 
-        Assert.Equal (new Rect (30, 1, 20, 1), btnFindNext.Frame);
-        Assert.Equal (new Rect (30, 2, 20, 1), btnFindPrevious.Frame);
-        Assert.Equal (new Rect (30, 4, 20, 1), btnCancel.Frame);
-        Assert.Equal (new Rect (0, 3, 12, 1), ckbMatchCase.Frame);
-        Assert.Equal (new Rect (0, 4, 18, 1), ckbMatchWholeWord.Frame);
+        Assert.Equal (new Rectangle (30, 1, 20, 1), btnFindNext.Frame);
+        Assert.Equal (new Rectangle (30, 2, 20, 1), btnFindPrevious.Frame);
+        Assert.Equal (new Rectangle (30, 4, 20, 1), btnCancel.Frame);
+        Assert.Equal (new Rectangle (0, 3, 12, 1), ckbMatchCase.Frame);
+        Assert.Equal (new Rectangle (0, 4, 18, 1), ckbMatchWholeWord.Frame);
 
         var btn1 =
             $"{
@@ -404,15 +404,15 @@ public class ButtonTests
         Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
         Assert.Equal ('_', btn.HotKeySpecifier.Value);
         Assert.True (btn.CanFocus);
-        Assert.Equal (new Rect (0, 0, 4, 1), btn.Bounds);
-        Assert.Equal (new Rect (0, 0, 4, 1), btn.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Frame);
         Assert.Equal ($"{CM.Glyphs.LeftBracket}  {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
         Assert.False (btn.IsDefault);
         Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
         Assert.Equal ('_', btn.HotKeySpecifier.Value);
         Assert.True (btn.CanFocus);
-        Assert.Equal (new Rect (0, 0, 4, 1), btn.Bounds);
-        Assert.Equal (new Rect (0, 0, 4, 1), btn.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), btn.Frame);
 
         Assert.Equal (string.Empty, btn.Title);
         Assert.Equal (KeyCode.Null, btn.HotKey);
@@ -450,8 +450,8 @@ public class ButtonTests
         Assert.True (btn.IsDefault);
         Assert.Equal (TextAlignment.Centered, btn.TextAlignment);
         Assert.True (btn.CanFocus);
-        Assert.Equal (new Rect (0, 0, 10, 1), btn.Bounds);
-        Assert.Equal (new Rect (0, 0, 10, 1), btn.Frame);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 1), btn.Frame);
         Assert.Equal (KeyCode.T, btn.HotKey);
 
         btn = new Button { X = 1, Y = 2, Text = "_abc", IsDefault = true };
@@ -493,8 +493,8 @@ public class ButtonTests
 ";
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
-        Assert.Equal (new Rect (0, 0, 9, 1), btn.Bounds);
-        Assert.Equal (new Rect (1, 2, 9, 1), btn.Frame);
+        Assert.Equal (new Rectangle (0, 0, 9, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (1, 2, 9, 1), btn.Frame);
     }
 
     [Fact]
@@ -698,7 +698,7 @@ public class ButtonTests
         Assert.True (btn.IsInitialized);
         Assert.Equal ("Say Hello 你", btn.Text);
         Assert.Equal ($"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
-        Assert.Equal (new Rect (0, 0, 16, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Bounds);
         var btnTxt = $"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}";
 
         var expected = @$"
@@ -711,8 +711,8 @@ public class ButtonTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]
@@ -735,7 +735,7 @@ public class ButtonTests
         Assert.True (btn.IsInitialized);
         Assert.Equal ("Say Hello 你", btn.Text);
         Assert.Equal ($"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
-        Assert.Equal (new Rect (0, 0, 16, 1), btn.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 16, 1), btn.Bounds);
         var btnTxt = $"{CM.Glyphs.LeftBracket} {btn.Text} {CM.Glyphs.RightBracket}";
 
         var expected = @$"
@@ -748,7 +748,7 @@ public class ButtonTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 }

+ 33 - 33
UnitTests/Views/CheckBoxTests.cs

@@ -154,7 +154,7 @@ public class CheckBoxTests
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
         Assert.True (checkBox.IsInitialized);
-        Assert.Equal (new Rect (1, 1, 19, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 19, 1), checkBox.Frame);
         Assert.Equal ("Check this out 你", checkBox.Text);
         Assert.Equal ($"{CM.Glyphs.UnChecked} Check this out 你", checkBox.TextFormatter.Text);
         Assert.True (checkBox.AutoSize);
@@ -171,7 +171,7 @@ public class CheckBoxTests
         Application.RunIteration (ref runstate, ref firstIteration);
 
         // BUGBUG - v2 - Autosize is busted; disabling tests for now
-        Assert.Equal (new Rect (1, 1, 19, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 19, 1), checkBox.Frame);
 
         var expected = @"
 ┌┤Test Demo 你├──────────────┐
@@ -180,8 +180,8 @@ public class CheckBoxTests
 │                            │
 └────────────────────────────┘";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         checkBox.Width = 19;
 
@@ -189,7 +189,7 @@ public class CheckBoxTests
         checkBox.Text = "Check this out 你 changed";
         Application.RunIteration (ref runstate, ref firstIteration);
         Assert.False (checkBox.AutoSize);
-        Assert.Equal (new Rect (1, 1, 19, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 19, 1), checkBox.Frame);
 
         expected = @"
 ┌┤Test Demo 你├──────────────┐
@@ -199,11 +199,11 @@ public class CheckBoxTests
 └────────────────────────────┘";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         checkBox.AutoSize = true;
         Application.RunIteration (ref runstate, ref firstIteration);
-        Assert.Equal (new Rect (1, 1, 27, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 27, 1), checkBox.Frame);
 
         expected = @"
 ┌┤Test Demo 你├──────────────┐
@@ -213,7 +213,7 @@ public class CheckBoxTests
 └────────────────────────────┘";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]
@@ -226,7 +226,7 @@ public class CheckBoxTests
         Assert.Equal (string.Empty, ckb.Text);
         Assert.Equal ($"{CM.Glyphs.UnChecked} ", ckb.TextFormatter.Text);
         Assert.True (ckb.CanFocus);
-        Assert.Equal (new Rect (0, 0, 2, 1), ckb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 2, 1), ckb.Frame);
 
         ckb = new CheckBox { Text = "Test", Checked = true };
         Assert.True (ckb.AutoSize);
@@ -235,7 +235,7 @@ public class CheckBoxTests
         Assert.Equal ("Test", ckb.Text);
         Assert.Equal ($"{CM.Glyphs.Checked} Test", ckb.TextFormatter.Text);
         Assert.True (ckb.CanFocus);
-        Assert.Equal (new Rect (0, 0, 6, 1), ckb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 6, 1), ckb.Frame);
 
         ckb = new CheckBox { Text = "Test", X = 1, Y = 2 };
         Assert.True (ckb.AutoSize);
@@ -244,7 +244,7 @@ public class CheckBoxTests
         Assert.Equal ("Test", ckb.Text);
         Assert.Equal ($"{CM.Glyphs.UnChecked} Test", ckb.TextFormatter.Text);
         Assert.True (ckb.CanFocus);
-        Assert.Equal (new Rect (1, 2, 6, 1), ckb.Frame);
+        Assert.Equal (new Rectangle (1, 2, 6, 1), ckb.Frame);
 
         ckb = new CheckBox { Text = "Test", X = 3, Y = 4, Checked = true };
         Assert.True (ckb.AutoSize);
@@ -253,7 +253,7 @@ public class CheckBoxTests
         Assert.Equal ("Test", ckb.Text);
         Assert.Equal ($"{CM.Glyphs.Checked} Test", ckb.TextFormatter.Text);
         Assert.True (ckb.CanFocus);
-        Assert.Equal (new Rect (3, 4, 6, 1), ckb.Frame);
+        Assert.Equal (new Rectangle (3, 4, 6, 1), ckb.Frame);
     }
 
     [Fact]
@@ -308,8 +308,8 @@ public class CheckBoxTests
 } Test
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 6, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 6, 1), pos);
     }
 
     [Fact]
@@ -333,7 +333,7 @@ public class CheckBoxTests
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
         Assert.Equal (TextAlignment.Centered, checkBox.TextAlignment);
-        Assert.Equal (new Rect (1, 1, 25, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (new Size (25, 1), checkBox.TextFormatter.Size);
         Assert.False (checkBox.AutoSize);
 
@@ -347,8 +347,8 @@ public class CheckBoxTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         checkBox.Checked = true;
         Application.Refresh ();
@@ -364,7 +364,7 @@ public class CheckBoxTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]
@@ -398,10 +398,10 @@ public class CheckBoxTests
         ((FakeDriver)Application.Driver).SetBufferSize (30, 6);
 
         Assert.Equal (TextAlignment.Justified, checkBox1.TextAlignment);
-        Assert.Equal (new Rect (1, 1, 25, 1), checkBox1.Frame);
+        Assert.Equal (new Rectangle (1, 1, 25, 1), checkBox1.Frame);
         Assert.Equal (new Size (25, 1), checkBox1.TextFormatter.Size);
         Assert.Equal (TextAlignment.Justified, checkBox2.TextAlignment);
-        Assert.Equal (new Rect (1, 2, 25, 1), checkBox2.Frame);
+        Assert.Equal (new Rectangle (1, 2, 25, 1), checkBox2.Frame);
         Assert.Equal (new Size (25, 1), checkBox2.TextFormatter.Size);
 
         var expected = @$"
@@ -417,14 +417,14 @@ public class CheckBoxTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 6), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 6), pos);
 
         checkBox1.Checked = true;
-        Assert.Equal (new Rect (1, 1, 25, 1), checkBox1.Frame);
+        Assert.Equal (new Rectangle (1, 1, 25, 1), checkBox1.Frame);
         Assert.Equal (new Size (25, 1), checkBox1.TextFormatter.Size);
         checkBox2.Checked = true;
-        Assert.Equal (new Rect (1, 2, 25, 1), checkBox2.Frame);
+        Assert.Equal (new Rectangle (1, 2, 25, 1), checkBox2.Frame);
         Assert.Equal (new Size (25, 1), checkBox2.TextFormatter.Size);
         Application.Refresh ();
 
@@ -442,7 +442,7 @@ public class CheckBoxTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 6), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 6), pos);
     }
 
     [Fact]
@@ -465,7 +465,7 @@ public class CheckBoxTests
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
         Assert.Equal (TextAlignment.Left, checkBox.TextAlignment);
-        Assert.Equal (new Rect (1, 1, 25, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (new Size (25, 1), checkBox.TextFormatter.Size);
 
         var expected = @$"
@@ -478,8 +478,8 @@ public class CheckBoxTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         checkBox.Checked = true;
         Application.Refresh ();
@@ -495,7 +495,7 @@ public class CheckBoxTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]
@@ -519,7 +519,7 @@ public class CheckBoxTests
         ((FakeDriver)Application.Driver).SetBufferSize (30, 5);
 
         Assert.Equal (TextAlignment.Right, checkBox.TextAlignment);
-        Assert.Equal (new Rect (1, 1, 25, 1), checkBox.Frame);
+        Assert.Equal (new Rectangle (1, 1, 25, 1), checkBox.Frame);
         Assert.Equal (new Size (25, 1), checkBox.TextFormatter.Size);
         Assert.False (checkBox.AutoSize);
 
@@ -533,8 +533,8 @@ public class CheckBoxTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         checkBox.Checked = true;
         Application.Refresh ();
@@ -550,6 +550,6 @@ public class CheckBoxTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 }

+ 1 - 1
UnitTests/Views/ColorPickerTests.cs

@@ -13,7 +13,7 @@ public class ColorPickerTests
         colorPicker.BeginInit ();
         colorPicker.EndInit ();
         colorPicker.LayoutSubviews ();
-        Assert.Equal (new Rect (0, 0, 32, 4), colorPicker.Frame);
+        Assert.Equal (new Rectangle (0, 0, 32, 4), colorPicker.Frame);
     }
 
     [Fact]

+ 5 - 5
UnitTests/Views/ComboBoxTests.cs

@@ -21,7 +21,7 @@ public class ComboBoxTests
         Assert.Equal ("Two", cb.Text);
         Assert.NotNull (cb.Source);
         Assert.False (cb.AutoSize);
-        Assert.Equal (new Rect (0, 0, 0, 2), cb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 2), cb.Frame);
         Assert.Equal (1, cb.SelectedItem);
     }
 
@@ -36,7 +36,7 @@ public class ComboBoxTests
         Assert.Equal (string.Empty, cb.Text);
         Assert.Null (cb.Source);
         Assert.False (cb.AutoSize);
-        Assert.Equal (new Rect (0, 0, 0, 2), cb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 2), cb.Frame);
         Assert.Equal (-1, cb.SelectedItem);
 
         cb = new ComboBox { Text = "Test" };
@@ -46,7 +46,7 @@ public class ComboBoxTests
         Assert.Equal ("Test", cb.Text);
         Assert.Null (cb.Source);
         Assert.False (cb.AutoSize);
-        Assert.Equal (new Rect (0, 0, 0, 2), cb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 2), cb.Frame);
         Assert.Equal (-1, cb.SelectedItem);
 
         cb = new ComboBox
@@ -63,7 +63,7 @@ public class ComboBoxTests
         Assert.Equal (string.Empty, cb.Text);
         Assert.NotNull (cb.Source);
         Assert.False (cb.AutoSize);
-        Assert.Equal (new Rect (1, 2, 10, 20), cb.Frame);
+        Assert.Equal (new Rectangle (1, 2, 10, 20), cb.Frame);
         Assert.Equal (-1, cb.SelectedItem);
 
         cb = new ComboBox { Source = new ListWrapper (new List<string> { "One", "Two", "Three" }) };
@@ -73,7 +73,7 @@ public class ComboBoxTests
         Assert.Equal (string.Empty, cb.Text);
         Assert.NotNull (cb.Source);
         Assert.False (cb.AutoSize);
-        Assert.Equal (new Rect (0, 0, 0, 2), cb.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 2), cb.Frame);
         Assert.Equal (-1, cb.SelectedItem);
     }
 

+ 31 - 31
UnitTests/Views/ContextMenuTests.cs

@@ -146,7 +146,7 @@ public class ContextMenuTests
         ((FakeDriver)Application.Driver).SetBufferSize (45, 17);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (9, 3, 20, 1), tf.Frame);
+        Assert.Equal (new Rectangle (9, 3, 20, 1), tf.Frame);
         Assert.True (tf.HasFocus);
 
         tf.ContextMenu.Show ();
@@ -174,8 +174,8 @@ public class ContextMenuTests
  F1 Help │ ^Q Quit              
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 32, 17), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 32, 17), pos);
     }
 
     [Fact]
@@ -212,7 +212,7 @@ public class ContextMenuTests
         Application.Begin (Application.Top);
         ((FakeDriver)Application.Driver).SetBufferSize (44, 17);
 
-        Assert.Equal (new Rect (9, 3, 20, 1), tf.Frame);
+        Assert.Equal (new Rectangle (9, 3, 20, 1), tf.Frame);
         Assert.True (tf.HasFocus);
 
         tf.ContextMenu.Show ();
@@ -240,8 +240,8 @@ public class ContextMenuTests
  F1 Help │ ^Q Quit                          
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 44, 17), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 44, 17), pos);
     }
 
     [Fact]
@@ -250,14 +250,14 @@ public class ContextMenuTests
     {
         ((FakeDriver)Application.Driver).SetBufferSize (20, 15);
 
-        Assert.Equal (new Rect (0, 0, 20, 15), Application.Driver.Clip);
+        Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver.Clip);
         TestHelpers.AssertDriverContentsWithFrameAre ("", _output);
 
         var top = new Toplevel { X = 2, Y = 2, Width = 15, Height = 4 };
         top.Add (new TextField { X = Pos.Center (), Width = 10, Text = "Test" });
         RunState rs = Application.Begin (top);
 
-        Assert.Equal (new Rect (2, 2, 15, 4), top.Frame);
+        Assert.Equal (new Rectangle (2, 2, 15, 4), top.Frame);
         Assert.Equal (top, Application.Top);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -303,7 +303,7 @@ public class ContextMenuTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (20, 15);
 
-        Assert.Equal (new Rect (0, 0, 20, 15), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 20, 15), win.Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -330,7 +330,7 @@ public class ContextMenuTests
         dialog.Add (new TextField { X = Pos.Center (), Width = 10, Text = "Test" });
         RunState rs = Application.Begin (dialog);
 
-        Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
+        Assert.Equal (new Rectangle (2, 2, 15, 4), dialog.Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -390,7 +390,7 @@ public class ContextMenuTests
     {
         ((FakeDriver)Application.Driver).SetBufferSize (20, 15);
 
-        Assert.Equal (new Rect (0, 0, 20, 15), Application.Driver.Clip);
+        Assert.Equal (new Rectangle (0, 0, 20, 15), Application.Driver.Clip);
         TestHelpers.AssertDriverContentsWithFrameAre ("", _output);
 
         // Don't use Dialog here as it has more layout logic. Use Window instead.
@@ -398,7 +398,7 @@ public class ContextMenuTests
         dialog.Add (new TextField { X = Pos.Center (), Width = 10, Text = "Test" });
         RunState rs = Application.Begin (dialog);
 
-        Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
+        Assert.Equal (new Rectangle (2, 2, 15, 4), dialog.Frame);
         Assert.Equal (dialog, Application.Top);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -466,8 +466,8 @@ public class ContextMenuTests
 └──────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 1, 8, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 1, 8, 4), pos);
 
         cm.ForceMinimumPosToZero = false;
         cm.Show ();
@@ -481,7 +481,7 @@ public class ContextMenuTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 7, 3), pos);
+        Assert.Equal (new Rectangle (1, 0, 7, 3), pos);
     }
 
     [Fact]
@@ -1064,8 +1064,8 @@ public class ContextMenuTests
 │ One  │
 │ Two  │";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 8, 3), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 8, 3), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (0, 0), cm.Position);
@@ -1100,8 +1100,8 @@ public class ContextMenuTests
 │ Two
 └────";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 1, 5, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 1, 5, 4), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (0, 0), cm.Position);
@@ -1149,8 +1149,8 @@ public class ContextMenuTests
           └──────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (10, 5, 18, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (10, 5, 18, 5), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (10, 5), cm.Position);
@@ -1173,7 +1173,7 @@ public class ContextMenuTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (5, 10, 13, 7), pos);
+        Assert.Equal (new Rectangle (5, 10, 13, 7), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (5, 12), cm.Position);
@@ -1207,8 +1207,8 @@ public class ContextMenuTests
                                                                         └──────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (72, 21, 80, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (72, 21, 80, 4), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (80, 25), cm.Position);
@@ -1241,7 +1241,7 @@ public class ContextMenuTests
         Application.Top.Add (view);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (70, 24, 10, 1), view.Frame);
+        Assert.Equal (new Rectangle (70, 24, 10, 1), view.Frame);
         Assert.Equal (Point.Empty, cm.Position);
 
         cm.Show ();
@@ -1256,8 +1256,8 @@ public class ContextMenuTests
                                                                       View    
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (70, 20, 78, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (70, 20, 78, 5), pos);
 
         cm.Hide ();
         Assert.Equal (new Point (70, 24), cm.Position);
@@ -1324,7 +1324,7 @@ public class ContextMenuTests
         cm.Show ();
         RunState rs = Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
+        Assert.Equal (new Rectangle (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -1344,8 +1344,8 @@ public class ContextMenuTests
 
         var firstIteration = false;
         Application.RunIteration (ref rs, ref firstIteration);
-        Assert.Equal (new Rect (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
-        Assert.Equal (new Rect (5, 11, 15, 6), Application.Top.Subviews [1].Frame);
+        Assert.Equal (new Rectangle (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
+        Assert.Equal (new Rectangle (5, 11, 15, 6), Application.Top.Subviews [1].Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -1366,7 +1366,7 @@ public class ContextMenuTests
 
         firstIteration = false;
         Application.RunIteration (ref rs, ref firstIteration);
-        Assert.Equal (new Rect (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
+        Assert.Equal (new Rectangle (5, 11, 10, 5), Application.Top.Subviews [0].Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"

+ 3 - 3
UnitTests/Views/DateFieldTests.cs

@@ -11,20 +11,20 @@ public class DateFieldTests
         var df = new DateField ();
         Assert.Equal (DateTime.MinValue, df.Date);
         Assert.Equal (1, df.CursorPosition);
-        Assert.Equal (new Rect (0, 0, 12, 1), df.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), df.Frame);
         Assert.Equal (" 01/01/0001", df.Text);
 
         DateTime date = DateTime.Now;
         df = new DateField (date);
         Assert.Equal (date, df.Date);
         Assert.Equal (1, df.CursorPosition);
-        Assert.Equal (new Rect (0, 0, 12, 1), df.Frame);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), df.Frame);
         Assert.Equal ($" {date.ToString (CultureInfo.InvariantCulture.DateTimeFormat.ShortDatePattern)}", df.Text);
 
         df = new DateField (date) { X = 1, Y = 2 };
         Assert.Equal (date, df.Date);
         Assert.Equal (1, df.CursorPosition);
-        Assert.Equal (new Rect (1, 2, 12, 1), df.Frame);
+        Assert.Equal (new Rectangle (1, 2, 12, 1), df.Frame);
         Assert.Equal ($" {date.ToString (CultureInfo.InvariantCulture.DateTimeFormat.ShortDatePattern)}", df.Text);
     }
 

+ 6 - 6
UnitTests/Views/FrameViewTests.cs

@@ -33,7 +33,7 @@ public class FrameViewTests
         fv.BeginInit ();
         fv.EndInit ();
         Assert.Equal (LineStyle.Single, fv.BorderStyle);
-        Assert.Equal (new Rect (1, 2, 10, 20), fv.Frame);
+        Assert.Equal (new Rectangle (1, 2, 10, 20), fv.Frame);
     }
 
     [Fact]
@@ -46,12 +46,12 @@ public class FrameViewTests
         Assert.Equal (string.Empty, fv.Text);
         Application.Top.Add (fv);
         Application.Begin (Application.Top);
-        Assert.Equal (new Rect (0, 0, 0, 0), fv.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), fv.Frame);
         TestHelpers.AssertDriverContentsWithFrameAre (@"", _output);
 
         fv.Height = 5;
         fv.Width = 5;
-        Assert.Equal (new Rect (0, 0, 5, 5), fv.Frame);
+        Assert.Equal (new Rectangle (0, 0, 5, 5), fv.Frame);
         Application.Refresh ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -66,7 +66,7 @@ public class FrameViewTests
 
         fv.X = 1;
         fv.Y = 2;
-        Assert.Equal (new Rect (1, 2, 5, 5), fv.Frame);
+        Assert.Equal (new Rectangle (1, 2, 5, 5), fv.Frame);
         Application.Refresh ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -81,7 +81,7 @@ public class FrameViewTests
 
         fv.X = -1;
         fv.Y = -2;
-        Assert.Equal (new Rect (-1, -2, 5, 5), fv.Frame);
+        Assert.Equal (new Rectangle (-1, -2, 5, 5), fv.Frame);
         Application.Refresh ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (
@@ -94,7 +94,7 @@ public class FrameViewTests
 
         fv.X = 7;
         fv.Y = 8;
-        Assert.Equal (new Rect (7, 8, 5, 5), fv.Frame);
+        Assert.Equal (new Rectangle (7, 8, 5, 5), fv.Frame);
         Application.Refresh ();
 
         TestHelpers.AssertDriverContentsWithFrameAre (

+ 34 - 34
UnitTests/Views/GraphViewTests.cs

@@ -61,7 +61,7 @@ public class GraphViewTests
         gv.EndInit ();
 
         gv.ColorScheme = new ColorScheme ();
-        gv.Bounds = new Rect (0, 0, 50, 30);
+        gv.Bounds = new Rectangle (0, 0, 50, 30);
         gv.Series.Add (new ScatterSeries { Points = new List<PointF> { new (1, 1) } });
         gv.CellSize = new PointF (0, 5);
         var ex = Assert.Throws<Exception> (() => gv.Draw ());
@@ -85,7 +85,7 @@ public class GraphViewTests
         gv.ColorScheme = new ColorScheme ();
         gv.MarginBottom = 1;
         gv.MarginLeft = 1;
-        gv.Bounds = new Rect (0, 0, 10, 5);
+        gv.Bounds = new Rectangle (0, 0, 10, 5);
 
         return gv;
     }
@@ -128,7 +128,7 @@ public class GraphViewTests
         var gv = new GraphView ();
         gv.BeginInit ();
         gv.EndInit ();
-        gv.Bounds = new Rect (0, 0, 50, 30);
+        gv.Bounds = new Rectangle (0, 0, 50, 30);
 
         // How much graph space each cell of the console depicts
         gv.CellSize = new PointF (0.1f, 0.25f);
@@ -199,7 +199,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // origin should be bottom left
         RectangleF botLeft = gv.ScreenToGraphSpace (0, 9);
@@ -221,7 +221,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // origin should be bottom left
         RectangleF botLeft = gv.ScreenToGraphSpace (0, 9);
@@ -261,7 +261,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // Each cell of screen measures 5 units in graph data model vertically and 1/4 horizontally
         gv.CellSize = new PointF (0.25f, 5);
@@ -293,7 +293,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // origin should be bottom left
         Point botLeft = gv.GraphSpaceToScreen (new PointF (0, 0));
@@ -313,7 +313,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // origin should be bottom left
         Point botLeft = gv.GraphSpaceToScreen (new PointF (0, 0));
@@ -343,7 +343,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         //graph is scrolled to present chart space -5 to 5 in both axes
         gv.ScrollOffset = new PointF (-5, -5);
@@ -366,7 +366,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // Each cell of screen is responsible for rendering 5 units in graph data model
         // vertically and 1/4 horizontally
@@ -407,7 +407,7 @@ public class GraphViewTests
         gv.BeginInit ();
         gv.EndInit ();
 
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
 
         // Each cell of screen is responsible for rendering 5 units in graph data model
         // vertically and 1/4 horizontally
@@ -449,10 +449,10 @@ public class SeriesTests
         gv.BeginInit ();
         gv.EndInit ();
         gv.ColorScheme = new ColorScheme ();
-        gv.Bounds = new Rect (0, 0, 50, 30);
+        gv.Bounds = new Rectangle (0, 0, 50, 30);
 
         var fullGraphBounds = RectangleF.Empty;
-        var graphScreenBounds = Rect.Empty;
+        var graphScreenBounds = Rectangle.Empty;
 
         var series = new FakeSeries (
                                      (v, s, g) =>
@@ -466,7 +466,7 @@ public class SeriesTests
         gv.LayoutSubviews ();
         gv.Draw ();
         Assert.Equal (new RectangleF (0, 0, 50, 30), fullGraphBounds);
-        Assert.Equal (new Rect (0, 0, 50, 30), graphScreenBounds);
+        Assert.Equal (new Rectangle (0, 0, 50, 30), graphScreenBounds);
 
         // Now we put a margin in
         // Graph should not spill into the margins
@@ -482,7 +482,7 @@ public class SeriesTests
 
         // The screen space the graph will be rendered into should
         // not overspill the margins
-        Assert.Equal (new Rect (5, 0, 45, 28), graphScreenBounds);
+        Assert.Equal (new Rectangle (5, 0, 45, 28), graphScreenBounds);
 
         // Shutdown must be called to safely clean up Application if Init has been called
         Application.Shutdown ();
@@ -501,13 +501,13 @@ public class SeriesTests
         gv.BeginInit ();
         gv.EndInit ();
         gv.ColorScheme = new ColorScheme ();
-        gv.Bounds = new Rect (0, 0, 50, 30);
+        gv.Bounds = new Rectangle (0, 0, 50, 30);
 
         // the larger the cell size the more condensed (smaller) the graph space is
         gv.CellSize = new PointF (2, 5);
 
         var fullGraphBounds = RectangleF.Empty;
-        var graphScreenBounds = Rect.Empty;
+        var graphScreenBounds = Rectangle.Empty;
 
         var series = new FakeSeries (
                                      (v, s, g) =>
@@ -525,7 +525,7 @@ public class SeriesTests
         // Since each cell of the console is 2x5 of graph space the graph
         // bounds to be rendered are larger
         Assert.Equal (new RectangleF (0, 0, 100, 150), fullGraphBounds);
-        Assert.Equal (new Rect (0, 0, 50, 30), graphScreenBounds);
+        Assert.Equal (new Rectangle (0, 0, 50, 30), graphScreenBounds);
 
         // Graph should not spill into the margins
 
@@ -540,7 +540,7 @@ public class SeriesTests
 
         // The screen space the graph will be rendered into should
         // not overspill the margins
-        Assert.Equal (new Rect (5, 0, 45, 28), graphScreenBounds);
+        Assert.Equal (new Rectangle (5, 0, 45, 28), graphScreenBounds);
 
         // Shutdown must be called to safely clean up Application if Init has been called
         Application.Shutdown ();
@@ -548,16 +548,16 @@ public class SeriesTests
 
     private class FakeSeries : ISeries
     {
-        private readonly Action<GraphView, Rect, RectangleF> _drawSeries;
+        private readonly Action<GraphView, Rectangle, RectangleF> _drawSeries;
 
         public FakeSeries (
-            Action<GraphView, Rect, RectangleF> drawSeries
+            Action<GraphView, Rectangle, RectangleF> drawSeries
         )
         {
             _drawSeries = drawSeries;
         }
 
-        public void DrawSeries (GraphView graph, Rect bounds, RectangleF graphBounds) { _drawSeries (graph, bounds, graphBounds); }
+        public void DrawSeries (GraphView graph, Rectangle bounds, RectangleF graphBounds) { _drawSeries (graph, bounds, graphBounds); }
     }
 }
 
@@ -641,7 +641,7 @@ public class MultiBarSeriesTests
 
         // y axis goes from 0.1 to 1 across 10 console rows
         // x axis goes from 0 to 20 across 20 console columns
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
         gv.CellSize = new PointF (1f, 0.1f);
         gv.MarginBottom = 1;
         gv.MarginLeft = 1;
@@ -873,7 +873,7 @@ public class BarSeriesTests
 
         // y axis goes from 0.1 to 1 across 10 console rows
         // x axis goes from 0 to 10 across 20 console columns
-        gv.Bounds = new Rect (0, 0, 20, 10);
+        gv.Bounds = new Rectangle (0, 0, 20, 10);
         gv.CellSize = new PointF (0.5f, 0.1f);
 
         gv.Series.Add (series = new FakeBarSeries ());
@@ -914,7 +914,7 @@ public class AxisTests
 
         var gv = new GraphView ();
         gv.ColorScheme = new ColorScheme ();
-        gv.Bounds = new Rect (0, 0, 50, 30);
+        gv.Bounds = new Rectangle (0, 0, 50, 30);
 
         // graph can't be completely empty or it won't draw
         gv.Series.Add (new ScatterSeries ());
@@ -1298,19 +1298,19 @@ public class LegendTests
     public void Constructors_Defaults ()
     {
         var legend = new LegendAnnotation ();
-        Assert.Equal (Rect.Empty, legend.Bounds);
-        Assert.Equal (Rect.Empty, legend.Frame);
+        Assert.Equal (Rectangle.Empty, legend.Bounds);
+        Assert.Equal (Rectangle.Empty, legend.Frame);
         Assert.Equal (LineStyle.Single, legend.BorderStyle);
         Assert.False (legend.BeforeSeries);
 
-        var bounds = new Rect (1, 2, 10, 3);
+        var bounds = new Rectangle (1, 2, 10, 3);
         legend = new LegendAnnotation (bounds);
-        Assert.Equal (new Rect (0, 0, 8, 1), legend.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 8, 1), legend.Bounds);
         Assert.Equal (bounds, legend.Frame);
         Assert.Equal (LineStyle.Single, legend.BorderStyle);
         Assert.False (legend.BeforeSeries);
         legend.BorderStyle = LineStyle.None;
-        Assert.Equal (new Rect (0, 0, 10, 3), legend.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 3), legend.Bounds);
         Assert.Equal (bounds, legend.Frame);
     }
 
@@ -1318,7 +1318,7 @@ public class LegendTests
     public void LegendNormalUsage_WithBorder ()
     {
         GraphView gv = GraphViewTests.GetGraph ();
-        var legend = new LegendAnnotation (new Rect (2, 0, 5, 3));
+        var legend = new LegendAnnotation (new Rectangle (2, 0, 5, 3));
         legend.AddEntry (new GraphCellToRender ((Rune)'A'), "Ant");
         legend.AddEntry (new GraphCellToRender ((Rune)'B'), "Bat");
 
@@ -1343,7 +1343,7 @@ public class LegendTests
     public void LegendNormalUsage_WithoutBorder ()
     {
         GraphView gv = GraphViewTests.GetGraph ();
-        var legend = new LegendAnnotation (new Rect (2, 0, 5, 3));
+        var legend = new LegendAnnotation (new Rectangle (2, 0, 5, 3));
         legend.AddEntry (new GraphCellToRender ((Rune)'A'), "Ant");
         legend.AddEntry (new GraphCellToRender ((Rune)'B'), "?"); // this will exercise pad
         legend.AddEntry (new GraphCellToRender ((Rune)'C'), "Cat");
@@ -1549,7 +1549,7 @@ public class PathAnnotationTests
     public void XAxisLabels_With_MarginLeft ()
     {
         GraphViewTests.InitFakeDriver ();
-        var gv = new GraphView { ColorScheme = new ColorScheme (), Bounds = new Rect (0, 0, 10, 7) };
+        var gv = new GraphView { ColorScheme = new ColorScheme (), Bounds = new Rectangle (0, 0, 10, 7) };
 
         gv.CellSize = new PointF (1, 0.5f);
         gv.AxisY.Increment = 1;
@@ -1591,7 +1591,7 @@ public class PathAnnotationTests
     public void YAxisLabels_With_MarginBottom ()
     {
         GraphViewTests.InitFakeDriver ();
-        var gv = new GraphView { ColorScheme = new ColorScheme (), Bounds = new Rect (0, 0, 10, 7) };
+        var gv = new GraphView { ColorScheme = new ColorScheme (), Bounds = new Rectangle (0, 0, 10, 7) };
 
         gv.CellSize = new PointF (1, 0.5f);
         gv.AxisY.Increment = 1;

+ 20 - 20
UnitTests/Views/LabelTests.cs

@@ -132,7 +132,7 @@ public class LabelTests
         Assert.Equal (TextAlignment.Left, label.TextAlignment);
         Assert.True (label.AutoSize);
         Assert.False (label.CanFocus);
-        Assert.Equal (new Rect (0, 0, 0, 0), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), label.Frame);
         Assert.Equal (KeyCode.Null, label.HotKey);
         var expected = @"";
         TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
@@ -145,7 +145,7 @@ public class LabelTests
         rs = Application.Begin (Application.Top);
 
         Assert.Equal ("Test", label.TextFormatter.Text);
-        Assert.Equal (new Rect (0, 0, 4, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 4, 1), label.Frame);
 
         expected = @"
 Test
@@ -159,7 +159,7 @@ Test
         rs = Application.Begin (Application.Top);
 
         Assert.Equal ("Test", label.TextFormatter.Text);
-        Assert.Equal (new Rect (3, 4, 4, 1), label.Frame);
+        Assert.Equal (new Rectangle (3, 4, 4, 1), label.Frame);
 
         expected = @"
    Test
@@ -189,12 +189,12 @@ Test
         Assert.True (label.AutoSize);
 
         tf1.Draw (
-                  new Rect (new Point (0, 1), tf1Size),
+                  new Rectangle (new Point (0, 1), tf1Size),
                   label.GetNormalColor (),
                   label.ColorScheme.HotNormal
                  );
 
-        tf2.Draw (new Rect (new Point (0, 2), tf2Size), label.GetNormalColor (), label.ColorScheme.HotNormal);
+        tf2.Draw (new Rectangle (new Point (0, 2), tf2Size), label.GetNormalColor (), label.ColorScheme.HotNormal);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -211,13 +211,13 @@ This TextFormatter (tf2) with fill will be cleared on rewritten.
         tf1.Text = "This TextFormatter (tf1) is rewritten.";
 
         tf1.Draw (
-                  new Rect (new Point (0, 1), tf1Size),
+                  new Rectangle (new Point (0, 1), tf1Size),
                   label.GetNormalColor (),
                   label.ColorScheme.HotNormal
                  );
 
         tf2.Text = "This TextFormatter (tf2) is rewritten.";
-        tf2.Draw (new Rect (new Point (0, 2), tf2Size), label.GetNormalColor (), label.ColorScheme.HotNormal);
+        tf2.Draw (new Rectangle (new Point (0, 2), tf2Size), label.GetNormalColor (), label.ColorScheme.HotNormal);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -238,14 +238,14 @@ This TextFormatter (tf2) is rewritten.
         Application.Begin (Application.Top);
 
         Assert.True (label.AutoSize);
-        Assert.Equal (new Rect (0, 0, 16, 1), label.Frame);
+        Assert.Equal (new Rectangle (0, 0, 16, 1), label.Frame);
 
         var expected = @"
 Demo Simple Rune
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 16, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 16, 1), pos);
     }
 
     [Fact]
@@ -278,8 +278,8 @@ n
 e
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 1, 16), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 1, 16), pos);
     }
 
     [Fact]
@@ -300,8 +300,8 @@ e
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 2, 7), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 2, 7), pos);
     }
 
     [Fact]
@@ -378,7 +378,7 @@ e
         Assert.True (label.IsInitialized);
         Assert.Equal ("Say Hello 你", label.Text);
         Assert.Equal ("Say Hello 你", label.TextFormatter.Text);
-        Assert.Equal (new Rect (0, 0, 12, 1), label.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), label.Bounds);
 
         var expected = @"
 ┌────────────────────────────┐
@@ -387,8 +387,8 @@ e
 │                            │
 └────────────────────────────┘
 ";
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]
@@ -408,7 +408,7 @@ e
         Assert.True (label.IsInitialized);
         Assert.Equal ("Say Hello 你", label.Text);
         Assert.Equal ("Say Hello 你", label.TextFormatter.Text);
-        Assert.Equal (new Rect (0, 0, 12, 1), label.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 12, 1), label.Bounds);
 
         var expected = @"
 ┌────────────────────────────┐
@@ -418,7 +418,7 @@ e
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 }

+ 2 - 2
UnitTests/Views/ListViewTests.cs

@@ -30,12 +30,12 @@ public class ListViewTests
         };
         Assert.NotNull (lv.Source);
         Assert.Equal (-1, lv.SelectedItem);
-        Assert.Equal (new Rect (0, 1, 10, 20), lv.Frame);
+        Assert.Equal (new Rectangle (0, 1, 10, 20), lv.Frame);
 
         lv = new ListView { Y = 1, Width = 10, Height = 20, Source = new NewListDataSource () };
         Assert.NotNull (lv.Source);
         Assert.Equal (-1, lv.SelectedItem);
-        Assert.Equal (new Rect (0, 1, 10, 20), lv.Frame);
+        Assert.Equal (new Rectangle (0, 1, 10, 20), lv.Frame);
     }
 
     [Fact]

+ 42 - 42
UnitTests/Views/MenuBarTests.cs

@@ -368,7 +368,7 @@ public class MenuBarTests
         Application.Begin (top);
         ((FakeDriver)Application.Driver).SetBufferSize (40, 15);
 
-        Assert.Equal (new Rect (0, 0, 40, 15), win.Frame);
+        Assert.Equal (new Rectangle (0, 0, 40, 15), win.Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -469,7 +469,7 @@ public class MenuBarTests
 
         RunState rs = Application.Begin (dialog);
 
-        Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
+        Assert.Equal (new Rectangle (2, 2, 15, 4), dialog.Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -598,7 +598,7 @@ public class MenuBarTests
     {
         ((FakeDriver)Application.Driver).SetBufferSize (40, 15);
 
-        Assert.Equal (new Rect (0, 0, 40, 15), Application.Driver.Clip);
+        Assert.Equal (new Rectangle (0, 0, 40, 15), Application.Driver.Clip);
         TestHelpers.AssertDriverContentsWithFrameAre (@"", _output);
 
         List<string> items = new ()
@@ -680,7 +680,7 @@ public class MenuBarTests
 
         RunState rs = Application.Begin (dialog);
 
-        Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
+        Assert.Equal (new Rectangle (2, 2, 15, 4), dialog.Frame);
 
         TestHelpers.AssertDriverContentsWithFrameAre (
                                                       @"
@@ -797,11 +797,11 @@ public class MenuBarTests
 ──────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 7, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 7, 4), pos);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (-1, -2, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (-1, -2, menu.Frame.Width, menu.Frame.Height);
         menu.OpenMenu ();
         Application.Refresh ();
 
@@ -812,10 +812,10 @@ public class MenuBarTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 7, 3), pos);
+        Assert.Equal (new Rectangle (1, 0, 7, 3), pos);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (0, 0, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (0, 0, menu.Frame.Width, menu.Frame.Height);
         ((FakeDriver)Application.Driver).SetBufferSize (7, 5);
         menu.OpenMenu ();
         Application.Refresh ();
@@ -828,10 +828,10 @@ public class MenuBarTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 1, 7, 4), pos);
+        Assert.Equal (new Rectangle (0, 1, 7, 4), pos);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (0, 0, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (0, 0, menu.Frame.Width, menu.Frame.Height);
         ((FakeDriver)Application.Driver).SetBufferSize (7, 3);
         menu.OpenMenu ();
         Application.Refresh ();
@@ -843,7 +843,7 @@ public class MenuBarTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 7, 3), pos);
+        Assert.Equal (new Rectangle (0, 0, 7, 3), pos);
     }
 
     [Fact]
@@ -874,7 +874,7 @@ wo
         _ = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (-2, -2, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (-2, -2, menu.Frame.Width, menu.Frame.Height);
         menu.OpenMenu ();
         Application.Refresh ();
 
@@ -885,7 +885,7 @@ wo
         _ = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (0, 0, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (0, 0, menu.Frame.Width, menu.Frame.Height);
         ((FakeDriver)Application.Driver).SetBufferSize (3, 2);
         menu.OpenMenu ();
         Application.Refresh ();
@@ -898,7 +898,7 @@ wo
         _ = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         menu.CloseAllMenus ();
-        menu.Frame = new Rect (0, 0, menu.Frame.Width, menu.Frame.Height);
+        menu.Frame = new Rectangle (0, 0, menu.Frame.Width, menu.Frame.Height);
         ((FakeDriver)Application.Driver).SetBufferSize (3, 1);
         menu.OpenMenu ();
         Application.Refresh ();
@@ -934,8 +934,8 @@ wo
 └──────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 1, 8, 4), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 1, 8, 4), pos);
     }
 
     [Fact]
@@ -2855,7 +2855,7 @@ Edit
  Numbers
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
 
         Assert.True (menu.NewKeyDownEvent (menu.Key));
         Application.Top.Draw ();
@@ -2957,8 +2957,8 @@ Edit
  Numbers
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
 
         Assert.True (
                      menu.MouseEvent (
@@ -2977,7 +2977,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3000,7 +3000,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 25, 7), pos);
+        Assert.Equal (new Rectangle (1, 0, 25, 7), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3022,7 +3022,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3036,7 +3036,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
     }
 
     [Fact]
@@ -3154,8 +3154,8 @@ Edit
  Numbers
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
 
         Assert.True (menu.NewKeyDownEvent (menu.Key));
         Application.Top.Draw ();
@@ -3170,7 +3170,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.True (Application.Top.Subviews [1].NewKeyDownEvent (new Key (KeyCode.CursorDown)));
         Assert.True (Application.Top.Subviews [1].NewKeyDownEvent (new Key (KeyCode.Enter)));
@@ -3187,7 +3187,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 15, 7), pos);
+        Assert.Equal (new Rectangle (1, 0, 15, 7), pos);
 
         Assert.True (Application.Top.Subviews [2].NewKeyDownEvent (new Key (KeyCode.Enter)));
         Application.Top.Draw ();
@@ -3202,7 +3202,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.True (Application.Top.Subviews [1].NewKeyDownEvent (new Key (KeyCode.Esc)));
         Application.Top.Draw ();
@@ -3212,7 +3212,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
     }
 
     [Fact]
@@ -3264,8 +3264,8 @@ Edit
  Numbers
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
 
         Assert.True (
                      menu.MouseEvent (
@@ -3284,7 +3284,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3304,7 +3304,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 15, 7), pos);
+        Assert.Equal (new Rectangle (1, 0, 15, 7), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3323,7 +3323,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 10, 6), pos);
+        Assert.Equal (new Rectangle (1, 0, 10, 6), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3337,7 +3337,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
     }
 
     [Fact]
@@ -3458,8 +3458,8 @@ Edit
  Numbers
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
 
         Assert.True (
                      menu.MouseEvent (
@@ -3476,7 +3476,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 4), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 4), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3494,7 +3494,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 13, 5), pos);
+        Assert.Equal (new Rectangle (1, 0, 13, 5), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3511,7 +3511,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 4), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 4), pos);
 
         Assert.False (
                       menu.MouseEvent (
@@ -3525,7 +3525,7 @@ Edit
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 0, 8, 1), pos);
+        Assert.Equal (new Rectangle (1, 0, 8, 1), pos);
     }
 
     [Fact]

+ 8 - 8
UnitTests/Views/RadioGroupTests.cs

@@ -13,13 +13,13 @@ public class RadioGroupTests
         var rg = new RadioGroup ();
         Assert.True (rg.CanFocus);
         Assert.Empty (rg.RadioLabels);
-        Assert.Equal (Rect.Empty, rg.Frame);
+        Assert.Equal (Rectangle.Empty, rg.Frame);
         Assert.Equal (0, rg.SelectedItem);
 
         rg = new RadioGroup { RadioLabels = new [] { "Test" } };
         Assert.True (rg.CanFocus);
         Assert.Single (rg.RadioLabels);
-        Assert.Equal (new Rect (0, 0, 0, 0), rg.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), rg.Frame);
         Assert.Equal (0, rg.SelectedItem);
 
         rg = new RadioGroup
@@ -32,7 +32,7 @@ public class RadioGroupTests
         };
         Assert.True (rg.CanFocus);
         Assert.Single (rg.RadioLabels);
-        Assert.Equal (new Rect (1, 2, 20, 5), rg.Frame);
+        Assert.Equal (new Rectangle (1, 2, 20, 5), rg.Frame);
         Assert.Equal (0, rg.SelectedItem);
 
         rg = new RadioGroup { X = 1, Y = 2, RadioLabels = new [] { "Test" } };
@@ -45,7 +45,7 @@ public class RadioGroupTests
 
         Assert.True (rg.CanFocus);
         Assert.Single (rg.RadioLabels);
-        Assert.Equal (new Rect (1, 2, 6, 1), rg.Frame);
+        Assert.Equal (new Rectangle (1, 2, 6, 1), rg.Frame);
         Assert.Equal (0, rg.SelectedItem);
     }
 
@@ -164,8 +164,8 @@ public class RadioGroupTests
 └────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         rg.Orientation = Orientation.Horizontal;
         Application.Refresh ();
@@ -190,7 +190,7 @@ public class RadioGroupTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
 
         rg.HorizontalSpace = 4;
         Application.Refresh ();
@@ -215,7 +215,7 @@ public class RadioGroupTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 30, 5), pos);
+        Assert.Equal (new Rectangle (0, 0, 30, 5), pos);
     }
 
     [Fact]

+ 5 - 5
UnitTests/Views/ScrollBarViewTests.cs

@@ -857,8 +857,8 @@ This is a test
 └───────────────────────────────────────────┘
 ";
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 45, 20), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (0, 0, 45, 20), pos);
 
         textView.WordWrap = true;
         ((FakeDriver)Application.Driver).SetBufferSize (26, 20);
@@ -896,7 +896,7 @@ This is a test
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 26, 20), pos);
+        Assert.Equal (new Rectangle (0, 0, 26, 20), pos);
 
         ((FakeDriver)Application.Driver).SetBufferSize (10, 10);
         Application.Refresh ();
@@ -924,7 +924,7 @@ This is a test
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (0, 0, 10, 10), pos);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), pos);
     }
 
     [Fact]
@@ -960,7 +960,7 @@ This is a test
     public void Internal_Tests ()
     {
         Toplevel top = Application.Top;
-        Assert.Equal (new Rect (0, 0, 80, 25), top.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 80, 25), top.Bounds);
         var view = new View { Width = Dim.Fill (), Height = Dim.Fill () };
         top.Add (view);
         var sbv = new ScrollBarView (view, true);

+ 21 - 21
UnitTests/Views/ScrollViewTests.cs

@@ -34,7 +34,7 @@ public class ScrollViewTests
         Application.Top.Add (sv);
         Application.Begin (Application.Top);
 
-        Assert.Equal (new Rect (0, 0, 10, 10), sv.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), sv.Bounds);
 
         Assert.False (sv.AutoHideScrollBars);
         Assert.True (sv.ShowHorizontalScrollIndicator);
@@ -58,9 +58,9 @@ public class ScrollViewTests
                                             );
 
         sv.ShowHorizontalScrollIndicator = false;
-        Assert.Equal (new Rect (0, 0, 10, 10), sv.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), sv.Bounds);
         sv.ShowVerticalScrollIndicator = true;
-        Assert.Equal (new Rect (0, 0, 10, 10), sv.Bounds);
+        Assert.Equal (new Rectangle (0, 0, 10, 10), sv.Bounds);
 
         Assert.False (sv.AutoHideScrollBars);
         Assert.False (sv.ShowHorizontalScrollIndicator);
@@ -339,8 +339,8 @@ public class ScrollViewTests
         var sv = new ScrollView ();
         Assert.Equal (LayoutStyle.Absolute, sv.LayoutStyle);
         Assert.True (sv.CanFocus);
-        Assert.Equal (new Rect (0, 0, 0, 0), sv.Frame);
-        Assert.Equal (Rect.Empty, sv.Frame);
+        Assert.Equal (new Rectangle (0, 0, 0, 0), sv.Frame);
+        Assert.Equal (Rectangle.Empty, sv.Frame);
         Assert.Equal (Point.Empty, sv.ContentOffset);
         Assert.Equal (Size.Empty, sv.ContentSize);
         Assert.True (sv.AutoHideScrollBars);
@@ -349,7 +349,7 @@ public class ScrollViewTests
         sv = new ScrollView { X = 1, Y = 2, Width = 20, Height = 10 };
         Assert.Equal (LayoutStyle.Absolute, sv.LayoutStyle);
         Assert.True (sv.CanFocus);
-        Assert.Equal (new Rect (1, 2, 20, 10), sv.Frame);
+        Assert.Equal (new Rectangle (1, 2, 20, 10), sv.Frame);
         Assert.Equal (Point.Empty, sv.ContentOffset);
         Assert.Equal (Size.Empty, sv.ContentSize);
         Assert.True (sv.AutoHideScrollBars);
@@ -511,7 +511,7 @@ public class ScrollViewTests
     {
         var rule = "0123456789";
         var size = new Size (40, 40);
-        var view = new View { Frame = new Rect (Point.Empty, size) };
+        var view = new View { Frame = new Rectangle (Point.Empty, size) };
 
         view.Add (
                   new Label
@@ -566,8 +566,8 @@ public class ScrollViewTests
 "
             ;
 
-        Rect pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Rectangle pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -591,7 +591,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -615,7 +615,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -639,7 +639,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -663,7 +663,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -687,7 +687,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -711,7 +711,7 @@ public class ScrollViewTests
             ;
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorRight)));
         Application.Top.Draw ();
@@ -734,7 +734,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CtrlMask | KeyCode.End)));
         Application.Top.Draw ();
@@ -757,7 +757,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CtrlMask | KeyCode.Home)));
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorDown)));
@@ -781,7 +781,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorDown)));
         Application.Top.Draw ();
@@ -804,7 +804,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.CursorDown)));
         Application.Top.Draw ();
@@ -827,7 +827,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
 
         Assert.True (scrollView.OnKeyDown (new Key (KeyCode.End)));
         Application.Top.Draw ();
@@ -850,7 +850,7 @@ public class ScrollViewTests
 ";
 
         pos = TestHelpers.AssertDriverContentsWithFrameAre (expected, _output);
-        Assert.Equal (new Rect (1, 1, 21, 14), pos);
+        Assert.Equal (new Rectangle (1, 1, 21, 14), pos);
     }
 
     // There still have an issue with lower right corner of the scroll view

+ 52 - 52
UnitTests/Views/TableViewTests.cs

@@ -125,7 +125,7 @@ public class TableViewTests
         // create a 4 by 4 table
         var tableView = new TableView
         {
-            Table = BuildTable (4, 4, out DataTable dt), MultiSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (4, 4, out DataTable dt), MultiSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -152,7 +152,7 @@ public class TableViewTests
         // create a 4 by 4 table
         var tableView = new TableView
         {
-            Table = BuildTable (4, 4, out DataTable dt), MultiSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (4, 4, out DataTable dt), MultiSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -161,7 +161,7 @@ public class TableViewTests
 
         // select the last row
         tableView.MultiSelectedRegions.Clear ();
-        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (0, 3), new Rect (0, 3, 4, 1)));
+        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (0, 3), new Rectangle (0, 3, 4, 1)));
 
         Assert.Equal (4, tableView.GetAllSelectedCells ().Count ());
 
@@ -180,7 +180,7 @@ public class TableViewTests
         var tableView = new TableView ();
         tableView.BeginInit ();
         tableView.EndInit ();
-        tableView.Bounds = new Rect (0, 0, 25, 10);
+        tableView.Bounds = new Rectangle (0, 0, 25, 10);
 
         Assert.Equal (0, tableView.RowOffset);
         Assert.Equal (0, tableView.ColumnOffset);
@@ -237,7 +237,7 @@ public class TableViewTests
     {
         var tableView = new TableView
         {
-            Table = BuildTable (3, 3), MultiSelect = multiSelect, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (3, 3), MultiSelect = multiSelect, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -253,7 +253,7 @@ public class TableViewTests
     {
         var tableView = new TableView
         {
-            Table = BuildTable (3, 3), MultiSelect = true, FullRowSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (3, 3), MultiSelect = true, FullRowSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -280,7 +280,7 @@ public class TableViewTests
     {
         var tableView = new TableView
         {
-            Table = BuildTable (3, 3), MultiSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (3, 3), MultiSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -305,7 +305,7 @@ public class TableViewTests
     {
         var tableView = new TableView
         {
-            Table = BuildTable (20, 20), MultiSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (20, 20), MultiSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
         tableView.BeginInit ();
         tableView.EndInit ();
@@ -321,8 +321,8 @@ public class TableViewTests
         */
 
         tableView.MultiSelectedRegions.Clear ();
-        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (1, 1), new Rect (1, 1, 2, 2)));
-        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (7, 3), new Rect (7, 3, 2, 1)));
+        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (1, 1), new Rectangle (1, 1, 2, 2)));
+        tableView.MultiSelectedRegions.Push (new TableSelection (new Point (7, 3), new Rectangle (7, 3, 2, 1)));
 
         tableView.SelectedColumn = 8;
         tableView.SelectedRow = 3;
@@ -423,7 +423,7 @@ public class TableViewTests
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 25 characters can be printed into table
-        tableView.Bounds = new Rect (0, 0, 25, 5);
+        tableView.Bounds = new Rectangle (0, 0, 25, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = true;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -524,7 +524,7 @@ public class TableViewTests
         var driver = (FakeDriver)Application.Driver;
         driver.ClearContents ();
 
-        tableView.Bounds = new Rect (0, 0, 9, 5);
+        tableView.Bounds = new Rectangle (0, 0, 9, 5);
         tableView.LayoutSubviews ();
         tableView.Draw ();
 
@@ -541,7 +541,7 @@ public class TableViewTests
         // setting width to 10 leaves just enough space for the column to
         // meet MinAcceptableWidth of 5.  Column width includes terminator line
         // symbol (e.g. ┤ or │)
-        tableView.Bounds = new Rect (0, 0, 10, 5);
+        tableView.Bounds = new Rectangle (0, 0, 10, 5);
         tableView.LayoutSubviews ();
         tableView.Draw ();
 
@@ -554,7 +554,7 @@ public class TableViewTests
 ";
         TestHelpers.AssertDriverContentsAre (expected, output);
 
-        tableView.Bounds = new Rect (0, 0, 25, 5);
+        tableView.Bounds = new Rectangle (0, 0, 25, 5);
 
         // revert style change
         style.MinAcceptableWidth = TableView.DefaultMinAcceptableWidth;
@@ -601,7 +601,7 @@ public class TableViewTests
     {
         var tableView = new TableView
         {
-            Table = BuildTable (25, 50), MultiSelect = true, Bounds = new Rect (0, 0, 10, 5)
+            Table = BuildTable (25, 50), MultiSelect = true, Bounds = new Rectangle (0, 0, 10, 5)
         };
 
         // Header should take up 2 lines
@@ -637,7 +637,7 @@ public class TableViewTests
     {
         var tableView = new TableView ();
         tableView.ColorScheme = new ColorScheme ();
-        tableView.Bounds = new Rect (0, 0, 25, 10);
+        tableView.Bounds = new Rectangle (0, 0, 25, 10);
 
         // Set a table with 1 column
         tableView.Table = BuildTable (1, 50, out DataTable dt);
@@ -659,7 +659,7 @@ public class TableViewTests
         tableView.Table = BuildTable (25, 50);
 
         // 1 header + 4 rows visible
-        tableView.Bounds = new Rect (0, 0, 25, 5);
+        tableView.Bounds = new Rectangle (0, 0, 25, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = false;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -686,7 +686,7 @@ public class TableViewTests
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visibile
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = true;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -764,7 +764,7 @@ public class TableViewTests
         tableView.LayoutSubviews ();
 
         // 3 columns are visibile
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = false;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -827,7 +827,7 @@ public class TableViewTests
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visibile
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = false;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -944,7 +944,7 @@ public class TableViewTests
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visibile
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = true;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -975,7 +975,7 @@ public class TableViewTests
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visibile
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = true;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -1044,7 +1044,7 @@ public class TableViewTests
         tv.LayoutSubviews ();
 
         // width exactly matches the max col widths
-        tv.Bounds = new Rect (0, 0, 5, 4);
+        tv.Bounds = new Rectangle (0, 0, 5, 4);
 
         // Create a style for column B
         ColumnStyle bStyle = tv.Style.GetOrCreateColumnStyle (1);
@@ -1141,7 +1141,7 @@ public class TableViewTests
         tv.LayoutSubviews ();
 
         // width exactly matches the max col widths
-        tv.Bounds = new Rect (0, 0, 5, 4);
+        tv.Bounds = new Rectangle (0, 0, 5, 4);
 
         var rowHighlight = new ColorScheme
         {
@@ -1235,7 +1235,7 @@ public class TableViewTests
         tv.LayoutSubviews ();
 
         // width exactly matches the max col widths
-        tv.Bounds = new Rect (0, 0, 5, 4);
+        tv.Bounds = new Rectangle (0, 0, 5, 4);
 
         // private method for forcing the view to be focused/not focused
         MethodInfo setFocusMethod =
@@ -1282,7 +1282,7 @@ public class TableViewTests
         tv.LayoutSubviews ();
 
         // width exactly matches the max col widths
-        tv.Bounds = new Rect (0, 0, 5, 4);
+        tv.Bounds = new Rectangle (0, 0, 5, 4);
 
         // private method for forcing the view to be focused/not focused
         MethodInfo setFocusMethod =
@@ -1354,7 +1354,7 @@ public class TableViewTests
         tv.Style.ExpandLastColumn = false;
 
         // width exactly matches the max col widths
-        tv.Bounds = new Rect (0, 0, 5, 4);
+        tv.Bounds = new Rectangle (0, 0, 5, 4);
 
         tv.Draw ();
 
@@ -1398,7 +1398,7 @@ public class TableViewTests
     public void TableView_ShowHeadersFalse_AllLines ()
     {
         TableView tv = GetABCDEFTableView (out _);
-        tv.Bounds = new Rect (0, 0, 5, 5);
+        tv.Bounds = new Rectangle (0, 0, 5, 5);
 
         tv.Style.ShowHeaders = false;
         tv.Style.ShowHorizontalHeaderOverline = true;
@@ -1422,7 +1422,7 @@ public class TableViewTests
     public void TableView_ShowHeadersFalse_AndNoHeaderLines ()
     {
         TableView tv = GetABCDEFTableView (out _);
-        tv.Bounds = new Rect (0, 0, 5, 5);
+        tv.Bounds = new Rectangle (0, 0, 5, 5);
 
         tv.Style.ShowHeaders = false;
         tv.Style.ShowHorizontalHeaderOverline = false;
@@ -1441,7 +1441,7 @@ public class TableViewTests
     public void TableView_ShowHeadersFalse_OverlineTrue ()
     {
         TableView tv = GetABCDEFTableView (out _);
-        tv.Bounds = new Rect (0, 0, 5, 5);
+        tv.Bounds = new Rectangle (0, 0, 5, 5);
 
         tv.Style.ShowHeaders = false;
         tv.Style.ShowHorizontalHeaderOverline = true;
@@ -1461,7 +1461,7 @@ public class TableViewTests
     public void TableView_ShowHeadersFalse_UnderlineTrue ()
     {
         TableView tv = GetABCDEFTableView (out _);
-        tv.Bounds = new Rect (0, 0, 5, 5);
+        tv.Bounds = new Rectangle (0, 0, 5, 5);
 
         tv.Style.ShowHeaders = false;
         tv.Style.ShowHorizontalHeaderOverline = false;
@@ -1492,13 +1492,13 @@ public class TableViewTests
         tv.NewKeyDownEvent (new Key (KeyCode.CursorRight | KeyCode.ShiftMask));
         tv.NewKeyDownEvent (new Key (KeyCode.CursorDown | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rectangle);
 
         // this next moves should be ignored because we already selected the whole table
         tv.NewKeyDownEvent (new Key (KeyCode.CursorRight | KeyCode.ShiftMask));
         tv.NewKeyDownEvent (new Key (KeyCode.CursorDown | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rectangle);
         Assert.Equal (1, tv.SelectedColumn);
         Assert.Equal (1, tv.SelectedRow);
 
@@ -1517,12 +1517,12 @@ public class TableViewTests
         tv.SelectedRow = 1;
         tv.NewKeyDownEvent (new Key (KeyCode.CursorLeft | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rectangle);
 
         // this next shift left should be ignored because we are already at the bounds
         tv.NewKeyDownEvent (new Key (KeyCode.CursorLeft | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rectangle);
 
         Assert.Equal (0, tv.SelectedColumn);
         Assert.Equal (1, tv.SelectedRow);
@@ -1542,12 +1542,12 @@ public class TableViewTests
         tv.SelectedRow = 1;
         tv.NewKeyDownEvent (new Key (KeyCode.CursorRight | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rectangle);
 
         // this next shift right should be ignored because we are already at the right bounds
         tv.NewKeyDownEvent (new Key (KeyCode.CursorRight | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 1, 2, 1), tv.MultiSelectedRegions.Single ().Rectangle);
 
         Assert.Equal (1, tv.SelectedColumn);
         Assert.Equal (1, tv.SelectedRow);
@@ -1569,13 +1569,13 @@ public class TableViewTests
         tv.NewKeyDownEvent (new Key (KeyCode.CursorLeft | KeyCode.ShiftMask));
         tv.NewKeyDownEvent (new Key (KeyCode.CursorUp | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rectangle);
 
         // this next moves should be ignored because we already selected the whole table
         tv.NewKeyDownEvent (new Key (KeyCode.CursorLeft | KeyCode.ShiftMask));
         tv.NewKeyDownEvent (new Key (KeyCode.CursorUp | KeyCode.ShiftMask));
 
-        Assert.Equal (new Rect (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rect);
+        Assert.Equal (new Rectangle (0, 0, 2, 2), tv.MultiSelectedRegions.Single ().Rectangle);
         Assert.Equal (0, tv.SelectedColumn);
         Assert.Equal (0, tv.SelectedRow);
 
@@ -1588,7 +1588,7 @@ public class TableViewTests
     {
         var tv = new TableView ();
         tv.ColorScheme = Colors.ColorSchemes ["TopLevel"];
-        tv.Bounds = new Rect (0, 0, 50, 7);
+        tv.Bounds = new Rectangle (0, 0, 50, 7);
 
         tv.Table = new EnumerableTableSource<string> (
                                                       new [] { "fish", "troll", "trap", "zoo" },
@@ -2134,7 +2134,7 @@ public class TableViewTests
         tableView.MultiSelectedRegions.Push (
                                              new TableSelection (
                                                                  new Point (0, 0),
-                                                                 new Rect (0, 0, 3, 1)
+                                                                 new Rectangle (0, 0, 3, 1)
                                                                 )
                                             );
 
@@ -2219,7 +2219,7 @@ public class TableViewTests
     {
         var tv = new TableView ();
         tv.ColorScheme = Colors.ColorSchemes ["TopLevel"];
-        tv.Bounds = new Rect (0, 0, 50, 6);
+        tv.Bounds = new Rectangle (0, 0, 50, 6);
 
         tv.Table = new EnumerableTableSource<Type> (
                                                     new [] { typeof (string), typeof (int), typeof (float) },
@@ -2253,8 +2253,8 @@ public class TableViewTests
         TableView tv = GetTwoRowSixColumnTable (out DataTable dt);
         dt.Rows.Add (1, 2, 3, 4, 5, 6);
 
-        tv.Bounds = new Rect (0, 0, 7, 6);
-        tv.Frame = new Rect (0, 0, 7, 6);
+        tv.Bounds = new Rectangle (0, 0, 7, 6);
+        tv.Frame = new Rectangle (0, 0, 7, 6);
         tv.LayoutSubviews ();
 
         tv.FullRowSelect = true;
@@ -2310,7 +2310,7 @@ public class TableViewTests
         dt.Rows.Add (1, 2, 3, 4, 5, 6);
         tv.LayoutSubviews ();
 
-        tv.Bounds = new Rect (0, 0, 7, 6);
+        tv.Bounds = new Rectangle (0, 0, 7, 6);
 
         tv.FullRowSelect = true;
         tv.Style.ShowVerticalCellLines = false;
@@ -2362,8 +2362,8 @@ A B C
         TableView tv = GetTwoRowSixColumnTable (out DataTable dt);
         dt.Rows.Add (1, 2, 3, 4, 5, 6);
 
-        tv.Bounds = new Rect (0, 0, 7, 6);
-        tv.Frame = new Rect (0, 0, 7, 6);
+        tv.Bounds = new Rectangle (0, 0, 7, 6);
+        tv.Frame = new Rectangle (0, 0, 7, 6);
         tv.LayoutSubviews ();
 
         tv.FullRowSelect = true;
@@ -2425,7 +2425,7 @@ A B C
 
         //tv.BeginInit (); tv.EndInit ();
         tv.ColorScheme = Colors.ColorSchemes ["TopLevel"];
-        tv.Bounds = new Rect (0, 0, 25, 4);
+        tv.Bounds = new Rectangle (0, 0, 25, 4);
 
         tv.Style = new TableStyle
         {
@@ -3196,7 +3196,7 @@ A B C
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visible
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = false;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -3220,7 +3220,7 @@ A B C
     {
         var tv = new TableView ();
         tv.ColorScheme = Colors.ColorSchemes ["TopLevel"];
-        tv.Bounds = new Rect (0, 0, 25, 6);
+        tv.Bounds = new Rectangle (0, 0, 25, 6);
 
         List<PickablePet> pets = new ()
         {
@@ -3250,7 +3250,7 @@ A B C
         tableView.ColorScheme = Colors.ColorSchemes ["TopLevel"];
 
         // 3 columns are visible
-        tableView.Bounds = new Rect (0, 0, 7, 5);
+        tableView.Bounds = new Rectangle (0, 0, 7, 5);
         tableView.Style.ShowHorizontalHeaderUnderline = true;
         tableView.Style.ShowHorizontalHeaderOverline = false;
         tableView.Style.AlwaysShowHeaders = true;
@@ -3279,7 +3279,7 @@ A B C
         var tv = new TableView ();
         tv.BeginInit ();
         tv.EndInit ();
-        tv.Bounds = new Rect (0, 0, 10, 4);
+        tv.Bounds = new Rectangle (0, 0, 10, 4);
 
         dt = new DataTable ();
         dt.Columns.Add ("A");

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно