ITrackingSpan 接口

定义

中的文本范围 ITextBuffer ,其中的文本会随文本缓冲区的更改而增大或缩小。A span of text in an ITextBuffer that grows or shrinks with changes to the text buffer. 范围可能为空。The span may be empty.

public interface class ITrackingSpan
public interface class ITrackingSpan
__interface ITrackingSpan
public interface ITrackingSpan
type ITrackingSpan = interface
Public Interface ITrackingSpan

注解

有关跟踪的信息,请参阅 编辑器内的 "跟踪点和跟踪范围" 部分。For information about tracking, see the "Tracking Points and Tracking Spans" section of Inside the Editor.

属性

TextBuffer

ITextBuffer此跟踪范围所引用的。The ITextBuffer to which this tracking span refers.

TrackingFidelity

TrackingFidelityMode跟踪范围的,它确定在移动到以前的版本时,或遇到作为先前版本的副本的版本 (由于撤消或重做) 而产生的行为。The TrackingFidelityMode of the tracking span, which determines how it behaves when moving to a previous version or when encountering versions that are replications of previous versions (due to undo or redo).

TrackingMode

TrackingMode此跟踪范围的,它确定在其边缘处发生插入时它的行为方式。The TrackingMode of this tracking span, which determines how it behaves when insertions occur at its edges.

方法

GetEndPoint(ITextSnapshot)

将跟踪范围的结尾映射到其文本缓冲区的特定快照。Maps the end of the tracking span to a particular snapshot of its text buffer.

GetSpan(ITextSnapshot)

将跟踪范围映射到其文本缓冲区的特定快照。Maps the tracking span to a particular snapshot of its text buffer.

GetSpan(ITextVersion)

将 TrackingSpan 映射到其文本缓冲区的特定版本。Maps the TrackingSpan to a particular version of its text buffer.

GetStartPoint(ITextSnapshot)

将跟踪范围的开始映射到其文本缓冲区的特定快照。Maps the start of the tracking span to a particular snapshot of its text buffer.

GetText(ITextSnapshot)

将跟踪范围映射到其文本缓冲区的特定快照,并获取它指定的文本。Maps the tracking span to a particular snapshot of its text buffer and gets the text it designates.

适用于