Skip to content

MouseDragViewPort Class

Enables dragging a scrollable surface around by mouse.

C#
public class MouseDragViewPort : MouseConsoleComponent, IComponent

Inheritance objectMouseConsoleComponent

Implements IComponent

C#
public MouseDragViewPort()

When true, enables this component.

C#
public bool IsEnabled { get; set; }

Called when the component is added to a host.

C#
public override void OnAdded(IScreenObject host)

host IScreenObject
The host that added the component.

Exception
Raised when the host this component is added to doesn’t implement IScreenSurface.

ProcessMouse(IScreenObject, MouseScreenObjectState, out bool)

Section titled “ProcessMouse(IScreenObject, MouseScreenObjectState, out bool)”

Called by a host when the mouse is being processed.

C#
public override void ProcessMouse(IScreenObject host, MouseScreenObjectState state, out bool handled)

host IScreenObject
The host calling the component.

state MouseScreenObjectState
The state of the mouse in relation to the console.

handled bool
When set to true informs the host caller that we handled the mouse and to stop others from handling.