ui/input: support single stepping through events

Change input.Events interface to return one event at a time until
the queue is empty.

Change text.Editor and gestures to match.

Re-add Editor.Submit while we're here; we don't want to enable
submit mode always.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-21 16:30:20 +02:00
parent 893b7f3c9f
commit b981ccf9ed
4 changed files with 28 additions and 9 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ package input
// Events maps an event handler key to the events
// available to the handler.
type Events interface {
For(k Key) []Event
Next(k Key) (Event, bool)
}
// Key is the stable identifier for an event handler. For a handler h, the