wip: big flat pt.2: extract engine crate

This commit is contained in:
🪞👃🪞 2024-12-30 17:54:30 +01:00
parent 4a3de618d0
commit a5628fb663
31 changed files with 1738 additions and 888 deletions

View file

@ -107,11 +107,13 @@ impl Default for MidiEditor {
}
has_size!(<Tui>|self: MidiEditor|&self.size);
render!(<Tui>|self: MidiEditor|{
self.autoscroll();
self.autozoom();
&self.mode
});
//render!(<Tui>|self: MidiEditor|lay!(|add|{add(&self.size)?;add(self.mode)}));//bollocks
pub trait PhraseViewMode: Render<Tui> + HasSize<Tui> + MidiRange + MidiPoint + Debug + Send + Sync {
@ -125,6 +127,12 @@ pub trait PhraseViewMode: Render<Tui> + HasSize<Tui> + MidiRange + MidiPoint + D
}
}
impl Content<Tui> for Box<dyn PhraseViewMode> {
fn content (&self) -> impl Render<Tui> {
Some(&(*self))
}
}
impl MidiView<Tui> for MidiEditor {}
impl TimeRange for MidiEditor {