Skip to main content

EntryKeys class

Namespace: Arlecchino.Editing · Assembly: Arlecchino

Every key a line of text answers to, in the order they are read: the clipboard, the selection, the caret, then rubbing out. Whatever is typed into is offered these, so a filter is edited the way a field is.

public static class EntryKeys

Methods

MemberSummary
Clipped(ITextEntry, ArlecchinoKeymap, Action<string>, KeyPress)Copying and cutting. Copying takes the selection where there is one and the whole line where there is not; cutting takes the selection alone, since cutting a line nothing is selected on means nothing.
Handled(ITextEntry, ArlecchinoKeymap, Action<string>, KeyPress)Does what the key says to the line.

Methods in detail

Clipped(ITextEntry, ArlecchinoKeymap, Action<string>, KeyPress)

public static bool Clipped(
ITextEntry entry,
ArlecchinoKeymap keymap,
Action<string> copy,
KeyPress key);

Copying and cutting. Copying takes the selection where there is one and the whole line where there is not; cutting takes the selection alone, since cutting a line nothing is selected on means nothing.

Parameters

NameTypeDescription
entryITextEntryThe line being edited.
keymapArlecchinoKeymapThe keys the application obeys.
copyAction<T><string>Puts text on the clipboard.
keyKeyPressThe key that arrived.

Returns booltrue when the key was one of these and has been dealt with.

Handled(ITextEntry, ArlecchinoKeymap, Action<string>, KeyPress)

public static bool Handled(
ITextEntry entry,
ArlecchinoKeymap keymap,
Action<string> copy,
KeyPress key);

Does what the key says to the line.

Parameters

NameTypeDescription
entryITextEntryThe line being edited.
keymapArlecchinoKeymapThe keys the application obeys.
copyAction<T><string>Puts text on the clipboard, for when the line is copied or cut.
keyKeyPressThe key that arrived.

Returns booltrue when the key was one of these and has been dealt with.