mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
wip: running interface in separate or combined mode
also disassociating render functions from state structs
This commit is contained in:
parent
f9218e887a
commit
d6bf840a1f
31 changed files with 905 additions and 532 deletions
39
src/mixer/_tui.rs
Normal file
39
src/mixer/_tui.rs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
use super::Mixer;
|
||||
|
||||
impl<W: Write> Input<TUI<W>, bool> for Mixer {
|
||||
fn handle (&mut self, engine: &mut TUI<W>) -> Result<Option<bool>> {
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
|
||||
impl<W: Write> Output<TUI<W>, [u16;2]> for Mixer {
|
||||
fn render (&self, envine: &mut TUI<W>) -> Result<Option<[u16;2]>> {
|
||||
|
||||
let tracks_table = Columns::new()
|
||||
.add(titles)
|
||||
.add(input_meters)
|
||||
.add(gains)
|
||||
.add(gain_meters)
|
||||
.add(pres)
|
||||
.add(pre_meters)
|
||||
.add(levels)
|
||||
.add(pans)
|
||||
.add(pan_meters)
|
||||
.add(posts)
|
||||
.add(routes)
|
||||
|
||||
Rows::new()
|
||||
.add(Columns::new()
|
||||
.add(Rows::new()
|
||||
.add("[Arrows]".bold())
|
||||
.add("Navigate"))
|
||||
.add(Rows::new()
|
||||
.add("[+/-]".bold())
|
||||
.add("Adjust"))
|
||||
.add(Rows::new()
|
||||
.add("[Ins/Del]".bold())
|
||||
.add("Add/remove track")))
|
||||
.add(tracks_table)
|
||||
.render(engine)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue