소스 검색

Moved MouseEvent to View

Tig Kindel 1 년 전
부모
커밋
fec4d992e7
2개의 변경된 파일10개의 추가작업 그리고 8개의 파일을 삭제
  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>
     /// <summary>Event raised when <see cref="Dispose()"/> has been called to signal that this object is being disposed.</summary>
     public event EventHandler Disposing;
     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>
     /// <summary>Method invoked when the <see cref="CanFocus"/> property from a view is changed.</summary>
     public virtual void OnCanFocusChanged () { }
     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);
         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>
     /// <summary>Method invoked when a mouse event is generated</summary>
     /// <param name="mouseEvent"></param>
     /// <param name="mouseEvent"></param>
     /// <returns><see langword="true"/>, if the event was handled, <see langword="false"/> otherwise.</returns>
     /// <returns><see langword="true"/>, if the event was handled, <see langword="false"/> otherwise.</returns>