Skip to content

ITextProvider interface

A control whose text a reader moves through by unit, with a caret and a selection.

public interface ITextProvider
name description
CaretOffset { get; } The caret’s offset in Text, or -1 when the control shows no caret.
Text { get; } The whole text.
GetBounds(…) The bounds of the given characters in the window’s client area, in DIPs, one rectangle per line.
GetOffsetAt(…) The offset of the character nearest clientPoint, a point in the window’s client area.
GetSelection() The selected ranges; empty when nothing is selected.
GetUnitAt(…) The unit of text that encloses offset.
Select(…) Selects the given characters; throws when the control cannot select.