mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 13:16:44 +01:00
wip: reenable standalone sequencer
This commit is contained in:
parent
690a8e8f24
commit
0eb063db1c
7 changed files with 125 additions and 37 deletions
|
|
@ -25,6 +25,21 @@ impl Content for Arranger<Tui> {
|
|||
})
|
||||
}
|
||||
}
|
||||
/// Focusable items in standalone arranger.
|
||||
impl Focus<3, Tui> for Arranger<Tui> {
|
||||
fn focus (&self) -> usize {
|
||||
self.focus
|
||||
}
|
||||
fn focus_mut (&mut self) -> &mut usize {
|
||||
&mut self.focus
|
||||
}
|
||||
fn focusable (&self) -> [&dyn Focusable<Tui>;3] {
|
||||
focusables!(self.transport, self.arrangement, self.editor)
|
||||
}
|
||||
fn focusable_mut (&mut self) -> [&mut dyn Focusable<Tui>;3] {
|
||||
focusables_mut!(self.transport, self.arrangement, self.editor)
|
||||
}
|
||||
}
|
||||
/// Handle top-level events in standalone arranger.
|
||||
impl Handle<Tui> for Arranger<Tui> {
|
||||
fn handle (&mut self, from: &TuiInput) -> Perhaps<bool> {
|
||||
|
|
@ -73,21 +88,6 @@ impl Handle<Tui> for Arranger<Tui> {
|
|||
Ok(Some(true))
|
||||
}
|
||||
}
|
||||
/// Focusable items in standalone arranger.
|
||||
impl Focus<3, Tui> for Arranger<Tui> {
|
||||
fn focus (&self) -> usize {
|
||||
self.focus
|
||||
}
|
||||
fn focus_mut (&mut self) -> &mut usize {
|
||||
&mut self.focus
|
||||
}
|
||||
fn focusable (&self) -> [&dyn Focusable<Tui>;3] {
|
||||
focusables!(self.transport, self.arrangement, self.editor)
|
||||
}
|
||||
fn focusable_mut (&mut self) -> [&mut dyn Focusable<Tui>;3] {
|
||||
focusables_mut!(self.transport, self.arrangement, self.editor)
|
||||
}
|
||||
}
|
||||
impl Arranger<Tui> {
|
||||
pub fn rename_selected (&mut self) {
|
||||
let Arrangement { selected, ref name, ref tracks, ref scenes, .. } = self.arrangement;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue