Files
Terminal.Gui/Terminal.Gui/Input/GrabMouseEventArgs.cs
Tig 42b9ad1d61 Fixes #2578 - Updates mouse events to be relative to View.Bounds (#2920)
* initial commit

* Clarified RootMouseEvent

* Added application mouse coord tests

* ViewToScreen -> BoundsToScreen

* Simplified View.Move

* Simplified View.Move

* Updated API docs; made some functions private

* more ViewLayout cleanup

* more ViewLayout cleanup

* Added View.ScreenToBounds and low-level coord unit tests

* Partial fix

* Refactored Application.OnMouseEvent... Tests still fail and views are broken

* Added Bounds/FrameToScreen

* Remamed ScreenToView->ScreenToFrame

* All unit tests pass

* Fixed ListView

* Fixed TableView

* Fixed ColorPicker

* Fixed RadioGroup

* Fixed ListView unit tests

* Fixed line drawing scenario

* Updated comment

* fixed api doc typo

* fixed formatting

* added some thickness Contains unit tests

* MouseEvent api doc updates

* More thickness tests

* More thickness tests
2023-11-26 16:58:52 -07:00

30 lines
747 B
C#

using System;
namespace Terminal.Gui {
/// <summary>
/// Args <see cref="Application.GrabMouse"/> related events.
/// </summary>
public class GrabMouseEventArgs : EventArgs {
/// <summary>
/// Creates a new instance of the <see cref="GrabMouseEventArgs"/> class.
/// </summary>
/// <param name="view">The view that the event is about.</param>
public GrabMouseEventArgs (View view)
{
View = view;
}
/// <summary>
/// Gets the view that grabbed the mouse.
/// </summary>
public View View { get; }
/// <summary>
/// Flag that allows the cancellation of the event. If set to <see langword="true"/> in the
/// event handler, the event will be canceled.
/// </summary>
public bool Cancel { get; set; }
}
}