|
@@ -1033,137 +1033,137 @@ namespace Terminal.Gui.ViewsTests {
|
|
}
|
|
}
|
|
|
|
|
|
// BUGBUG: Broke this test with #2483 - @bdisp I need your help figuring out why
|
|
// BUGBUG: Broke this test with #2483 - @bdisp I need your help figuring out why
|
|
- //[Fact, AutoInitShutdown]
|
|
|
|
- //public void Toplevel_Inside_ScrollView_MouseGrabView ()
|
|
|
|
- //{
|
|
|
|
- // var scrollView = new ScrollView () {
|
|
|
|
- // X = 3,
|
|
|
|
- // Y = 3,
|
|
|
|
- // Width = 40,
|
|
|
|
- // Height = 16,
|
|
|
|
- // ContentSize = new Size (200, 100)
|
|
|
|
- // };
|
|
|
|
- // var win = new Window () { X = 3, Y = 3, Width = Dim.Fill (3), Height = Dim.Fill (3) };
|
|
|
|
- // scrollView.Add (win);
|
|
|
|
- // var top = Application.Top;
|
|
|
|
- // top.Add (scrollView);
|
|
|
|
- // Application.Begin (top);
|
|
|
|
-
|
|
|
|
- // Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
|
|
|
|
- // Assert.Equal (new Rect (3, 3, 40, 16), scrollView.Frame);
|
|
|
|
- // Assert.Equal (new Rect (0, 0, 200, 100), scrollView.Subviews [0].Frame);
|
|
|
|
- // Assert.Equal (new Rect (3, 3, 194, 94), win.Frame);
|
|
|
|
- // TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
- // ▲
|
|
|
|
- // ┬
|
|
|
|
- // │
|
|
|
|
- // ┌───────────────────────────────────┴
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ▼
|
|
|
|
- // ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
-
|
|
|
|
- // ReflectionTools.InvokePrivate (
|
|
|
|
- // typeof (Application),
|
|
|
|
- // "ProcessMouseEvent",
|
|
|
|
- // new MouseEvent () {
|
|
|
|
- // X = 6,
|
|
|
|
- // Y = 6,
|
|
|
|
- // Flags = MouseFlags.Button1Pressed
|
|
|
|
- // });
|
|
|
|
- // Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
- // Assert.Equal (new Rect (3, 3, 194, 94), win.Frame);
|
|
|
|
-
|
|
|
|
- // ReflectionTools.InvokePrivate (
|
|
|
|
- // typeof (Application),
|
|
|
|
- // "ProcessMouseEvent",
|
|
|
|
- // new MouseEvent () {
|
|
|
|
- // X = 9,
|
|
|
|
- // Y = 9,
|
|
|
|
- // Flags = MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition
|
|
|
|
- // });
|
|
|
|
- // Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
- // top.SetNeedsLayout ();
|
|
|
|
- // top.LayoutSubviews ();
|
|
|
|
- // Assert.Equal (new Rect (6, 6, 191, 91), win.Frame);
|
|
|
|
- // Application.Refresh ();
|
|
|
|
- // TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
- // ▲
|
|
|
|
- // ┬
|
|
|
|
- // │
|
|
|
|
- // ┴
|
|
|
|
- // ░
|
|
|
|
- // ░
|
|
|
|
- // ┌────────────────────────────────░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ▼
|
|
|
|
- // ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
-
|
|
|
|
- // ReflectionTools.InvokePrivate (
|
|
|
|
- // typeof (Application),
|
|
|
|
- // "ProcessMouseEvent",
|
|
|
|
- // new MouseEvent () {
|
|
|
|
- // X = 5,
|
|
|
|
- // Y = 5,
|
|
|
|
- // Flags = MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition
|
|
|
|
- // });
|
|
|
|
- // Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
- // top.SetNeedsLayout ();
|
|
|
|
- // top.LayoutSubviews ();
|
|
|
|
- // Assert.Equal (new Rect (2, 2, 195, 95), win.Frame);
|
|
|
|
- // Application.Refresh ();
|
|
|
|
- // TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
- // ▲
|
|
|
|
- // ┬
|
|
|
|
- // ┌────────────────────────────────────│
|
|
|
|
- // │ ┴
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ░
|
|
|
|
- // │ ▼
|
|
|
|
- // ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
-
|
|
|
|
- // ReflectionTools.InvokePrivate (
|
|
|
|
- // typeof (Application),
|
|
|
|
- // "ProcessMouseEvent",
|
|
|
|
- // new MouseEvent () {
|
|
|
|
- // X = 5,
|
|
|
|
- // Y = 5,
|
|
|
|
- // Flags = MouseFlags.Button1Released
|
|
|
|
- // });
|
|
|
|
- // Assert.Null (Application.MouseGrabView);
|
|
|
|
-
|
|
|
|
- // ReflectionTools.InvokePrivate (
|
|
|
|
- // typeof (Application),
|
|
|
|
- // "ProcessMouseEvent",
|
|
|
|
- // new MouseEvent () {
|
|
|
|
- // X = 4,
|
|
|
|
- // Y = 4,
|
|
|
|
- // Flags = MouseFlags.ReportMousePosition
|
|
|
|
- // });
|
|
|
|
- // Assert.Equal (scrollView, Application.MouseGrabView);
|
|
|
|
- //}
|
|
|
|
|
|
+ [Fact, AutoInitShutdown]
|
|
|
|
+ public void Toplevel_Inside_ScrollView_MouseGrabView ()
|
|
|
|
+ {
|
|
|
|
+ var scrollView = new ScrollView () {
|
|
|
|
+ X = 3,
|
|
|
|
+ Y = 3,
|
|
|
|
+ Width = 40,
|
|
|
|
+ Height = 16,
|
|
|
|
+ ContentSize = new Size (200, 100)
|
|
|
|
+ };
|
|
|
|
+ var win = new Window () { X = 3, Y = 3, Width = Dim.Fill (3), Height = Dim.Fill (3) };
|
|
|
|
+ scrollView.Add (win);
|
|
|
|
+ var top = Application.Top;
|
|
|
|
+ top.Add (scrollView);
|
|
|
|
+ Application.Begin (top);
|
|
|
|
+
|
|
|
|
+ Assert.Equal (new Rect (0, 0, 80, 25), top.Frame);
|
|
|
|
+ Assert.Equal (new Rect (3, 3, 40, 16), scrollView.Frame);
|
|
|
|
+ Assert.Equal (new Rect (0, 0, 200, 100), scrollView.Subviews [0].Frame);
|
|
|
|
+ Assert.Equal (new Rect (3, 3, 194, 94), win.Frame);
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+ ▲
|
|
|
|
+ ┬
|
|
|
|
+ │
|
|
|
|
+ ┌───────────────────────────────────┴
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ▼
|
|
|
|
+ ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 6,
|
|
|
|
+ Y = 6,
|
|
|
|
+ Flags = MouseFlags.Button1Pressed
|
|
|
|
+ });
|
|
|
|
+ Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
+ Assert.Equal (new Rect (3, 3, 194, 94), win.Frame);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 9,
|
|
|
|
+ Y = 9,
|
|
|
|
+ Flags = MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition
|
|
|
|
+ });
|
|
|
|
+ Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
+ top.SetNeedsLayout ();
|
|
|
|
+ top.LayoutSubviews ();
|
|
|
|
+ Assert.Equal (new Rect (6, 6, 191, 91), win.Frame);
|
|
|
|
+ Application.Refresh ();
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+ ▲
|
|
|
|
+ ┬
|
|
|
|
+ │
|
|
|
|
+ ┴
|
|
|
|
+ ░
|
|
|
|
+ ░
|
|
|
|
+ ┌────────────────────────────────░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ▼
|
|
|
|
+ ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 5,
|
|
|
|
+ Y = 5,
|
|
|
|
+ Flags = MouseFlags.Button1Pressed | MouseFlags.ReportMousePosition
|
|
|
|
+ });
|
|
|
|
+ Assert.Equal (win, Application.MouseGrabView);
|
|
|
|
+ top.SetNeedsLayout ();
|
|
|
|
+ top.LayoutSubviews ();
|
|
|
|
+ Assert.Equal (new Rect (2, 2, 195, 95), win.Frame);
|
|
|
|
+ Application.Refresh ();
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+ ▲
|
|
|
|
+ ┬
|
|
|
|
+ ┌────────────────────────────────────│
|
|
|
|
+ │ ┴
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ░
|
|
|
|
+ │ ▼
|
|
|
|
+ ◄├──────┤░░░░░░░░░░░░░░░░░░░░░░░░░░░░░► ", output);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 5,
|
|
|
|
+ Y = 5,
|
|
|
|
+ Flags = MouseFlags.Button1Released
|
|
|
|
+ });
|
|
|
|
+ Assert.Null (Application.MouseGrabView);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 4,
|
|
|
|
+ Y = 4,
|
|
|
|
+ Flags = MouseFlags.ReportMousePosition
|
|
|
|
+ });
|
|
|
|
+ Assert.Equal (scrollView, Application.MouseGrabView);
|
|
|
|
+ }
|
|
|
|
|
|
[Fact, AutoInitShutdown]
|
|
[Fact, AutoInitShutdown]
|
|
public void Dialog_Bounds_Bigger_Than_Driver_Cols_And_Rows_Allow_Drag_Beyond_Left_Right_And_Bottom ()
|
|
public void Dialog_Bounds_Bigger_Than_Driver_Cols_And_Rows_Allow_Drag_Beyond_Left_Right_And_Bottom ()
|
|
@@ -1368,131 +1368,131 @@ namespace Terminal.Gui.ViewsTests {
|
|
|
|
|
|
Application.End (rs);
|
|
Application.End (rs);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
// BUGBUG: Broke this test with #2483 - @bdisp I need your help figuring out why
|
|
// BUGBUG: Broke this test with #2483 - @bdisp I need your help figuring out why
|
|
-// [Fact, AutoInitShutdown]
|
|
|
|
-// public void Draw_A_Top_Subview_On_A_Dialog ()
|
|
|
|
-// {
|
|
|
|
-// var top = Application.Top;
|
|
|
|
-// var win = new Window () ;
|
|
|
|
-// top.Add (win);
|
|
|
|
-// Application.Begin (top);
|
|
|
|
-// ((FakeDriver)Application.Driver).SetBufferSize (20, 20);
|
|
|
|
-
|
|
|
|
-// Assert.Equal (new Rect (0, 0, 20, 20), win.Frame);
|
|
|
|
-// TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
-//┌──────────────────┐
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//└──────────────────┘", output);
|
|
|
|
-
|
|
|
|
-// var btnPopup = new Button ("Popup");
|
|
|
|
-// btnPopup.Clicked += (s, e) => {
|
|
|
|
-// var viewToScreen = btnPopup.ViewToScreen (top.Frame);
|
|
|
|
-// var view = new View () {
|
|
|
|
-// X = 1,
|
|
|
|
-// Y = viewToScreen.Y + 1,
|
|
|
|
-// Width = 18,
|
|
|
|
-// Height = 5,
|
|
|
|
-// BorderStyle = LineStyle.Single
|
|
|
|
-// };
|
|
|
|
-// Application.Current.DrawContentComplete += Current_DrawContentComplete;
|
|
|
|
-// top.Add (view);
|
|
|
|
-
|
|
|
|
-// void Current_DrawContentComplete (object sender, DrawEventArgs e)
|
|
|
|
-// {
|
|
|
|
-// Assert.Equal (new Rect (1, 14, 18, 5), view.Frame);
|
|
|
|
-
|
|
|
|
-// var savedClip = Application.Driver.Clip;
|
|
|
|
-// Application.Driver.Clip = top.Frame;
|
|
|
|
-// view.Redraw (view.Bounds);
|
|
|
|
-// top.Move (2, 15);
|
|
|
|
-// View.Driver.AddStr ("One");
|
|
|
|
-// top.Move (2, 16);
|
|
|
|
-// View.Driver.AddStr ("Two");
|
|
|
|
-// top.Move (2, 17);
|
|
|
|
-// View.Driver.AddStr ("Three");
|
|
|
|
-// Application.Driver.Clip = savedClip;
|
|
|
|
-
|
|
|
|
-// Application.Current.DrawContentComplete -= Current_DrawContentComplete;
|
|
|
|
-// }
|
|
|
|
-// };
|
|
|
|
-// var dialog = new Dialog (btnPopup) { Width = 15, Height = 10 };
|
|
|
|
-// var rs = Application.Begin (dialog);
|
|
|
|
-
|
|
|
|
-// Assert.Equal (new Rect (2, 5, 15, 10), dialog.Frame);
|
|
|
|
-// TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
-//┌──────────────────┐
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ ┌─────────────┐ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ [ Popup ] │ │
|
|
|
|
-//│ └─────────────┘ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//└──────────────────┘", output);
|
|
|
|
-
|
|
|
|
-// ReflectionTools.InvokePrivate (
|
|
|
|
-// typeof (Application),
|
|
|
|
-// "ProcessMouseEvent",
|
|
|
|
-// new MouseEvent () {
|
|
|
|
-// X = 9,
|
|
|
|
-// Y = 13,
|
|
|
|
-// Flags = MouseFlags.Button1Clicked
|
|
|
|
-// });
|
|
|
|
-
|
|
|
|
-// var firstIteration = false;
|
|
|
|
-// Application.RunMainLoopIteration (ref rs, true, ref firstIteration);
|
|
|
|
-// TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
-//┌──────────────────┐
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ │
|
|
|
|
-//│ ┌─────────────┐ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ │ │
|
|
|
|
-//│ │ [ Popup ] │ │
|
|
|
|
-//│┌────────────────┐│
|
|
|
|
-//││One ││
|
|
|
|
-//││Two ││
|
|
|
|
-//││Three ││
|
|
|
|
-//│└────────────────┘│
|
|
|
|
-//└──────────────────┘", output);
|
|
|
|
-
|
|
|
|
-// Application.End (rs);
|
|
|
|
-// }
|
|
|
|
|
|
+ [Fact, AutoInitShutdown]
|
|
|
|
+ public void Draw_A_Top_Subview_On_A_Dialog ()
|
|
|
|
+ {
|
|
|
|
+ var top = Application.Top;
|
|
|
|
+ var win = new Window ();
|
|
|
|
+ top.Add (win);
|
|
|
|
+ Application.Begin (top);
|
|
|
|
+ ((FakeDriver)Application.Driver).SetBufferSize (20, 20);
|
|
|
|
+
|
|
|
|
+ Assert.Equal (new Rect (0, 0, 20, 20), win.Frame);
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+┌──────────────────┐
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+└──────────────────┘", output);
|
|
|
|
+
|
|
|
|
+ var btnPopup = new Button ("Popup");
|
|
|
|
+ btnPopup.Clicked += (s, e) => {
|
|
|
|
+ var viewToScreen = btnPopup.ViewToScreen (top.Frame);
|
|
|
|
+ var view = new View () {
|
|
|
|
+ X = 1,
|
|
|
|
+ Y = viewToScreen.Y + 1,
|
|
|
|
+ Width = 18,
|
|
|
|
+ Height = 5,
|
|
|
|
+ BorderStyle = LineStyle.Single
|
|
|
|
+ };
|
|
|
|
+ Application.Current.DrawContentComplete += Current_DrawContentComplete;
|
|
|
|
+ top.Add (view);
|
|
|
|
+
|
|
|
|
+ void Current_DrawContentComplete (object sender, DrawEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ Assert.Equal (new Rect (1, 14, 18, 5), view.Frame);
|
|
|
|
+
|
|
|
|
+ var savedClip = Application.Driver.Clip;
|
|
|
|
+ Application.Driver.Clip = top.Frame;
|
|
|
|
+ view.Redraw (view.Bounds);
|
|
|
|
+ top.Move (2, 15);
|
|
|
|
+ View.Driver.AddStr ("One");
|
|
|
|
+ top.Move (2, 16);
|
|
|
|
+ View.Driver.AddStr ("Two");
|
|
|
|
+ top.Move (2, 17);
|
|
|
|
+ View.Driver.AddStr ("Three");
|
|
|
|
+ Application.Driver.Clip = savedClip;
|
|
|
|
+
|
|
|
|
+ Application.Current.DrawContentComplete -= Current_DrawContentComplete;
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ var dialog = new Dialog (btnPopup) { Width = 15, Height = 10 };
|
|
|
|
+ var rs = Application.Begin (dialog);
|
|
|
|
+
|
|
|
|
+ Assert.Equal (new Rect (2, 5, 15, 10), dialog.Frame);
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+┌──────────────────┐
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ ┌─────────────┐ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ [ Popup ] │ │
|
|
|
|
+│ └─────────────┘ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+└──────────────────┘", output);
|
|
|
|
+
|
|
|
|
+ ReflectionTools.InvokePrivate (
|
|
|
|
+ typeof (Application),
|
|
|
|
+ "ProcessMouseEvent",
|
|
|
|
+ new MouseEvent () {
|
|
|
|
+ X = 9,
|
|
|
|
+ Y = 13,
|
|
|
|
+ Flags = MouseFlags.Button1Clicked
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ var firstIteration = false;
|
|
|
|
+ Application.RunMainLoopIteration (ref rs, true, ref firstIteration);
|
|
|
|
+ TestHelpers.AssertDriverContentsWithFrameAre (@"
|
|
|
|
+┌──────────────────┐
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ │
|
|
|
|
+│ ┌─────────────┐ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ │ │
|
|
|
|
+│ │ [ Popup ] │ │
|
|
|
|
+│┌────────────────┐│
|
|
|
|
+││One ││
|
|
|
|
+││Two ││
|
|
|
|
+││Three ││
|
|
|
|
+│└────────────────┘│
|
|
|
|
+└──────────────────┘", output);
|
|
|
|
+
|
|
|
|
+ Application.End (rs);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|