Worked Propagator into basic.Container

This commit is contained in:
2023-03-04 01:20:23 -05:00
parent 56e11ae1de
commit 165d0835bf
2 changed files with 22 additions and 179 deletions

View File

@@ -23,7 +23,6 @@ type Propagator struct {
focused bool
onFocusRequest func () (granted bool)
onFocusMotionRequest func (input.KeynavDirection) (granted bool)
}
// NewPropagator creates a new event propagator that uses the specified parent
@@ -137,9 +136,7 @@ func (propagator *Propagator) OnFocusRequest (callback func () (granted bool)) {
// was granted, and false if it was not.
func (propagator *Propagator) OnFocusMotionRequest (
callback func (direction input.KeynavDirection) (granted bool),
) {
propagator.onFocusMotionRequest = callback
}
) { }
// HandleKeyDown propogates the keyboard event to the currently selected child.
func (propagator *Propagator) HandleKeyDown (key input.Key, modifiers input.Modifiers) {