mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
wip: big flat pt.2: extract engine crate
This commit is contained in:
parent
4a3de618d0
commit
a5628fb663
31 changed files with 1738 additions and 888 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue