Browse Source

Moved MouseEvent to View

Tig Kindel 1 year ago
parent
commit
fec4d992e7
2 changed files with 10 additions and 8 deletions
  1. 0 8
      Terminal.Gui/Input/Responder.cs
  2. 10 0
      Terminal.Gui/View/ViewMouse.cs

+ 0 - 8
Terminal.Gui/Input/Responder.cs

@@ -56,14 +56,6 @@ public class Responder : IDisposable
     /// <summary>Event raised when <see cref="Dispose()"/> has been called to signal that this object is being disposed.</summary>
     public event EventHandler Disposing;
 
-    /// <summary>Method invoked when a mouse event is generated</summary>
-    /// <remarks>
-    /// The coordinates are relative to <see cref="View.Bounds"/>.
-    /// </remarks>
-    /// <returns><c>true</c>, if the event was handled, <c>false</c> otherwise.</returns>
-    /// <param name="mouseEvent">Contains the details about the mouse event.</param>
-    public virtual bool MouseEvent (MouseEvent mouseEvent) { return false; }
-
     /// <summary>Method invoked when the <see cref="CanFocus"/> property from a view is changed.</summary>
     public virtual void OnCanFocusChanged () { }
 

+ 10 - 0
Terminal.Gui/View/ViewMouse.cs

@@ -37,6 +37,16 @@ public partial class View
         return args.Handled || base.OnMouseEnter (mouseEvent);
     }
 
+
+    /// <summary>Method invoked when a mouse event is generated</summary>
+    /// <remarks>
+    /// The coordinates are relative to <see cref="View.Bounds"/>.
+    /// </remarks>
+    /// <returns><c>true</c>, if the event was handled, <c>false</c> otherwise.</returns>
+    /// <param name="mouseEvent">Contains the details about the mouse event.</param>
+    public virtual bool MouseEvent (MouseEvent mouseEvent) { return false; }
+
+
     /// <summary>Method invoked when a mouse event is generated</summary>
     /// <param name="mouseEvent"></param>
     /// <returns><see langword="true"/>, if the event was handled, <see langword="false"/> otherwise.</returns>