mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
separate Input and Output impls
This commit is contained in:
parent
a6efde40f8
commit
0e821e098f
77 changed files with 465 additions and 454 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue