Partilhar via


IVerticalFractionMap Interface

Definition

Maps between character positions and fractions of the total vertical extent of an ITextView.

public interface class IVerticalFractionMap
public interface class IVerticalFractionMap
__interface IVerticalFractionMap
public interface IVerticalFractionMap
type IVerticalFractionMap = interface
Public Interface IVerticalFractionMap
Derived

Remarks

Valid text positions range are [0...TextView.TextSnapshot.Length]. Valid scrollbar coordinates are [0.0 ... 1.0]. 0.0 corresponds to the top of the first line in the text view; 1.0 corresponds to the bottom of the last line in the view. Not every text position will have a unique value. For example, every character on the same text buffer line will have the same value, assuming that word wrap is not enabled.

This interface is the base type of the IScrollMap interface, which is created using the IScrollMapFactoryService.

Properties

TextView

Gets the text view to which this fraction map applies.

Methods

GetBufferPositionAtFraction(Double)

Gets the buffer position that corresponds to a fraction of the vertical extent of the view, if it exists.

GetFractionAtBufferPosition(SnapshotPoint)

Gets the fraction of the vertical extent of the view that corresponds to the specified buffer position.

Events

MappingChanged

Occurs when the mapping between character position and its vertical fraction has changed. For example, the view may have re-rendered some lines, changing their font size.

Applies to