IScrollMap Interface
Defines the mapping between character positions and scrollmap coordinates.
Namespace: Microsoft.VisualStudio.Text.Editor
Assembly: Microsoft.VisualStudio.Text.UI (in Microsoft.VisualStudio.Text.UI.dll)
Syntax
'Déclaration
Public Interface IScrollMap _
Inherits IVerticalFractionMap
public interface IScrollMap : IVerticalFractionMap
public interface class IScrollMap : IVerticalFractionMap
type IScrollMap =
interface
interface IVerticalFractionMap
end
public interface IScrollMap extends IVerticalFractionMap
The IScrollMap type exposes the following members.
Properties
Name | Description | |
---|---|---|
AreElisionsExpanded | Determines whether the coordinate system used by this scroll map acts as if all elisions are expanded. | |
End | Gets the scrollmap coordinate of the end of the buffer. | |
Start | Gets 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). |
Top
Methods
Name | Description | |
---|---|---|
GetBufferPositionAtCoordinate | Gets the buffer position that corresponds to a scrollmap coordinate. | |
GetBufferPositionAtFraction | Gets the buffer position that corresponds to a fraction of the vertical extent of the view, if it exists. (Inherited from IVerticalFractionMap.) | |
GetCoordinateAtBufferPosition | Gets the scrollmap coordinates of a buffer position. | |
GetFractionAtBufferPosition | Gets the fraction of the vertical extent of the view that corresponds to the specified buffer position. (Inherited from IVerticalFractionMap.) |
Top
Events
Name | Description | |
---|---|---|
MappingChanged | Occurs when the mapping has changed between a character position and its vertical fraction. For example, the view may have re-rendered some lines, changing their font size. (Inherited from IVerticalFractionMap.) |
Top
Remarks
This coordinate system is not the same as the one in which the scrollbar is rendered.
Valid text positions range between 0 and ITextView.TextSnapshot.Length. Corresponding scrollmap coordinates range between 0.0 and 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.