From fec4d992e7bbb72423efb6c30135f74f7253dfe8 Mon Sep 17 00:00:00 2001 From: Tig Kindel Date: Thu, 29 Feb 2024 16:56:22 -0700 Subject: [PATCH] Moved MouseEvent to View --- Terminal.Gui/Input/Responder.cs | 8 -------- Terminal.Gui/View/ViewMouse.cs | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Terminal.Gui/Input/Responder.cs b/Terminal.Gui/Input/Responder.cs index d7f2ce6c3..5deb475df 100644 --- a/Terminal.Gui/Input/Responder.cs +++ b/Terminal.Gui/Input/Responder.cs @@ -56,14 +56,6 @@ public class Responder : IDisposable /// Event raised when has been called to signal that this object is being disposed. public event EventHandler Disposing; - /// Method invoked when a mouse event is generated - /// - /// The coordinates are relative to . - /// - /// true, if the event was handled, false otherwise. - /// Contains the details about the mouse event. - public virtual bool MouseEvent (MouseEvent mouseEvent) { return false; } - /// Method invoked when the property from a view is changed. public virtual void OnCanFocusChanged () { } diff --git a/Terminal.Gui/View/ViewMouse.cs b/Terminal.Gui/View/ViewMouse.cs index f0f03f72f..06255fad9 100644 --- a/Terminal.Gui/View/ViewMouse.cs +++ b/Terminal.Gui/View/ViewMouse.cs @@ -37,6 +37,16 @@ public partial class View return args.Handled || base.OnMouseEnter (mouseEvent); } + + /// Method invoked when a mouse event is generated + /// + /// The coordinates are relative to . + /// + /// true, if the event was handled, false otherwise. + /// Contains the details about the mouse event. + public virtual bool MouseEvent (MouseEvent mouseEvent) { return false; } + + /// Method invoked when a mouse event is generated /// /// , if the event was handled, otherwise.