Class CursorManager
Represents a class that contains cursor manager which helps to manages translation of the cursor coordinates between different coordinate systems.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Edit.Implementation
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class CursorManager : ICursorManager, ICursorVirtualCoordinates, ICursorPhysicalCoordinates, ICursorGraphicalCoordinates, IDisposable
Constructors
CursorManager(Control, IPositionConverter)
Initializes a new instance of the CursorManager class.
Declaration
public CursorManager(Control owner, IPositionConverter converter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Control | owner | Owner of the cursor. |
| IPositionConverter | converter | Instance of position converter. |
Properties
CursorGraphicalCoordinates
Gets the graphical coordinates of the cursor.
Declaration
public ICursorGraphicalCoordinates CursorGraphicalCoordinates { get; }
Property Value
| Type |
|---|
| ICursorGraphicalCoordinates |
CursorPhysicalCoordinates
Gets the physical coordinates of the cursor.
Declaration
public ICursorPhysicalCoordinates CursorPhysicalCoordinates { get; }
Property Value
| Type |
|---|
| ICursorPhysicalCoordinates |
CursorVirtualCoordinates
Gets the virtual coordinates of the cursor.
Declaration
public ICursorVirtualCoordinates CursorVirtualCoordinates { get; }
Property Value
| Type |
|---|
| ICursorVirtualCoordinates |
Owner
Gets the control, that is the owner of the cursor and control's it's visibility.
Declaration
public Control Owner { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.Control |
PositionConverter
Gets the converter of the positions.
Declaration
public IPositionConverter PositionConverter { get; }
Property Value
| Type |
|---|
| IPositionConverter |
SelectionMode
Gets or sets the SelectionMode of the EditControl.
Declaration
public SelectionModes SelectionMode { get; set; }
Property Value
| Type |
|---|
| SelectionModes |
VirtualSpaceMode
Gets or sets a value indicating whether virtual space mode is enabled or not.
Declaration
public bool VirtualSpaceMode { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Visible
Gets or sets a value indicating the visibility of the cursor.
Declaration
public bool Visible { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Methods
CreateCaret()
Creates caret.
Declaration
protected virtual void CreateCaret()
DestroyCaret()
Destroys caret.
Declaration
protected virtual void DestroyCaret()
Dispose()
Disposes current caret and detaches event handlers from control.
Declaration
public virtual void Dispose()
Finalize()
Cursor's manager finalizer.
Declaration
protected void Finalize()
RaiseBeforeCoordinatesChanged(Point)
Raises BeforeCoordinatesChanged event.
Declaration
protected void RaiseBeforeCoordinatesChanged(Point newPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Drawing.Point | newPoint |
RaiseCoordinatesChangedEvent()
Raises CoordinatesChanged event.
Declaration
protected void RaiseCoordinatesChangedEvent()
RaiseLineChangedEvent(Int32, Int32)
Raises LineChanged event.
Declaration
protected void RaiseLineChangedEvent(int oldLine, int newLine)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | oldLine | |
| System.Int32 | newLine |
Update()
Helps to updates the cursor's parameters.
Declaration
public void Update()
Remarks
All updates of coordinates are based on virtual position.
UpdatePosition()
Updates position of the cursor.
Declaration
protected virtual void UpdatePosition()
UpdateVisibility()
Updates visibility of the cursor.
Declaration
protected virtual void UpdateVisibility()
Events
BeforeCoordinatesChange
Occurs before coordinates are about to change.
Declaration
public event CoordinatesChangeEventHandler BeforeCoordinatesChange
Event Type
| Type |
|---|
| CoordinatesChangeEventHandler |
CoordinatesChanged
Occurs when position of the cursor was changed.
Declaration
public event EventHandler CoordinatesChanged
Event Type
| Type |
|---|
| System.EventHandler |
LineChanged
Occurs after line of the cursor has changed.
Declaration
public event ValueChangedEventHandler LineChanged
Event Type
| Type |
|---|
| ValueChangedEventHandler |
Explicit Interface Implementations
ICursorGraphicalCoordinates.LeftTop
Gets or sets the left-top point of the cursor in client coordinates.
Declaration
Point ICursorGraphicalCoordinates.LeftTop { get; set; }
Returns
| Type |
|---|
| System.Drawing.Point |
ICursorGraphicalCoordinates.Rectangle
Gets rectangle, occupied by cursor.
Declaration
Rectangle ICursorGraphicalCoordinates.Rectangle { get; }
Returns
| Type |
|---|
| System.Drawing.Rectangle |
ICursorGraphicalCoordinates.Size
Gets size of the cursor.
Declaration
Size ICursorGraphicalCoordinates.Size { get; set; }
Returns
| Type |
|---|
| System.Drawing.Size |
ICursorPhysicalCoordinates.Column
Gets or sets cursor's physical column index.
Declaration
int ICursorPhysicalCoordinates.Column { get; }
Returns
| Type |
|---|
| System.Int32 |
ICursorPhysicalCoordinates.Line
Gets or sets cursor's physical line index.
Declaration
int ICursorPhysicalCoordinates.Line { get; }
Returns
| Type |
|---|
| System.Int32 |
ICursorPhysicalCoordinates.Position
Gets or sets cursor's physical position.
Declaration
IParsePoint ICursorPhysicalCoordinates.Position { get; set; }
Returns
| Type |
|---|
| IParsePoint |
ICursorVirtualCoordinates.Column
Gets or sets cursor's virtual column index.
Declaration
int ICursorVirtualCoordinates.Column { get; set; }
Returns
| Type |
|---|
| System.Int32 |
ICursorVirtualCoordinates.Line
Gets or sets cursor's virtual line index.
Declaration
int ICursorVirtualCoordinates.Line { get; set; }
Returns
| Type |
|---|
| System.Int32 |
ICursorVirtualCoordinates.Position
Gets or sets cursor's virtual position.
Declaration
Point ICursorVirtualCoordinates.Position { get; set; }
Returns
| Type |
|---|
| System.Drawing.Point |