ITextEntry interface
Namespace: Arlecchino.Editing · Assembly: Arlecchino
A line of text being typed into, which is all the editing needs to know about whatever holds it. A dialog field is one; so is a line an application draws for itself.
public interface ITextEntry
Implemented by TextEntry, ITextEntryModal, NumberModal, TextAreaModal, TextModal, ChoiceModal, MultiChoiceModal, OptionListModal
Properties
| Member | Summary |
|---|---|
Anchor | Where the selection was started from, counted the same way. It stands on the caret while nothing is selected, and the text between the two is what is selected while they differ. |
Caret | Where the caret sits, counted in characters from the start of the text. Values outside the text are pulled back in, so a caret can never point past the end. |
Text | Whatever has been typed so far. Assigning it puts the caret and the anchor at the end, since replacing the text wholesale means neither refers to anything anymore. |
Properties in detail
Anchor
public int Anchor { get; set; }
Where the selection was started from, counted the same way. It stands on the caret while nothing is selected, and the text between the two is what is selected while they differ.
Type int
Caret
public int Caret { get; set; }
Where the caret sits, counted in characters from the start of the text. Values outside the text are pulled back in, so a caret can never point past the end.
Type int
Text
public string Text { get; set; }
Whatever has been typed so far. Assigning it puts the caret and the anchor at the end, since replacing the text wholesale means neither refers to anything anymore.
Type string