IFormattedLine Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a line of formatted text in the ITextView.
public interface class IFormattedLine : IDisposable, Microsoft::VisualStudio::Text::Formatting::ITextViewLine, Microsoft::VisualStudio::Text::Formatting::IWpfTextViewLine
public interface IFormattedLine : IDisposable, Microsoft.VisualStudio.Text.Formatting.ITextViewLine, Microsoft.VisualStudio.Text.Formatting.IWpfTextViewLine
type IFormattedLine = interface
interface IWpfTextViewLine
interface ITextViewLine
interface IDisposable
Public Interface IFormattedLine
Implements IDisposable, ITextViewLine, IWpfTextViewLine
- Implements
Remarks
Most properties and parameters that are doubles correspond to coordinates or distances in the text rendering coordinate system. In this coordinate system, x = 0.0 corresponds to the left edge of the drawing surface onto which text is rendered (x = view.ViewportLeft corresponds to the left edge of the viewport), and y = view.ViewportTop corresponds to the top edge of the viewport. The x-coordinate increases from left to right, and the y-coordinate increases from top to bottom.
The horizontal and vertical axes of the view behave differently. When the text in the view is formatted, only the visible lines are formatted. As a result, a viewport cannot be scrolled horizontally and vertically in the same way.
A viewport is scrolled horizontally by changing the left coordinate of the viewport so that it moves with respect to the drawing surface.
A view can be scrolled vertically only by performing a new layout.
Doing a layout in the view may cause the ViewportTop property of the view to change. For example, scrolling down one line will not translate any of the visible lines. Instead it will simply change the view's ViewportTop property (causing the lines to move on the screen even though their y-coordinates have not changed).
Distances in the text rendering coordinate system correspond to logical pixels. If the text rendering surface is displayed without any scaling transform, then 1 unit in the text rendering coordinate system corresponds to one pixel on the display.
Properties
Baseline |
Gets the distance from the top of the text to the baseline text on the line. (Inherited from ITextViewLine) |
Bottom |
Gets the position of the bottom edge of this line in the text rendering coordinate system. (Inherited from ITextViewLine) |
Change |
Gets the change to this rendered textline between the current layout and the previous layout. (Inherited from ITextViewLine) |
DefaultLineTransform |
Gets the default LineTransform used to render this line. (Inherited from ITextViewLine) |
DeltaY |
Gets the change in the top of this rendered textline between between the value of Top in the current layout and the value of Top in the previous layout. (Inherited from ITextViewLine) |
End |
Gets the position of the first character past the end of the line, excluding any line break characters. In most cases this property references a line break character, except for the last line in the buffer, in which case it contains a position past the end of the buffer. (Inherited from ITextViewLine) |
EndIncludingLineBreak |
Gets the position of the first character past the end of the line, including any line break characters In most cases this property references the first character in the following line, unless this is the last line, in which case it contains a position past the end of the buffer. (Inherited from ITextViewLine) |
EndOfLineWidth |
Gets the distance from the right edge of the last character in this line to the end of the space of this line. This may include padding for line break characters or for end of file characters. (Inherited from ITextViewLine) |
Extent |
Gets the extent of the line, excluding any line break characters. (Inherited from ITextViewLine) |
ExtentAsMappingSpan |
Gets the IMappingSpan that corresponds to the Extent of the line. (Inherited from ITextViewLine) |
ExtentIncludingLineBreak |
Gets the extent of the line, including any line break characters. (Inherited from ITextViewLine) |
ExtentIncludingLineBreakAsMappingSpan |
Gets the IMappingSpan that corresponds to ExtentIncludingLineBreak. (Inherited from ITextViewLine) |
Height |
Gets the distance between the top and bottom edge of this line. (Inherited from ITextViewLine) |
IdentityTag |
Gets a tag that can be used to track the identity of an ITextViewLine across layouts in the view. (Inherited from ITextViewLine) |
IsFirstTextViewLineForSnapshotLine |
Determines whether this ITextViewLine is the first line in the list of lines formatted for a particular ITextSnapshotLine. (Inherited from ITextViewLine) |
IsLastTextViewLineForSnapshotLine |
Determines whether this ITextViewLine is the last line in the list of lines formatted for a particular ITextSnapshotLine. (Inherited from ITextViewLine) |
IsValid |
Determines whether this text view line is still valid. (Inherited from ITextViewLine) |
Left |
Gets the position of the left edge of this line in the text rendering coordinate system. (Inherited from ITextViewLine) |
Length |
Gets the length of the line, excluding any line break characters. (Inherited from ITextViewLine) |
LengthIncludingLineBreak |
Gets the length of the line, including any line break characters. (Inherited from ITextViewLine) |
LineBreakLength |
Gets the length of the line break sequence (for example, "\r\n") that appears at the end of this line. (Inherited from ITextViewLine) |
LineTransform |
Gets the LineTransform used to render this line. (Inherited from ITextViewLine) |
Right |
Gets the position of the right edge of this line in the text rendering coordinate system. (Inherited from ITextViewLine) |
Snapshot |
Gets the ITextSnapshot on which this map is based. (Inherited from ITextViewLine) |
Start |
Gets the position in Snapshot of the first character in the line. (Inherited from ITextViewLine) |
TextBottom |
Gets the y-coordinate of the bottom of the text in the rendered line. (Inherited from ITextViewLine) |
TextHeight |
Gets the vertical distance between the top and bottom of the text in the rendered line. (Inherited from ITextViewLine) |
TextLeft |
Gets the x-coordinate of the left edge of the text in the rendered line. (Inherited from ITextViewLine) |
TextLines |
Gets a list of WPF text lines that make up the formatted text line. (Inherited from IWpfTextViewLine) |
TextRight |
Gets the x-coordinate of the right edge of the text in the rendered line. (Inherited from ITextViewLine) |
TextTop |
Gets the y-coordinate of the top of the text in the rendered line. (Inherited from ITextViewLine) |
TextWidth |
Gets the horizontal distance between TextRight and TextLeft. (Inherited from ITextViewLine) |
Top |
Gets the position of the top edge of this line in the text rendering coordinate system. (Inherited from ITextViewLine) |
VirtualSpaceWidth |
Get the width of the virtual spaces at the end of this line. (Inherited from ITextViewLine) |
VisibilityState |
Gets the visibility state of this rendered text line with respect to the top and bottom of the view. (Inherited from ITextViewLine) |
VisibleArea |
Gets the visible area in which this text line will be rendered. (Inherited from IWpfTextViewLine) |
Width |
Gets the distance between the left and right edges of this line. (Inherited from ITextViewLine) |
Methods
ContainsBufferPosition(SnapshotPoint) |
Determines whether the specified buffer position lies within this text line. (Inherited from ITextViewLine) |
GetAdornmentBounds(Object) |
Calculates the bounds of the specified adornment. (Inherited from ITextViewLine) |
GetAdornmentTags(Object) |
Gets the adornments positioned on the line. (Inherited from ITextViewLine) |
GetBufferPositionFromXCoordinate(Double, Boolean) |
Gets the buffer position of the character whose character bounds contains the given x-coordinate. (Inherited from ITextViewLine) |
GetBufferPositionFromXCoordinate(Double) |
Gets the buffer position of the character whose character bounds contains the given x-coordinate. (Inherited from ITextViewLine) |
GetCharacterBounds(SnapshotPoint) |
Calculates the bounds of the character at the specified buffer position. (Inherited from ITextViewLine) |
GetCharacterBounds(VirtualSnapshotPoint) |
Calculates the bounds of the character at the specified buffer position. (Inherited from ITextViewLine) |
GetCharacterFormatting(SnapshotPoint) |
Gets the formatting for a particular character in the line. (Inherited from IWpfTextViewLine) |
GetExtendedCharacterBounds(SnapshotPoint) |
Calculates the bounds of the character at the specified buffer position, including any adjacent space-negotiating adornments. (Inherited from ITextViewLine) |
GetExtendedCharacterBounds(VirtualSnapshotPoint) |
Calculates the bounds of the character at the specified virtual buffer position, including any adjacent space-negotiating adornments. (Inherited from ITextViewLine) |
GetInsertionBufferPositionFromXCoordinate(Double) |
Gets the buffer position used if new data were to be inserted at the given x-coordinate. (Inherited from ITextViewLine) |
GetNormalizedTextBounds(SnapshotSpan) |
Gets a collection of TextBounds structures for the text that corresponds to the given span. (Inherited from ITextViewLine) |
GetOrCreateVisual() |
Gets the WPF Visual that can be used to add this formatted text line to a VisualCollection. |
GetTextElementSpan(SnapshotPoint) |
Gets the span whose text elementindex corresponds to the given buffer position. (Inherited from ITextViewLine) |
GetVirtualBufferPositionFromXCoordinate(Double) |
Gets the buffer position of the character whose character bounds contains the given x-coordinate. (Inherited from ITextViewLine) |
IntersectsBufferSpan(SnapshotSpan) |
Determines whether a |
RemoveVisual() |
Remove the Wpf Visual that represents the rendered text of the line. |
SetChange(TextViewLineChange) |
Sets the Change property for this text line. |
SetDeltaY(Double) |
Sets the change in the position of the top of this formatted text line in the current view layout and the previous view layour. |
SetLineTransform(LineTransform) |
Sets the line transform used to format the text in this formatted text line. |
SetSnapshot(ITextSnapshot, ITextSnapshot) |
Sets the ITextSnapshots upon which this formatted text line is based. |
SetTop(Double) |
Sets the position used to format the text in this formatted text line. |
SetVisibleArea(Rect) |
Sets the visible area in which this text line will be formatted. |