Compartilhar via


IScrollMap Interface

Definition

Defines the mapping between character positions and scrollmap coordinates. This is not the same as the coordinate system in which the scrollbar is rendered.

public interface class IScrollMap : Microsoft::VisualStudio::Text::Editor::IVerticalFractionMap
public interface class IScrollMap : Microsoft::VisualStudio::Text::Editor::IVerticalFractionMap
__interface IScrollMap : Microsoft::VisualStudio::Text::Editor::IVerticalFractionMap
public interface IScrollMap : Microsoft.VisualStudio.Text.Editor.IVerticalFractionMap
type IScrollMap = interface
    interface IVerticalFractionMap
Public Interface IScrollMap
Implements IVerticalFractionMap
Implements

Remarks

Valid text positions range are [0...TextView.TextSnapshot.Length].

Corresponding scrollmap coordinates are [0.0 ... CoordinateOfBufferEnd].

Not every buffer position will have a distinct scrollmap coordinate. For example, every character on the same line of text will, generally, have the same scrollmap coordinate.

Different scrollmap coordinates may map to the same buffer position. For example, scrollmap coordinates in the range [0.0, 1.0) will, generally, map to the first character of the buffer.

Properties

AreElisionsExpanded

Does the coordinate system used by this scroll map act as if all elisions are expanded?

End

The scrollmap coordinate of the end of the buffer.

Start

The scrollmap coordinate of the start of the buffer.

TextView

Gets the text view to which this fraction map applies.

(Inherited from IVerticalFractionMap)
ThumbSize

Gets the size of the text visible in the view (in scrollmap coordinates).

Methods

GetBufferPositionAtCoordinate(Double)

Gets the buffer position that corresponds to a scrollmap coordinate.

GetBufferPositionAtFraction(Double)

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

(Inherited from IVerticalFractionMap)
GetCoordinateAtBufferPosition(SnapshotPoint)

Gets the scrollmap coordinates of a buffer position.

GetFractionAtBufferPosition(SnapshotPoint)

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

(Inherited from IVerticalFractionMap)

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.

(Inherited from IVerticalFractionMap)

Applies to