Skip to main content

EntryRuns class

Namespace: Arlecchino.Widgets.Text ยท Assembly: Arlecchino

A line being typed into, cut into the runs it is drawn as: what is plain, what is selected, and the symbol the caret stands on. The caret is written the other way round rather than wedged beside it.

public static class EntryRuns

Methodsโ€‹

MemberSummary
Of(string, int, ValueTuple<int, int>, EntryLook, Action<string, IArlecchinoColor>)Hands every run of the line to whoever is drawing it, left to right.

Methods in detailโ€‹

Of(string, int, ValueTuple<int, int>, EntryLook, Action<string, IArlecchinoColor>)โ€‹

public static void Of(
string text,
int caret,
ValueTuple<int, int> selection,
EntryLook look,
Action<string, IArlecchinoColor> write);

Hands every run of the line to whoever is drawing it, left to right.

Parameters

NameTypeDescription
textstringThe line as it is written, which for a secret is the dots.
caretintWhere the caret is in it, or -1 for a line that is not being typed into.
selectionValueTuple<T1, T2><int, int>Where the selection starts and ends in it.
lookEntryLookThe colors to write it in.
writeAction<T1, T2><string, IArlecchinoColor>Takes one run: what it says, and how it is written.