Provides the base requirements for a display line within an IText
Properties
Baseline
Gets the distance from the top of the line to the baseline of the text.
Property Value
- float:
The distance from the top of the line to the baseline of the text.
BottomMargin
Gets the margin length below the line's text bounds.
Property Value
- int:
The margin length below the line's text bounds.
Bounds
Gets the bounds of the line within the view, including any margin space.
Property Value
- Rectangle:
The bounds of the line within the view, including any margin space.
Change
Gets a Text
Property Value
- Text
View :Line Change A Text
View that indicates the change made to the text represented by the line on the last layout pass.Line Change
CharacterCount
Gets the number of characters that are displayed on the line, excluding any collapsed text ranges.
Property Value
- int:
The number of characters that are displayed on the line, excluding any collapsed text ranges.
EndOffset
Gets the offset at which the line ends, excluding any line terminator.
Property Value
- int:
The offset at which the line ends, excluding any line terminator.
EndOffsetIncludingLineTerminator
Gets the offset at which the line ends, including the line terminator if there is a hard line break on the line.
Property Value
- int:
The offset at which the line ends, including the line terminator if there is a hard line break on the line.
EndPosition
Gets the Text
Property Value
- Text
Position : The Text
Position at which the line ends, excluding any line terminator.
EndPositionIncludingLineTerminator
Gets the Text
Property Value
- Text
Position : The Text
Position at which the line ends, including the line terminator if there is a hard line break on the line.
FirstNonWhitespaceCharacterIndex
Gets the index of the first non-whitespace character in the line.
Property Value
- int:
The index of the first non-whitespace character in the line.
FirstNonWhitespaceOffset
Gets the offset of the first non-whitespace character in the line.
Property Value
- int:
The offset of the first non-whitespace character in the line.
HasHardLineBreak
Gets whether the the line has a hard line break.
Property Value
- bool:
true
if the the line has a hard line break; otherwise,false
.
Remarks
This property will return false
when there is a word-wrapped line following the line.
IndentAmount
Gets the number of columns that the first non-whitespace character is indented on the line.
Property Value
- int:
The number of columns that the first non-whitespace character is indented on the line.
IsFirstLine
Gets whether the line contains the first offset of the document.
Property Value
- bool:
true
if the line contains the first offset of the document; otherwise,false
.
IsLastLine
Gets whether the line contains the last offset of the document.
Property Value
- bool:
true
if the line contains the last offset of the document; otherwise,false
.
IsPureWhitespace
Gets whether the line consists purely of whitespace characters.
Property Value
- bool:
true
if the line consists purely of whitespace characters; otherwise,false
.
IsVirtualLine
Gets whether the line is a virtual line, past the end of the document.
Property Value
- bool:
true
if the line is a virtual line, past the end of the document; otherwise,false
.
IsWrapped
Gets whether the line is wrapped from the previous line.
Property Value
- bool:
true
if the line is wrapped from the previous line; otherwise,false
.
MaxPosition
Gets the maximum Text
Property Value
- Text
Position : The maximum Text
Position that can be displayed on the line.
NextLine
Gets the IText
Property Value
- IText
View :Line The IText
View that is after this line.Line
PositionRange
Gets the Text
Property Value
- Text
Position :Range The Text
Position that contains the line.Range
PreviousLine
Gets the IText
Property Value
- IText
View :Line The IText
View that is before this line.Line
SavePointChangeType
Gets a Save
Property Value
- Save
Point :Change Type A Save
Point that indicates the type of change that has been made on the line relative to the save point.Change Type
Size
Gets the Size
of the line, including any margin space.
Property Value
- Size:
The
Size
of the line, including any margin space.
SnapshotRange
Gets the Text
Property Value
- Text
Snapshot :Range The Text
Snapshot that indicates the snapshot range of the line.Range
SnapshotRangeIncludingLineTerminator
Gets the Text
Property Value
- Text
Snapshot :Range The Text
Snapshot that indicates the snapshot range of the line, including the line terminator if there is a hard line break on the line.Range
StartOffset
Gets the offset at which the line starts.
Property Value
- int:
The offset at which the line starts.
StartPosition
Gets the Text
Property Value
- Text
Position : The Text
Position at which the line starts.
TabStopLevel
Gets or sets the tabstop level for the line.
Property Value
- int:
The tabstop level for the line.
Text
Gets or sets the text of the line, excluding the line terminator.
Property Value
- string:
The text of the line, excluding the line terminator.
Remarks
If more than one document line are encompassed on the view line, a single newline character will represent the line terminator.
TextBounds
Gets the bounds of the line within the view, excluding any margin space.
Property Value
- Rectangle:
The bounds of the line within the view, excluding any margin space.
TextRangeIncludingLineTerminator
Gets the Text
Property Value
TextSize
Gets the Size
of the line, excluding any margin space.
Property Value
- Size:
The
Size
of the line, excluding any margin space.
TopMargin
Gets the margin length above the line's text bounds.
Property Value
- int:
The margin length above the line's text bounds.
TranslationY
Gets the amount by which the line was translated if the Change was Translated
.
View
Gets the IText
Visibility
Gets a Text
Property Value
- Text
View :Line Visibility A Text
View that indicates the visibility state of the line.Line Visibility
VisibleSnapshotRanges
Gets the collection of visible snapshot ranges on the line, including the line terminator if there is a hard line break on the line.
Property Value
- IEnumerable<Text
Snapshot >:Range The collection of visible snapshot ranges on the line, including the line terminator if there is a hard line break on the line.
VisibleStartPosition
Gets the Text
Property Value
- Text
Position : The Text
Position of the first visible character or intra-text adornment on the line.
Remarks
This property may return a different value from Start
WordWrapIndex
Gets the vertical index of the line as displayed for the related IText
Property Value
- int:
The vertical index of the line as displayed for the related IText
Snapshot .Line
Remarks
0
is returned if no word wrapping has occurred for the related IText0
is returned if there is word wrapping for the related IText1
is returned for the second view line within that group, and so on.
Methods
CharacterIndexToOffset(int)
Returns the offset for the specified character index within the line.
Parameter | Type | Description |
---|---|---|
characterIndex | int | The index of a character within the line. |
Returns
- int:
The offset for the specified character index within the line.
CharacterIndexToPosition(int)
Returns the Text
Parameter | Type | Description |
---|---|---|
characterIndex | int | The index of a character within the line. |
Returns
- Text
Position : The Text
Position for the specified character index within the line.
GetCharacterBounds(TextPosition)
Returns the Text
Parameter | Type | Description |
---|---|---|
position | Text |
The Text |
Returns
- Text
Bounds : A Text
Bounds containing the visible character bounds for the specified TextPosition .
GetCharacterBounds(int)
Returns the Text
Parameter | Type | Description |
---|---|---|
offset | int | The offset whose bounds need to be retrieved. |
Returns
- Text
Bounds : A Text
Bounds containing the visible character bounds for the specified offset.
GetCharacterColumn(TextPosition)
Returns the column index within the view for the specified character.
Parameter | Type | Description |
---|---|---|
position | Text |
The Text |
Returns
- int:
The column index within the view for the specified character.
GetCharacterColumn(int)
Returns the column index within the view for the specified character.
Parameter | Type | Description |
---|---|---|
offset | int | The offset of the character whose column index is being requested. |
Returns
- int:
The column index within the view for the specified character.
GetIntraLineSpacerTags<TTag>()
Returns a collection of intra-line spacer tag ranges on the line that are of the type TTag
.
- Type Parameters:
-
TTag
-The type of tag to look for.
Returns
- IEnumerable<Tag
Snapshot <TTag>>:Range A collection of intra-line spacer tag ranges on the line that are of the type
TTag
.
GetIntraTextSpacerBounds(object)
Returns a Text
Parameter | Type | Description |
---|---|---|
tagKey | object | The object used to uniquely identify the intra-text spacer. |
Returns
- Text
Bounds : A Text
Bounds representing the bounds of the specified intra-text spacer.
GetIntraTextSpacerTag(int)
Returns the intra-text spacer tag range on the line at the specified character, if the character represents an intra-text spacer.
Parameter | Type | Description |
---|---|---|
characterIndex | int | The index of the character to examine. |
Returns
- Tag
Snapshot <IIntraRange Text >:Spacer Tag The intra-text spacer tag range on the line at the specified character, if the character represents an intra-text spacer.
Remarks
Spacer characters are embedded in between other real text characters. While spacer characters do take up a character index, they do not have a corresponding real character in a document.
GetIntraTextSpacerTags<TTag>()
Returns a collection of intra-text spacer tag ranges on the line that are of the type TTag
.
- Type Parameters:
-
TTag
-The type of tag to look for.
Returns
- IEnumerable<Tag
Snapshot <TTag>>:Range A collection of intra-text spacer tag ranges on the line that are of the type
TTag
.
GetTextBounds(TextPositionRange)
Returns the collection of bounds for the specified Text
Parameter | Type | Description |
---|---|---|
positionRange | Text |
The Text |
Returns
- IEnumerable<Text
Bounds >: The collection of bounds for the specified Text
Position text.Range
Remarks
This method typically only returns more than one Text
GetTextBounds(TextRange)
Returns the collection of bounds for the specified Text
Parameter | Type | Description |
---|---|---|
textRange | Text |
The Text |
Returns
- IEnumerable<Text
Bounds >: The collection of bounds for the specified Text
Range text.
Remarks
This method typically only returns more than one Text
IsVirtualCharacter(int, bool)
Returns whether the character at the specified index is a virtual character.
Parameter | Type | Description |
---|---|---|
characterIndex | int | The index of the character to examine. |
lineTerminatorsAreVirtual | bool | Indicates whether to treat line terminators as virtual characters. |
Returns
- bool:
true
if the character at the specified index is a virtual character; otherwise,false
.
LocationToCharacterIndex(int, LocationToPositionAlgorithm)
Returns the character index that contains the specified X location, in text area-relative coordinates.
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate for which to search. |
algorithm | Location |
The Location |
Returns
- int:
The character index that contains the specified X location, in text area-relative coordinates.
LocationToOffset(int, LocationToPositionAlgorithm)
Returns the offset that contains the specified X location, in text area-relative coordinates.
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate for which to search. |
algorithm | Location |
The Location |
Returns
- int:
The offset that contains the specified X location, in text area-relative coordinates.
LocationToPosition(int, LocationToPositionAlgorithm)
Returns the Text
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate for which to search. |
algorithm | Location |
The Location |
Returns
- Text
Position : The Text
Position that contains the specified X location, in text area-relative coordinates.
LocationToPosition(int, LocationToPositionAlgorithm, bool)
Returns the Text
Parameter | Type | Description |
---|---|---|
x | int | The x-coordinate for which to search. |
algorithm | Location |
The Location |
forceVirtualSpace | bool | Whether to force virtual space to be used (for block selections). |
Returns
- Text
Position : The Text
Position that contains the specified X location, in text area-relative coordinates.
OffsetToCharacterIndex(int)
Returns the character index that represents the specified offset within the line.
Parameter | Type | Description |
---|---|---|
offset | int | The offset of a character within the document. |
Returns
- int:
The character index that represents the specified offset within the line.
PositionToCharacterIndex(TextPosition)
Returns the character index that represents the specified Text
Parameter | Type | Description |
---|---|---|
position | Text |
The Text |
Returns
- int:
The character index that represents the specified Text
Position within the line.