mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
dsl_ns!
This commit is contained in:
parent
72975c861a
commit
525ed15466
5 changed files with 643 additions and 665 deletions
|
|
@ -1,127 +1,110 @@
|
|||
use crate::*;
|
||||
pub(crate) use std::marker::PhantomData;
|
||||
content!(TuiOut:|self: App|"kyp");//VIEW.content(self, "(bg :color/black (fill/xy (bsp/a overlay content)))"));
|
||||
struct DslView<'s, O: Output, T> {
|
||||
symbol: &'s str,
|
||||
callback: Option<for<'t> fn (&'t T) -> Box<dyn Render<O> + 't>>,
|
||||
next: Option<&'s Self>
|
||||
}
|
||||
pub const VIEW: DslView<'static, TuiOut, App> = DslView::new()
|
||||
.def("browser", view_browser)
|
||||
.def("content", view_content)
|
||||
.def("device", view_device)
|
||||
.def("menu", view_menu)
|
||||
//.def("options", view_options)
|
||||
.def("overlay", view_overlay);
|
||||
impl<'s, O: Output, T> DslView<'s, O, T> {
|
||||
pub const fn new () -> Self {
|
||||
DslView { symbol: "", callback: None, next: None }
|
||||
}
|
||||
pub const fn def (
|
||||
&'static self,
|
||||
symbol: &'static str,
|
||||
callback: fn (&T) -> Box<dyn Render<O> + '_>
|
||||
) -> Self {
|
||||
DslView { symbol, callback: Some(callback), next: Some(self) }
|
||||
}
|
||||
pub fn content <'t> (
|
||||
&'static self, state: &'t T, src: impl Dsl) -> Usually<Box<dyn Render<O> + 't>> {
|
||||
Ok(if src.sym()? == Some(self.symbol) && let Some(callback) = self.callback {
|
||||
callback(&state)
|
||||
} else if let Some(next) = self.next {
|
||||
next.content(state, src)?
|
||||
} else {
|
||||
return Err("DslView::content: undefined".into())
|
||||
})
|
||||
}
|
||||
//fn render (&self, state: &T, output: &mut O, src: impl Dsl) -> Usually<()> {
|
||||
//Ok(if src.sym()? == Some(self.0) && let Some(callback) = self.1 {
|
||||
//let view = callback(&state);
|
||||
//output.place(output.area(), &view)
|
||||
//} else if let Some(next) = self.2 {
|
||||
//next.render(state, output, src)?
|
||||
//} else {
|
||||
//return Err("DslView::render: undefined".into())
|
||||
//})
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
fn view_content (app: &App) -> Box<dyn Render<TuiOut> + '_> {
|
||||
Fill::xy(ErrorBoundary::new(Ok(Some("·")))).boxed()
|
||||
}
|
||||
fn view_overlay <'s> (state: &'s App) -> Box<dyn Render<TuiOut> + 's> {
|
||||
match &state.dialog {
|
||||
Dialog::Menu(_) => view_menu(state),
|
||||
Dialog::Device(_) => view_device(state),
|
||||
Dialog::Browser(_, _) => view_browser(state),
|
||||
//Dialog::Help(_) => view_help,
|
||||
//Dialog::Message(_) => view_message,
|
||||
//Dialog::Options => view_options,
|
||||
_ => unimplemented!()
|
||||
content!(TuiOut:|self: App|VIEW[":view"](self));//if let Ok(Some(view)) = VIEW[":view"] { view(self) } else { panic!() });
|
||||
struct DslNs<'t, T: 't>(&'t [(&'t str, T)]);
|
||||
type DslCb = fn (&App) -> Box<dyn Render<TuiOut>>;
|
||||
impl<'t, D: Dsl> std::ops::Index<D> for DslNs<'t, DslCb> {
|
||||
type Output = DslCb;
|
||||
fn index (&self, index: D) -> &Self::Output {
|
||||
if let Ok(Some(symbol)) = index.src() {
|
||||
for (key, value) in self.0.iter() {
|
||||
if symbol == *key {
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
&(view_nil as DslCb)
|
||||
}
|
||||
}
|
||||
fn wrap_dialog <'s> (dialog: impl Content<TuiOut> + 's) -> impl Content<TuiOut> + 's {
|
||||
pub const VIEW: DslNs<'static, DslCb> = DslNs(&[
|
||||
(":view", |state|VIEW[":view/content"](state)),
|
||||
(":view/content", |state|Fill::xy(ErrorBoundary::new(Ok(Some("·")))).boxed()),
|
||||
(":view/overlay", |state|{
|
||||
match &state.dialog {
|
||||
Dialog::Menu(_) => VIEW[":view/menu"](state),
|
||||
Dialog::Device(_) => VIEW[":view/device"](state),
|
||||
Dialog::Browser(_, _) => VIEW[":view/browser"](state),
|
||||
//Dialog::Help(_) => view_help,
|
||||
//Dialog::Message(_) => view_message,
|
||||
//Dialog::Options => view_options,
|
||||
_ => unimplemented!()
|
||||
}
|
||||
}),
|
||||
(":view/browser", |state|{
|
||||
let browser = state.dialog.browser().cloned().unwrap();
|
||||
let target = state.dialog.browser_target().unwrap();
|
||||
Box::new(Bsp::s(
|
||||
Padding::xy(3, 1, Fill::x(Align::w(FieldV(
|
||||
Default::default(),
|
||||
match target {
|
||||
BrowserTarget::SaveProject => "Save project:",
|
||||
BrowserTarget::LoadProject => "Load project:",
|
||||
BrowserTarget::ImportSample(_) => "Import sample:",
|
||||
BrowserTarget::ExportSample(_) => "Export sample:",
|
||||
BrowserTarget::ImportClip(_) => "Import clip:",
|
||||
BrowserTarget::ExportClip(_) => "Export clip:",
|
||||
},
|
||||
Shrink::x(3, Fixed::y(1, Tui::fg(Tui::g(96), RepeatH("🭻")))))))),
|
||||
Outer(true, Style::default().fg(Tui::g(96)))
|
||||
.enclose(Fill::xy(browser))))
|
||||
}),
|
||||
(":view/device", |state|{
|
||||
let selected = state.dialog.device_selected().unwrap();
|
||||
Box::new(Bsp::s(Tui::bold(true, "Add device"), Map::south(1,
|
||||
move||device_kinds().iter(),
|
||||
move|label: &&'static str, i|{
|
||||
let bg = if i == selected { Rgb(64,128,32) } else { Rgb(0,0,0) };
|
||||
let lb = if i == selected { "[ " } else { " " };
|
||||
let rb = if i == selected { " ]" } else { " " };
|
||||
Fill::x(Tui::bg(bg, Bsp::e(lb, Bsp::w(rb, "FIXME device name"))))
|
||||
})))
|
||||
}),
|
||||
(":view/menu", |state|{
|
||||
let views = state.config.views.clone();
|
||||
let selected = state.dialog.menu_selected();
|
||||
Box::new(Tui::bg(Rgb(0,0,0), Bsp::s(
|
||||
Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), Tui::bold(true, "tek 0.3.0-rc0")))),
|
||||
Bsp::n(
|
||||
Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), Bsp::e(Tui::fg(Rgb(255,192,48), "[Enter]"), " new session")))),
|
||||
Fill::y(Align::n(Fill::x(Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
////let options = ||["Projects", "Settings", "Help", "Quit"].iter();
|
||||
////let option = |a,i|Tui::fg(Rgb(255,255,255), format!("{}", a));
|
||||
////Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
|
||||
for (index, (id, profile)) in views.read().unwrap().iter().enumerate() {
|
||||
let bg = if index == 0 { Rgb(64,64,64) } else { Rgb(32,32,32) };
|
||||
let name = profile.name.as_ref().map(|x|unquote(unquote(x.as_ref())));
|
||||
let info = profile.info.as_ref().map(|x|unquote(unquote(x.as_ref())));
|
||||
add(&Fixed::y(3, Tui::bg(bg, Bsp::s(
|
||||
Fill::x(Bsp::a(
|
||||
Fill::x(Align::w(Tui::fg(Rgb(224,192,128), name))),
|
||||
Fill::x(Align::e(Tui::fg(Rgb(224,128,32), &id)))
|
||||
)),
|
||||
Fill::x(Align::w(info)))))); } }))))))))
|
||||
}),
|
||||
//(":view/options", view_options),
|
||||
]);
|
||||
fn view_nil (_: &App) -> Box<dyn Render<TuiOut>> {
|
||||
"nil".boxed()
|
||||
}
|
||||
fn wrap_dialog (dialog: impl Content<TuiOut>) -> impl Content<TuiOut> {
|
||||
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(dialog))))
|
||||
}
|
||||
fn wrap_dialog_menu <'a> (content: impl Content<TuiOut> + 'a) -> Box<dyn Render<TuiOut> + 'a> {
|
||||
Box::new(Tui::bg(Rgb(0,0,0), Bsp::s(
|
||||
Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), Tui::bold(true, "tek 0.3.0-rc0")))),
|
||||
Bsp::n(
|
||||
Fill::x(Fixed::y(3, Tui::bg(Rgb(33,33,33), Bsp::e(Tui::fg(Rgb(255,192,48), "[Enter]"), " new session")))),
|
||||
Fill::y(Align::n(Fill::x(content)))))))
|
||||
}
|
||||
fn view_menu <'s> (state: &'s App) -> Box<dyn Render<TuiOut> + 's> {
|
||||
let views = state.config.views.clone();
|
||||
let selected = state.dialog.menu_selected();
|
||||
wrap_dialog_menu(Stack::south(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
////let options = ||["Projects", "Settings", "Help", "Quit"].iter();
|
||||
////let option = |a,i|Tui::fg(Rgb(255,255,255), format!("{}", a));
|
||||
////Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
|
||||
for (index, (id, profile)) in views.read().unwrap().iter().enumerate() {
|
||||
let bg = if index == 0 { Rgb(64,64,64) } else { Rgb(32,32,32) };
|
||||
let name = profile.name.as_ref().map(|x|unquote(unquote(x.as_ref())));
|
||||
let info = profile.info.as_ref().map(|x|unquote(unquote(x.as_ref())));
|
||||
add(&Fixed::y(3, Tui::bg(bg, Bsp::s(
|
||||
Fill::x(Bsp::a(
|
||||
Fill::x(Align::w(Tui::fg(Rgb(224,192,128), name))),
|
||||
Fill::x(Align::e(Tui::fg(Rgb(224,128,32), &id)))
|
||||
)),
|
||||
Fill::x(Align::w(info)))))); } }))
|
||||
}
|
||||
fn view_browser <'s> (state: &'s App) -> Box<dyn Render<TuiOut> + 's> {
|
||||
let target = &state.dialog.browser_target().clone().unwrap();
|
||||
Box::new(Bsp::s(
|
||||
Padding::xy(3, 1, Fill::x(Align::w(FieldV(
|
||||
Default::default(),
|
||||
match &target {
|
||||
BrowserTarget::SaveProject => "Save project:",
|
||||
BrowserTarget::LoadProject => "Load project:",
|
||||
BrowserTarget::ImportSample(_) => "Import sample:",
|
||||
BrowserTarget::ExportSample(_) => "Export sample:",
|
||||
BrowserTarget::ImportClip(_) => "Import clip:",
|
||||
BrowserTarget::ExportClip(_) => "Export clip:",
|
||||
},
|
||||
Shrink::x(3, Fixed::y(1, Tui::fg(Tui::g(96), RepeatH("🭻")))))))),
|
||||
Outer(true, Style::default().fg(Tui::g(96)))
|
||||
.enclose(Fill::xy(state.dialog.browser()))))
|
||||
}
|
||||
fn view_device <'s> (state: &'s App) -> Box<dyn Render<TuiOut> + 's> {
|
||||
let selected = state.dialog.device_selected().unwrap();
|
||||
Box::new(Bsp::s(Tui::bold(true, "Add device"), Map::south(1,
|
||||
move||device_kinds().iter(),
|
||||
move|label: &&'static str, i|
|
||||
Fill::x(Tui::bg(if i == selected { Rgb(64,128,32) } else { Rgb(0,0,0) },
|
||||
Bsp::e(if i == state.dialog.device_selected().unwrap() { "[ " } else { " " },
|
||||
Bsp::w(if i == state.dialog.device_selected().unwrap() { " ]" } else { " " },
|
||||
"FIXME device name")))))))
|
||||
impl ScenesView for App {
|
||||
fn h_scenes (&self) -> u16 {
|
||||
(self.height() as u16).saturating_sub(20)
|
||||
}
|
||||
fn w_side (&self) -> u16 {
|
||||
20
|
||||
}
|
||||
fn w_mid (&self) -> u16 {
|
||||
(self.width() as u16).saturating_sub(self.w_side())
|
||||
}
|
||||
}
|
||||
|
||||
//Bsp::s("",
|
||||
//Map::south(1,
|
||||
//move||app.config.binds.layers.iter()
|
||||
//.filter_map(|a|(a.0)(app).then_some(a.1))
|
||||
//move||state.config.binds.layers.iter()
|
||||
//.filter_map(|a|(a.0)(state).then_some(a.1))
|
||||
//.flat_map(|a|a)
|
||||
//.filter_map(|x|if let Value::Exp(_, iter)=x.value{ Some(iter) } else { None })
|
||||
//.skip(offset)
|
||||
|
|
@ -157,3 +140,179 @@ fn view_device <'s> (state: &'s App) -> Box<dyn Render<TuiOut> + 's> {
|
|||
////Outer(true, Style::default().fg(Tui::g(96)))
|
||||
////.enclose(Fill::xy(browser)))
|
||||
//},
|
||||
//
|
||||
//pub fn view_meters_input (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|
|
||||
//s.view_meters_input())
|
||||
//}
|
||||
//pub fn view_meters_output (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|
|
||||
//s.view_meters_output())
|
||||
//}
|
||||
//pub fn view_history (&self) -> impl Content<TuiOut> {
|
||||
//Fixed::y(1, Fill::x(Align::w(FieldH(self.color,
|
||||
//format!("History ({})", self.history.len()),
|
||||
//self.history.last().map(|last|Fill::x(Align::w(format!("{:?}", last.0))))))))
|
||||
//}
|
||||
//pub fn view_status_h2 (&self) -> impl Content<TuiOut> {
|
||||
//self.update_clock();
|
||||
//let theme = self.color;
|
||||
//let clock = self.clock();
|
||||
//let playing = clock.is_rolling();
|
||||
//let cache = clock.view_cache.clone();
|
||||
////let selection = self.selection().describe(self.tracks(), self.scenes());
|
||||
//let hist_len = self.history.len();
|
||||
//let hist_last = self.history.last();
|
||||
//Fixed::y(2, Stack::east(move|add: &mut dyn FnMut(&dyn Render<TuiOut>)|{
|
||||
//add(&Fixed::x(5, Tui::bg(if playing { Rgb(0, 128, 0) } else { Rgb(128, 64, 0) },
|
||||
//Either::new(false, // TODO
|
||||
//Thunk::new(move||Fixed::x(9, Either::new(playing,
|
||||
//Tui::fg(Rgb(0, 255, 0), " PLAYING "),
|
||||
//Tui::fg(Rgb(255, 128, 0), " STOPPED ")))
|
||||
//),
|
||||
//Thunk::new(move||Fixed::x(5, Either::new(playing,
|
||||
//Tui::fg(Rgb(0, 255, 0), Bsp::s(" 🭍🭑🬽 ", " 🭞🭜🭘 ",)),
|
||||
//Tui::fg(Rgb(255, 128, 0), Bsp::s(" ▗▄▖ ", " ▝▀▘ ",))))
|
||||
//)
|
||||
//)
|
||||
//)));
|
||||
//add(&" ");
|
||||
//{
|
||||
//let cache = cache.read().unwrap();
|
||||
//add(&Fixed::x(15, Align::w(Bsp::s(
|
||||
//FieldH(theme, "Beat", cache.beat.view.clone()),
|
||||
//FieldH(theme, "Time", cache.time.view.clone()),
|
||||
//))));
|
||||
//add(&Fixed::x(13, Align::w(Bsp::s(
|
||||
//Fill::x(Align::w(FieldH(theme, "BPM", cache.bpm.view.clone()))),
|
||||
//Fill::x(Align::w(FieldH(theme, "SR ", cache.sr.view.clone()))),
|
||||
//))));
|
||||
//add(&Fixed::x(12, Align::w(Bsp::s(
|
||||
//Fill::x(Align::w(FieldH(theme, "Buf", cache.buf.view.clone()))),
|
||||
//Fill::x(Align::w(FieldH(theme, "Lat", cache.lat.view.clone()))),
|
||||
//))));
|
||||
////add(&Bsp::s(
|
||||
//////Fill::x(Align::w(FieldH(theme, "Selected", Align::w(selection)))),
|
||||
////Fill::x(Align::w(FieldH(theme, format!("History ({})", hist_len),
|
||||
////hist_last.map(|last|Fill::x(Align::w(format!("{:?}", last.0))))))),
|
||||
////""
|
||||
////));
|
||||
//////if let Some(last) = self.history.last() {
|
||||
//////add(&FieldV(theme, format!("History ({})", self.history.len()),
|
||||
//////Fill::x(Align::w(format!("{:?}", last.0)))));
|
||||
//////}
|
||||
//}
|
||||
//}))
|
||||
//}
|
||||
//pub fn view_status_v (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.update_clock();
|
||||
//let cache = self.project.clock.view_cache.read().unwrap();
|
||||
//let theme = self.color;
|
||||
//let playing = self.clock().is_rolling();
|
||||
//Tui::bg(theme.darker.rgb, Fixed::xy(20, 5, Outer(true, Style::default().fg(Tui::g(96))).enclose(
|
||||
//col!(
|
||||
//Fill::x(Align::w(Bsp::e(
|
||||
//Align::w(Tui::bg(if playing { Rgb(0, 128, 0) } else { Rgb(128, 64, 0) },
|
||||
//Either::new(false, // TODO
|
||||
//Thunk::new(move||Fixed::x(9, Either::new(playing,
|
||||
//Tui::fg(Rgb(0, 255, 0), " PLAYING "),
|
||||
//Tui::fg(Rgb(255, 128, 0), " STOPPED ")))
|
||||
//),
|
||||
//Thunk::new(move||Fixed::x(5, Either::new(playing,
|
||||
//Tui::fg(Rgb(0, 255, 0), Bsp::s(" 🭍🭑🬽 ", " 🭞🭜🭘 ",)),
|
||||
//Tui::fg(Rgb(255, 128, 0), Bsp::s(" ▗▄▖ ", " ▝▀▘ ",))))
|
||||
//)
|
||||
//)
|
||||
//)),
|
||||
//Bsp::s(
|
||||
//FieldH(theme, "Beat", cache.beat.view.clone()),
|
||||
//FieldH(theme, "Time", cache.time.view.clone()),
|
||||
//),
|
||||
//))),
|
||||
//Fill::x(Align::w(FieldH(theme, "BPM", cache.bpm.view.clone()))),
|
||||
//Fill::x(Align::w(FieldH(theme, "SR ", cache.sr.view.clone()))),
|
||||
//Fill::x(Align::w(FieldH(theme, "Buf", Bsp::e(cache.buf.view.clone(), Bsp::e(" = ", cache.lat.view.clone()))))),
|
||||
//))))
|
||||
//}
|
||||
//pub fn view_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.update_clock();
|
||||
//let cache = self.project.clock.view_cache.read().unwrap();
|
||||
//view_status(Some(self.project.selection.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<'_> {
|
||||
//self.update_clock();
|
||||
//let cache = self.project.clock.view_cache.read().unwrap();
|
||||
//view_transport(self.project.clock.is_rolling(),
|
||||
//cache.bpm.view.clone(), cache.beat.view.clone(), cache.time.view.clone())
|
||||
//}
|
||||
//pub fn view_editor (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//let bg = self.editor()
|
||||
//.and_then(|editor|editor.clip().clone())
|
||||
//.map(|clip|clip.read().unwrap().color.darker)
|
||||
//.unwrap_or(self.color.darker);
|
||||
//Fill::xy(Tui::bg(bg.rgb, self.editor()))
|
||||
//}
|
||||
//pub fn view_editor_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.editor().map(|e|Fixed::x(20, Outer(true, Style::default().fg(Tui::g(96))).enclose(
|
||||
//Fill::y(Align::n(Bsp::s(e.clip_status(), e.edit_status()))))))
|
||||
//}
|
||||
//pub fn view_midi_ins_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_midi_ins_status(self.color)
|
||||
//}
|
||||
//pub fn view_midi_outs_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_midi_outs_status(self.color)
|
||||
//}
|
||||
//pub fn view_audio_ins_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_audio_ins_status(self.color)
|
||||
//}
|
||||
//pub fn view_audio_outs_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_audio_outs_status(self.color)
|
||||
//}
|
||||
//pub fn view_scenes (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//Bsp::e(
|
||||
//Fixed::x(20, Align::nw(self.project.view_scenes_names())),
|
||||
//self.project.view_scenes_clips(),
|
||||
//)
|
||||
//}
|
||||
//pub fn view_scenes_names (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_scenes_names()
|
||||
//}
|
||||
//pub fn view_scenes_clips (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.view_scenes_clips()
|
||||
//}
|
||||
//pub fn view_tracks_inputs <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
|
||||
//Fixed::y(1 + self.project.midi_ins.len() as u16,
|
||||
//self.project.view_inputs(self.color))
|
||||
//}
|
||||
//pub fn view_tracks_outputs <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
|
||||
//self.project.view_outputs(self.color)
|
||||
//}
|
||||
//pub fn view_tracks_devices <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
|
||||
//Fixed::y(4, self.project.view_track_devices(self.color))
|
||||
//}
|
||||
//pub fn view_tracks_names <'a> (&'a self) -> impl Content<TuiOut> + use<'a> {
|
||||
//Fixed::y(2, self.project.view_track_names(self.color))
|
||||
//}
|
||||
//pub fn view_pool (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//Fixed::x(20, Bsp::s(
|
||||
//Fill::x(Align::w(FieldH(self.color, "Clip pool:", ""))),
|
||||
//Fill::y(Align::n(Tui::bg(Rgb(0, 0, 0), Outer(true, Style::default().fg(Tui::g(96)))
|
||||
//.enclose(PoolView(&self.pool)))))))
|
||||
//}
|
||||
//pub fn view_samples_keys (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|s.view_list(true, self.editor().unwrap()))
|
||||
//}
|
||||
//pub fn view_samples_grid (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|s.view_grid())
|
||||
//}
|
||||
//pub fn view_sample_viewer (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|s.view_sample(self.editor().unwrap().get_note_pos()))
|
||||
//}
|
||||
//pub fn view_sample_info (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|s.view_sample_info(self.editor().unwrap().get_note_pos()))
|
||||
//}
|
||||
//pub fn view_sample_status (&self) -> impl Content<TuiOut> + use<'_> {
|
||||
//self.project.sampler().map(|s|Outer(true, Style::default().fg(Tui::g(96))).enclose(
|
||||
//Fill::y(Align::n(s.view_sample_status(self.editor().unwrap().get_note_pos())))))
|
||||
//}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue