Skip to main content

InputRouter class

Namespace: Arlecchino · Assembly: Arlecchino

Decides who gets a key or a mouse event, in order: an open dialog, the palette key, the view's commands, the commands available everywhere, then the view. A handler that throws is reported on the output line.

public class InputRouter

Methods

MemberSummary
ProcessKey(KeyPress)Routes one key press and asks for a frame, whether anything took it.
ProcessMouse(MouseEvent)Routes one mouse event and asks for a frame.
ProcessPaste(string)Routes a block of pasted text and asks for a frame. It goes wherever typing would, but as one edit rather than one per character.

Methods in detail

ProcessKey(KeyPress)

public void ProcessKey(KeyPress key);

Routes one key press and asks for a frame, whether anything took it.

Parameters

NameTypeDescription
keyKeyPressThe key that was pressed.

ProcessMouse(MouseEvent)

public void ProcessMouse(MouseEvent mouse);

Routes one mouse event and asks for a frame.

Parameters

NameTypeDescription
mouseMouseEventThe event that arrived.

ProcessPaste(string)

public void ProcessPaste(string text);

Routes a block of pasted text and asks for a frame. It goes wherever typing would, but as one edit rather than one per character.

Parameters

NameTypeDescription
textstringWhat was pasted.