Table of Contents

Interface IMouseAwareControl

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Interface for controls that can handle mouse events

public interface IMouseAwareControl : IWindowControl, IDisposable
Inherited Members
Extension Methods

Properties

CanFocusWithMouse

Whether this control can receive focus via mouse clicks

bool CanFocusWithMouse { get; }

Property Value

bool

WantsMouseEvents

Whether this control wants to receive mouse events

bool WantsMouseEvents { get; }

Property Value

bool

Methods

ProcessMouseEvent(MouseEventArgs)

Processes a mouse event for this control

bool ProcessMouseEvent(MouseEventArgs args)

Parameters

args MouseEventArgs

Mouse event arguments with control-relative coordinates

Returns

bool

True if the event was handled and should not propagate further

Events

MouseClick

Event fired when the control is clicked

event EventHandler<MouseEventArgs>? MouseClick

Event Type

EventHandler<MouseEventArgs>

MouseDoubleClick

Event fired when the control is double-clicked

event EventHandler<MouseEventArgs>? MouseDoubleClick

Event Type

EventHandler<MouseEventArgs>

MouseEnter

Event fired when the mouse enters the control area

event EventHandler<MouseEventArgs>? MouseEnter

Event Type

EventHandler<MouseEventArgs>

MouseLeave

Event fired when the mouse leaves the control area

event EventHandler<MouseEventArgs>? MouseLeave

Event Type

EventHandler<MouseEventArgs>

MouseMove

Event fired when the mouse moves over the control

event EventHandler<MouseEventArgs>? MouseMove

Event Type

EventHandler<MouseEventArgs>