Interface IMouse
Defines a contract for mouse event handling and state management in a Terminal.Gui application.
This interface allows for decoupling of mouse-related functionality from the static Application class, enabling better testability and parallel test execution.
public interface IMouse : IMouseGrabHandler- Inherited Members
Properties
- Application
- Sets the application instance that this mouse handler is associated with. This provides access to application state without coupling to static Application class. 
- CachedViewsUnderMouse
- Gets the list of non-TransparentMouse views that are currently under the mouse. 
- IsMouseDisabled
- Gets or sets whether the mouse is disabled. The mouse is enabled by default. 
- LastMousePosition
- Gets or sets the last known position of the mouse. 
Methods
- GetLastMousePosition()
- Gets the most recent position of the mouse. 
- RaiseMouseEnterLeaveEvents(Point, List<View?>)
- INTERNAL: Raises the MouseEnter and MouseLeave events for the views that are under the mouse. 
- RaiseMouseEvent(MouseEventArgs)
- INTERNAL API: Called when a mouse event is raised by the driver. Determines the view under the mouse and calls the appropriate View mouse event handlers. 
- ResetState()
- INTERNAL: Resets mouse state, clearing event handlers and cached views. 
Events
- MouseEvent
- Raised when a mouse event occurs. Can be cancelled by setting Handled to true.