C# Class Microsoft.Languages.Editor.Selection.SelectionTracker

Selection tracker helps preserve caret position and relative screen scroll position when text buffer change is applied. This is default implementation, languages can choose to implement their own.
Inheritance: ISelectionTracker
Exibir arquivo Open project: Microsoft/RTVS

Public Methods

Method Description
EndTracking ( ) : void

Stops tracking and saves current caret position as final position as final or 'after changes' position.

MoveToAfterChanges ( int virtualSpaces ) : void

Moves caret to 'after changes' position

MoveToBeforeChanges ( ) : void

Moves caret to 'before changes' position.

SelectionTracker ( ITextView textView ) : System
StartTracking ( bool automaticTracking ) : void

Saves current caret position and optionally starts tracking of the caret position across text buffer changes using ITrackingSpan

Protected Methods

Method Description
MoveCaretTo ( SnapshotPoint position, int virtualSpaces ) : void

Method Details

EndTracking() public method

Stops tracking and saves current caret position as final position as final or 'after changes' position.
public EndTracking ( ) : void
return void

MoveCaretTo() protected method

protected MoveCaretTo ( SnapshotPoint position, int virtualSpaces ) : void
position SnapshotPoint
virtualSpaces int
return void

MoveToAfterChanges() public method

Moves caret to 'after changes' position
public MoveToAfterChanges ( int virtualSpaces ) : void
virtualSpaces int
return void

MoveToBeforeChanges() public method

Moves caret to 'before changes' position.
public MoveToBeforeChanges ( ) : void
return void

SelectionTracker() public method

public SelectionTracker ( ITextView textView ) : System
textView ITextView
return System

StartTracking() public method

Saves current caret position and optionally starts tracking of the caret position across text buffer changes using ITrackingSpan
public StartTracking ( bool automaticTracking ) : void
automaticTracking bool True if selection tracker should track text buffer changes using tracking span. /// False if End should simply use current caret position as final position rather than attempt to track it /// across changes.
return void