Class MouseDragViewPort
Enables dragging a scrollable surface around by mouse.
Implements
Inherited Members
Namespace: SadConsole.Components
Assembly: SadConsole.Extended.dll
Syntax
public class MouseDragViewPort : MouseConsoleComponent, IComponent
Constructors
MouseDragViewPort()
Declaration
public MouseDragViewPort()
Properties
IsEnabled
When true, enables this component.
Declaration
public bool IsEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Methods
OnAdded(IScreenObject)
Called when the component is added to a host.
Declaration
public override void OnAdded(IScreenObject host)
Parameters
| Type | Name | Description |
|---|---|---|
| IScreenObject | host | The host that added the component. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| Exception | Raised when the host this component is added to doesn't implement IScreenSurface. |
ProcessMouse(IScreenObject, MouseScreenObjectState, out bool)
Called by a host when the mouse is being processed.
Declaration
public override void ProcessMouse(IScreenObject host, MouseScreenObjectState state, out bool handled)
Parameters
| Type | Name | Description |
|---|---|---|
| IScreenObject | host | The host calling the component. |
| MouseScreenObjectState | state | The state of the mouse in relation to the console. |
| bool | handled | When set to true informs the host caller that we handled the mouse and to stop others from handling. |