Done requested changes.

This commit is contained in:
BDisp
2023-04-03 15:50:41 +01:00
parent 5cdf14eccc
commit 75eca476d9
2 changed files with 17 additions and 14 deletions

View File

@@ -3160,14 +3160,17 @@ namespace Terminal.Gui {
}
/// <summary>
/// Finds which view that belong to the <paramref name="start"/> at the provided location.
/// Finds which view that belong to the <paramref name="start"/> superview at the provided location.
/// </summary>
/// <param name="start">The view where to look for.</param>
/// <param name="x">The column location.</param>
/// <param name="y">The row location.</param>
/// <param name="resx">The found view column location.</param>
/// <param name="resy">The found view row location.</param>
/// <returns>The view that belong to the provided location.</returns>
/// <param name="start">The superview where to look for.</param>
/// <param name="x">The column location in the superview.</param>
/// <param name="y">The row location in the superview.</param>
/// <param name="resx">The found view screen relative column location.</param>
/// <param name="resy">The found view screen relative row location.</param>
/// <returns>
/// The view that was found at the <praramref name="x"/> and <praramref name="y"/> coordinates.
/// <see langword="null"/> if no view was found.
/// </returns>
public static View FindDeepestView (View start, int x, int y, out int resx, out int resy)
{
var startFrame = start.Frame;

View File

@@ -907,14 +907,14 @@ namespace Terminal.Gui.MenuTests {
public void Draw_A_ContextManu_Over_A_Dialog ()
{
var top = Application.Top;
var win = new Window ("Window");
var win = new Window ();
top.Add (win);
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (20, 15);
Assert.Equal (new Rect (0, 0, 20, 15), win.Frame);
TestHelpers.AssertDriverContentsWithFrameAre (@"
Window ──────────┐
──────────────────┐
│ │
│ │
│ │
@@ -930,15 +930,15 @@ namespace Terminal.Gui.MenuTests {
│ │
└──────────────────┘", output);
var dialog = new Dialog ("Dialog") { X = 2, Y = 2, Width = 15, Height = 4 };
var dialog = new Dialog () { X = 2, Y = 2, Width = 15, Height = 4 };
dialog.Add (new TextField ("Test") { X = Pos.Center (), Width = 10 });
var rs = Application.Begin (dialog);
Assert.Equal (new Rect (2, 2, 15, 4), dialog.Frame);
TestHelpers.AssertDriverContentsWithFrameAre (@"
Window ──────────┐
──────────────────┐
│ │
│ ┌ Dialog ─────┐ │
│ ┌─────────────┐ │
│ │ Test │ │
│ │ │ │
│ └─────────────┘ │
@@ -964,9 +964,9 @@ namespace Terminal.Gui.MenuTests {
var firstIteration = false;
Application.RunMainLoopIteration (ref rs, true, ref firstIteration);
TestHelpers.AssertDriverContentsWithFrameAre (@"
Window ──────────┐
──────────────────┐
│ │
│ ┌ Dialog ─────┐ │
│ ┌─────────────┐ │
│ │ Test │ │
┌───────────────────
│ Select All Ctrl+