80e891a802
This is a simple mostly straight forward switch to tcell in favor of termbox. It uses the tcell native api (not the compat layer) but does not make use of most features. Further changes should include moving to tcell's views.TextArea and the general built in widget behaviour instead of the current ad hoc implementation. Regression: Cursor isn't shown in ex-line
20 lines
351 B
Go
20 lines
351 B
Go
package ui
|
|
|
|
import (
|
|
"github.com/gdamore/tcell"
|
|
)
|
|
|
|
type Interactive interface {
|
|
// Returns true if the event was handled by this component
|
|
Event(event tcell.Event) bool
|
|
}
|
|
|
|
type Simulator interface {
|
|
// Queues up the given input events for simulation
|
|
Simulate(events []tcell.Event)
|
|
}
|
|
|
|
type DrawableInteractive interface {
|
|
Drawable
|
|
Interactive
|
|
}
|