justinDeu / chatty

0 stars 1 forks source link

Focus Change Hooks #14

Closed justinDeu closed 2 months ago

justinDeu commented 2 months ago

Add hooks to the Component trait that will be called when the Component gains and loses focus. These should be called inside the AppRouter on the different key binds which change the focused area.

justinDeu commented 2 months ago

AppRouter is a Component itself, so how would that work? The new functions can have default implementations that do nothing or should there be another, separate trait that only handles being focus-able that way the AppRouter doesn't have to worry about itself.