StyledText Class
Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit
Represents a block of formatted, laid out and measurable text
public class StyledText
Inheritance
StyledText → object
Derived By
Constructors
| StyledText() | Constructor |
| StyledText(Utils.Slice<int>) | Constructs a styled text block from unstyled text |
Fields
| _codePoints | All code points as supplied by user, accumulated into a single buffer |
| _hasTextDirectionOverrides | Set to true if any style runs have a directionality override. |
| _styleRuns | A list of style runs, as supplied by user |
Properties
| CodePoints | Get the code points of this text block |
| Length | The length of the added text in code points |
| StyleRuns | Get the text runs as added by AddText |
Methods
| AddText(StyledText) | Add all the text from another text block to this text block |
| AddText(ReadOnlySpan<char>, IStyle) | Add text to this text block |
| AddText(Utils.Slice<int>, IStyle) | Add text to this paragraph |
| AddText(string, IStyle) | Add text to this text block |
| ApplyStyle(int, int, IStyle) | Overwrites the styles of existing text in the text block |
| CharacterToCodePointIndex(int) | Converts a character index to a code point index |
| Clear() | Clear the content of this text block |
| CodePointToCharacterIndex(int) | Converts a code point index to a character index |
| DeleteText(int, int) | Deletes text from this text block |
| Extract(int, int) | Extract text from this styled text block |
| GetStyleAtOffset(int) | Gets the style of the text at a specified offset |
| InsertText(int, StyledText) | Add all the text from another text block to this text block |
| InsertText(int, Utils.Slice<int>, IStyle) | Add text to this text block |
| InsertText(int, ReadOnlySpan<char>, IStyle) | Add text to this text block |
| InsertText(int, string, IStyle) | Add text to this text block |
| OnChanged() | Called whenever the content of this styled text block changes |
Overridden & Inherited
| ToString() |
