wip: back to 89 errors

This commit is contained in:
🪞👃🪞 2025-05-14 15:16:43 +03:00
parent f3c67f95b5
commit 57eff50973
5 changed files with 27 additions and 40 deletions

View file

@ -79,20 +79,8 @@ handle!(TuiIn: |self: App, input|Ok(if let Some(command) = self.config.keys.comm
.transpose()?
.flatten())
}
fn scene (app: &mut App, command: SceneCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Scene{command})?)
}
fn track (app: &mut App, command: TrackCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Track{command})?)
}
fn input (app: &mut App, command: InputCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Input{command})?)
}
fn output (app: &mut App, command: OutputCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Output{command})?)
}
fn clip (app: &mut App, command: ClipCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Clip{command})?)
fn arrange (app: &mut App, command: ArrangementCommand) -> Perhaps<Self> {
Ok(command.delegate(app, |command|Self::Arrange{command})?)
}
fn clock (app: &mut App, command: ClockCommand) -> Perhaps<Self> {
Ok(command.execute(&mut app.clock)?.map(|command|Self::Clock{command}))

View file

@ -141,7 +141,7 @@ pub trait AutoRemove:
}
}
}
}
/// Various possible dialog overlays
#[derive(PartialEq, Clone, Copy, Debug)]
@ -180,6 +180,9 @@ has_editor!(|self: App|{
#[tengri_proc::expose]
impl App {
fn _todo_u16_stub (&self) -> u16 {
todo!()
}
fn _todo_isize_stub (&self) -> isize {
todo!()
}

View file

@ -17,7 +17,7 @@ impl App {
pub fn view_status (&self) -> impl Content<TuiOut> + use<'_> {
self.update_clock();
let cache = self.view_cache.read().unwrap();
view_status(self.selected.describe(&self.tracks, &self.scenes),
view_status(self.selected.describe(self.tracks(), self.scenes()),
cache.sr.view.clone(), cache.buf.view.clone(), cache.lat.view.clone())
}
pub fn view_transport (&self) -> impl Content<TuiOut> + use<'_> {
@ -54,24 +54,24 @@ impl App {
self.sampler().map(|s|s.view_meters_output())
}
pub fn view_dialog (&self) -> impl Content<TuiOut> + use<'_> {
When(app.dialog.is_some(), Bsp::b( "",
When(self.dialog.is_some(), Bsp::b( "",
Fixed::xy(70, 23, Tui::fg_bg(Rgb(255,255,255), Rgb(16,16,16), Bsp::b(
Repeat(" "), Outer(true, Style::default().fg(Tui::g(96)))
.enclose(app.dialog.as_ref().map(|dialog|match dialog {
.enclose(self.dialog.as_ref().map(|dialog|match dialog {
Dialog::Menu =>
app.view_dialog_menu().boxed(),
self.view_dialog_menu().boxed(),
Dialog::Help =>
app.view_dialog_help().boxed(),
Dialog::Save =>
app.view_dialog_save().boxed(),
Dialog::Load =>
app.view_dialog_load().boxed(),
self.view_dialog_help().boxed(),
Dialog::Save(browser) =>
self.view_dialog_save().boxed(),
Dialog::Load(browser) =>
self.view_dialog_load().boxed(),
Dialog::Options =>
app.view_dialog_options().boxed(),
self.view_dialog_options().boxed(),
Dialog::Device(index) =>
app.view_dialog_device(*index).boxed(),
self.view_dialog_device(*index).boxed(),
Dialog::Message(message) =>
app.view_dialog_message(message).boxed(),
self.view_dialog_message(message).boxed(),
}))
)))
))