mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
apply command! in arranger (8456l)
This commit is contained in:
parent
623fce73a4
commit
417b097c6f
1 changed files with 20 additions and 37 deletions
|
|
@ -124,10 +124,9 @@ audio!(|self: ArrangerTui, client, scope|{
|
||||||
Phrases(PhrasesCommand),
|
Phrases(PhrasesCommand),
|
||||||
Editor(PhraseCommand),
|
Editor(PhraseCommand),
|
||||||
}
|
}
|
||||||
impl Command<ArrangerTui> for ArrangerCommand {
|
command!(|self:ArrangerCommand,state:ArrangerTui|{
|
||||||
fn execute (self, state: &mut ArrangerTui) -> Perhaps<Self> {
|
|
||||||
use ArrangerCommand::*;
|
use ArrangerCommand::*;
|
||||||
Ok(match self {
|
match self {
|
||||||
Focus(cmd) => cmd.execute(state)?.map(Focus),
|
Focus(cmd) => cmd.execute(state)?.map(Focus),
|
||||||
Scene(cmd) => cmd.execute(state)?.map(Scene),
|
Scene(cmd) => cmd.execute(state)?.map(Scene),
|
||||||
Track(cmd) => cmd.execute(state)?.map(Track),
|
Track(cmd) => cmd.execute(state)?.map(Track),
|
||||||
|
|
@ -141,27 +140,11 @@ impl Command<ArrangerTui> for ArrangerCommand {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
_ => { todo!() }
|
_ => { todo!() }
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
impl Command<ArrangerTui> for ArrangerSceneCommand {
|
command!(|self:ArrangerSceneCommand,_state:ArrangerTui|None);
|
||||||
fn execute (self, _state: &mut ArrangerTui) -> Perhaps<Self> {
|
command!(|self:ArrangerTrackCommand,_state:ArrangerTui|None);
|
||||||
//todo!();
|
command!(|self:ArrangerClipCommand, _state:ArrangerTui|None);
|
||||||
Ok(None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl Command<ArrangerTui> for ArrangerTrackCommand {
|
|
||||||
fn execute (self, _state: &mut ArrangerTui) -> Perhaps<Self> {
|
|
||||||
//todo!();
|
|
||||||
Ok(None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl Command<ArrangerTui> for ArrangerClipCommand {
|
|
||||||
fn execute (self, _state: &mut ArrangerTui) -> Perhaps<Self> {
|
|
||||||
//todo!();
|
|
||||||
Ok(None)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pub trait ArrangerControl: TransportControl<ArrangerFocus> {
|
pub trait ArrangerControl: TransportControl<ArrangerFocus> {
|
||||||
fn selected (&self) -> ArrangerSelection;
|
fn selected (&self) -> ArrangerSelection;
|
||||||
fn selected_mut (&mut self) -> &mut ArrangerSelection;
|
fn selected_mut (&mut self) -> &mut ArrangerSelection;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue