2018-02-27 04:41:54 +01:00
|
|
|
package ui
|
|
|
|
|
|
|
|
import (
|
2018-06-01 09:58:00 +02:00
|
|
|
"github.com/gdamore/tcell"
|
2018-02-27 04:41:54 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
type Interactive interface {
|
|
|
|
// Returns true if the event was handled by this component
|
2018-06-01 09:58:00 +02:00
|
|
|
Event(event tcell.Event) bool
|
2018-02-27 04:41:54 +01:00
|
|
|
}
|
2018-02-27 04:54:39 +01:00
|
|
|
|
|
|
|
type Simulator interface {
|
|
|
|
// Queues up the given input events for simulation
|
2018-06-01 09:58:00 +02:00
|
|
|
Simulate(events []tcell.Event)
|
2018-02-27 04:54:39 +01:00
|
|
|
}
|
2018-02-28 03:17:26 +01:00
|
|
|
|
|
|
|
type DrawableInteractive interface {
|
|
|
|
Drawable
|
|
|
|
Interactive
|
|
|
|
}
|