Skip to main content

EntryRow class

Namespace: Arlecchino.Widgets.Text · Assembly: Arlecchino

A line being typed into, drawn on one row of the screen: a filter, a search, a field an application draws for itself. Text longer than the room it is given scrolls, so the caret is always on the screen.

public static class EntryRow

Methods

MemberSummary
Draw(SurfaceRegion, int, int, int, ITextEntry, EntryLook)Draws the line, scrolled to keep the caret in view.
Draw(SurfaceRegion, int, int, int, string, int, ValueTuple<int, int>, EntryLook)Draws a line that is written as something other than itself, which is what a secret comes to: the dots, the caret and the selection are all counted in what is shown rather than in what was typed.

Methods in detail

Draw(SurfaceRegion, int, int, int, ITextEntry, EntryLook)

public static int Draw(
SurfaceRegion region,
int row,
int column,
int width,
ITextEntry entry,
EntryLook look);

Draws the line, scrolled to keep the caret in view.

Parameters

NameTypeDescription
regionSurfaceRegionThe region to draw on.
rowintWhich row of it.
columnintWhich column the text starts at.
widthintHow many columns it is drawn in, the caret included.
entryITextEntryThe line being edited.
lookEntryLookThe colors to write it in.

Returns int — How many columns were written.

Draw(SurfaceRegion, int, int, int, string, int, ValueTuple<int, int>, EntryLook)

public static int Draw(
SurfaceRegion region,
int row,
int column,
int width,
string text,
int caret,
ValueTuple<int, int> selection,
EntryLook look);

Draws a line that is written as something other than itself, which is what a secret comes to: the dots, the caret and the selection are all counted in what is shown rather than in what was typed.

Parameters

NameTypeDescription
regionSurfaceRegionThe region to draw on.
rowintWhich row of it.
columnintWhich column the text starts at.
widthintHow many columns it is drawn in, the caret included.
textstringWhat to write.
caretintWhere the caret is in it.
selectionValueTuple<T1, T2><int, int>Where the selection starts and ends in it.
lookEntryLookThe colors to write it in.

Returns int — How many columns were written.