mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: refactor pt.7, 198 errors yay
This commit is contained in:
parent
869d92110d
commit
a1818a8504
6 changed files with 45 additions and 48 deletions
|
|
@ -27,12 +27,12 @@ pub struct ArrangerApp<E: Engine> {
|
|||
/// Width and height of app at last render
|
||||
pub size: Measure<E>,
|
||||
/// Menu bar
|
||||
pub menu: MenuBar<E, Self, ArrangerCommand>,
|
||||
pub menu: MenuBar<E, Self, ArrangerAppCommand>,
|
||||
/// Command history
|
||||
pub history: Vec<ArrangerCommand>,
|
||||
pub history: Vec<ArrangerAppCommand>,
|
||||
}
|
||||
|
||||
impl Audio for ArrangerApp {
|
||||
impl<E: Engine> Audio for ArrangerApp<E> {
|
||||
fn process (&mut self, client: &Client, scope: &ProcessScope) -> Control {
|
||||
if let Some(ref transport) = self.transport {
|
||||
transport.write().unwrap().process(client, scope);
|
||||
|
|
@ -63,7 +63,7 @@ impl Audio for ArrangerApp {
|
|||
}
|
||||
|
||||
/// Layout for standalone arranger app.
|
||||
impl Content for ArrangerApp {
|
||||
impl Content for ArrangerApp<Tui> {
|
||||
type Engine = Tui;
|
||||
fn content (&self) -> impl Widget<Engine = Tui> {
|
||||
let focused = self.arrangement.focused;
|
||||
|
|
@ -129,7 +129,7 @@ impl<E: Engine> ArrangerApp<E> {
|
|||
Arc::new(TransportTime::default())
|
||||
},
|
||||
menu: {
|
||||
use ArrangerCommand::*;
|
||||
use ArrangerAppCommand::*;
|
||||
MenuBar::new()
|
||||
.add({
|
||||
use ArrangementCommand::*;
|
||||
|
|
@ -139,7 +139,7 @@ impl<E: Engine> ArrangerApp<E> {
|
|||
.cmd("s", "Save project", Arrangement(Save))
|
||||
})
|
||||
.add({
|
||||
use TransportCommand::*;
|
||||
use TransportAppCommand::*;
|
||||
Menu::new("Transport")
|
||||
.cmd("p", "Play", Transport(Play))
|
||||
.cmd("s", "Play from start", Transport(PlayFromStart))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue