TextRange Class |
Namespace: TextObjectModel
The TextRange type exposes the following members.
Name | Description | |
---|---|---|
AddSubrange |
(TOM 2 only)
Adds a subrange to this range.
| |
BuildUpMath |
(TOM 2 only)
Converts the linear-format math in a range to a built-up form, or modifies the current built-up form.
| |
ChangeCase |
Changes the case of letters in this range according to the type parameter.
| |
Clone |
Gets a duplicate of this range object.
| |
Collapse |
Collapses the specified text range into a degenerate point at either the beginning or end of the range.
| |
Copy |
Copies the text to the clipboard.
| |
Cut |
Cuts the plain or rich text to the clipboard.
| |
Delete |
Mimics the DELETE and BACKSPACE keys, with and without the CTRL key depressed.
| |
DeleteSubrange |
(TOM 2 only)
Deletes a subrange from the range.
| |
Dispose | Releases all resources used by the TextRange | |
Dispose(Boolean) | Releases the unmanaged resources used by the TextRange and optionally releases the managed resources | |
EndOf |
Moves this range's ends to the end of the last overlapping unit in the range.
| |
Equals(Object) |
Tests if this object is considered equal to another.
(Overrides ObjectEquals(Object).) | |
Equals(TextRange) |
Determines whether this range has the same character positions and story as those of a specified range.
| |
Expand |
Expands this range so that any partial units it contains are completely contained.
| |
Finalize | (Overrides ObjectFinalize.) | |
Find |
(TOM 2 only)
Searchs for math inline functions in text as specified by a source range.
| |
FindText(String, RangeMatchType) |
Searches to the end of the story for the text given by text.
The matching criteria are given by flags.
| |
FindText(String, Int32, RangeMatchType) |
Searches up to count characters for the text given by text.
The starting position and direction are also specified by count,
and the matching criteria are given by flags.
| |
FindTextEnd(String, RangeMatchType) |
Searches to the end of the story for text, starting from the range's end.
| |
FindTextEnd(String, Int32, RangeMatchType) |
Searches up to count characters for text, starting from the range's end.
| |
FindTextStart(String, RangeMatchType) |
Searches to the end of the story for text, starting at the range's start.
| |
FindTextStart(String, Int32, RangeMatchType) |
Searches up to count characters for text, starting at the range's start.
| |
GetCells |
(TOM 2 only)
Gets the cells in the range.
| |
GetChar |
(TOM 2 only)
Gets the character at the specified offset from the end of this range.
| |
GetColumn |
(TOM 2 only)
Gets the column in the range.
| |
GetDataObject |
Returns an IDataObject containing the text in the range.
| |
GetDropCap |
(TOM 2 only)
Gets the line and position of the drop cap.
| |
GetEmbeddedObject |
Retrieves the embedded object at the start of the specified range.
The range must either be an insertion point or it must select only the embedded object.
| |
GetHashCode |
Returns the hash code for the object.
(Overrides ObjectGetHashCode.) | |
GetIndex |
Retrieves the story index of the unit parameter at the specified range start character position.
The first unit in a story has an index value of 1.
The index of a Unit is the same for all character positions from that immediately preceding the unit up to the last character in the unit.
| |
GetMathFunctionType |
(TOM 2 only)
Retrieves the math function type associated with the specified math function name.
| |
GetPoint |
Retrieves screen coordinates for the start or end character position in the text range, along with the intra-line position.
| |
GetProperty |
(TOM 2 only)
Gets the value of a property.
| |
GetRectangle |
(TOM 2 only)
Retrieves a rectangle of the specified type for the current range.
| |
GetRow |
(TOM 2 only)
Gets the row properties in the currently selected row.
| |
GetSubrange |
(TOM 2 only)
Retrieves a subrange in a range.
| |
GetTable |
(TOM 2 only)
Gets the table in the range.
| |
GetText |
(TOM 2 only)
Gets the text in this range according to the specified conversion flags.
| |
HexToUnicode |
(TOM 2 only)
Converts and replaces the hexadecimal number at the end of this range to a Unicode character.
| |
InRange |
Determines whether this range is within or at the same text as a specified range.
| |
InsertImage |
(TOM 2 only)
Inserts a table in a range.
| |
InsertTable |
(TOM 2 only)
Inserts a table in a range.
| |
Linearize |
(TOM 2 only)
Translates the built-up math, ruby, and other inline objects in this range to linearized form.
| |
Move |
Moves the insertion point forward or backward a specified number of units.
If the range is nondegenerate, the range is collapsed to an insertion point at either end,
depending on count, and then is moved.
| |
MoveEnd |
Moves the end position of the range.
| |
MoveEndUntil |
Moves the range's end to the character position of the first
character found that is in the set of characters specified by
chars.
| |
MoveEndWhile |
Moves the end of the range just past all contiguous characters
that are found in the set of characters specified by
chars, whichever is less.
| |
MoveStart |
Moves the start position of the range.
| |
MoveStartUntil |
Moves the range's start to the character position of the first
character found that is in the set of characters specified by
chars.
| |
MoveStartWhile |
Moves the start position of the range just past all contiguous
characters that are found in the set of characters specified by
chars.
| |
MoveUntil |
Searches for the first character in the set of characters
specified by chars. If a character is found,
the range is collapsed to that point.
| |
MoveWhile |
Starts at the end of the range and searches while the characters
belong to the set specified by chars.
The range is collapsed to an insertion point when a non-matching character is found.
| |
Paste |
Pastes text from the clipboard.
| |
ScrollIntoView |
Scrolls the range into view.
| |
Select |
Sets the start and end positions, and story values of the active selection, to those of this range.
| |
SetActiveSubrange |
(TOM 2 only)
Makes the specified subrange the active subrange of this range.
| |
SetDataObject |
Replaces the text in the range with the specified data object.
| |
SetDropCap |
(TOM 2 only)
Sets the line and position of the drop cap.
| |
SetFormattedText |
Sets the formatted text of this range text to the formatted text of the specified range.
| |
SetIndex |
Changes this range to the specified unit of the story.
| |
SetPoint |
Changes the range based on a specified point at or up through
(depending on extend) the point (x, y) aligned
according to position.
| |
SetProperty |
(TOM 2 only)
Sets the value of the specified property.
| |
SetRange |
Adjusts the range endpoints to the specified values.
| |
SetText |
(TOM 2 only)
Sets the text of this range.
| |
StartOf |
Moves the range ends to the start of the first overlapping Unit in the range.
| |
ToString |
Returns the plain text in the range.
(Overrides ObjectToString.) | |
UnicodeToHex |
(TOM 2 only)
Converts the Unicode character(s) preceding the start position of this text range to a hexadecimal number, and selects it.
|
Name | Description | |
---|---|---|
Append |
Appends text to the end of the range.
(Defined by TextExtensions.) | |
AppendLine |
Appends text, followed by a newline character, to the end of the range.
(Defined by TextExtensions.) | |
Clear |
Clears the text in the range.
(Defined by TextExtensions.) | |
Insert |
Inserts text at the specified position within the range.
(Defined by TextExtensions.) | |
Remove |
Removes a sequence of characters from the range.
(Defined by TextExtensions.) | |
ToMathML |
Returns a string containing the W3C MathML (MML) markup for the math text in the range.
(Defined by TextExtensions.) | |
ToOfficeMathML |
Returns a string containing the Office MathML (OMML) markup for the math text in the range.
(Defined by TextExtensions.) |
Name | Description | |
---|---|---|
CanEdit |
Gets a value determining whether the specified range can be edited.
| |
CanPaste |
Gets a value determining if data on the clipboard can be pasted into the current range.
| |
Char |
Gets or sets the character at the start position of the range.
| |
End |
Gets or sets the end character position of the range.
| |
Font |
Gets or sets a TextFont object with the character attributes of the specified range.
| |
Gravity |
(TOM 2 only)
Gets or sets the gravity of this range.
| |
InlineObject |
(TOM 2 only)
Gets or sets the properties of the inline object at the range active end.
| |
Length |
Gets or sets the length of the range.
| |
Para |
Gets or sets a TextPara object with the paragraph attributes of the specified range.
| |
Rtf |
Gets or sets the content of the range as a Rich Text Format (RTF) string.
| |
Start |
Gets or sets the start character position of the range.
| |
StartPara |
(TOM 2 only)
Gets the character position of the start of the paragraph that contains the range's start character position.
| |
SubrangeCount |
(TOM 2 only)
Gets the count of subranges, including the active subrange in the current range.
| |
Text |
Gets or sets the plain text in this range.
| |
URL |
(TOM 2 only)
Gets or sets the URL text associated with a range.
|
Managed wrapper class for the COM interface ITextRange, including ITextRange2 functionality.
Ranges are the primary mechanism for reading and manipulating text in TOM. A range provides access to the content and formatting options for the rich text bounded by a particular start and end position.
A range can be obtained by: