separate Input and Output impls

This commit is contained in:
🪞👃🪞 2025-01-05 22:01:54 +01:00
parent a6efde40f8
commit 0e821e098f
77 changed files with 465 additions and 454 deletions

View file

@ -104,7 +104,7 @@ impl Content for Demo<Tui> {
}
}
impl Handle<Tui> for Demo<Tui> {
impl Handle<TuiIn> for Demo<Tui> {
fn handle (&mut self, from: &TuiIn) -> Perhaps<bool> {
use KeyCode::{PageUp, PageDown};
match from.event() {

View file

@ -1,19 +0,0 @@
use tek::*;
use std::sync::{Arc, RwLock};
fn main () -> Usually<()> {
Tui::run(Arc::new(RwLock::new(BspDemo(Default::default()))))?;
Ok(())
}
pub struct BspDemo<E: Engine>(std::marker::PhantomData<E>);
render!(<Tui>|self:BspDemo<Tui>|Fill::xy(Align::c(
Bsp::n(Bsp::s(Bsp::e(Bsp::w("00", "11"), "22"), "33"), "44")
)));
impl Handle<Tui> for BspDemo<Tui> {
fn handle (&mut self, from: &TuiIn) -> Perhaps<bool> {
Ok(None)
}
}