blob: 661c45d776e2206773f494540dd75bd9b1812490 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
use tui::{backend::Backend, layout::Rect, Frame};
use crate::tuice::{DrawContext, Event, Status, TmpComponent};
/// A [`Component`] to handle keyboard shortcuts and assign actions to them.
///
/// Inspired by [Flutter's approach](https://docs.flutter.dev/development/ui/advanced/actions_and_shortcuts).
pub struct Shortcut {}
impl<Message> TmpComponent<Message> for Shortcut {
fn draw<B>(&mut self, _context: DrawContext<'_>, _frame: &mut Frame<'_, B>)
where
B: Backend,
{
todo!()
}
fn on_event(&mut self, _area: Rect, _event: Event, _messages: &mut Vec<Message>) -> Status {
Status::Ignored
}
}
|