tui/events.go
2022-04-03 16:29:01 +02:00

13 lines
456 B
Go

package tui
type Events interface {
// OnKeyPressed is called every time a key or key-combination is pressed.
// If OnKeyPressed returns true, the event will not be passed onto child views
OnKeyPressed(event *KeyEvent) (consumed bool)
// OnMouseClicked is called every time a mouse button was pressed on the view.
// If OnMouseClicked returns true, the event will not be passed onto child views
OnMouseClicked(event *MouseEvent) (consumed bool)
}