tui/events.go

13 lines
456 B
Go
Raw Permalink Normal View History

2021-01-10 21:52:29 +01:00
package tui
type Events interface {
2022-04-02 13:01:41 +02:00
// 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
2022-04-01 20:10:51 +02:00
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)
2021-01-10 21:52:29 +01:00
}