move expose/impose to tengri; wtf now!

This commit is contained in:
🪞👃🪞 2025-04-15 20:45:56 +03:00
parent 0257aa2b61
commit 1b253dc273
5 changed files with 48 additions and 75 deletions

View file

@ -53,7 +53,7 @@ impl<'a> Content<TuiOut> for ArrangerView<'a> {
}
impl<'a> ArrangerView<'a> {
fn new (app: &'a Tek) -> Self {
pub fn new (app: &'a Tek) -> Self {
Self {
app,
is_editing: app.is_editing(),
@ -199,34 +199,6 @@ impl Tek {
}
view!(TuiOut: |self: Tek| self.size.of(View(self, self.view)); {
//":inputs" => self.view_inputs().boxed(),
//":outputs" => self.view_outputs().boxed(),
//":scene-add" => self.view_scene_add().boxed(),
//":scenes" => self.view_scenes().boxed(),
//":tracks" => self.view_tracks().boxed(),
":nil" => Box::new("nil"),
":transport" => self.view_transport().boxed(),
":arranger" => ArrangerView::new(self).boxed(),
":editor" => self.editor.as_ref().map(|e|Bsp::e(e.clip_status(), e.edit_status())).boxed(),
":sample" => ().boxed(),//self.view_sample(self.is_editing()).boxed(),
":sampler" => ().boxed(),//self.view_sampler(self.is_editing(), &self.editor).boxed(),
":status" => self.view_status().boxed(),
":pool" => self.pool.as_ref()
.map(|pool|Fixed::x(self.w_sidebar(), PoolView(self.is_editing(), pool)))
.boxed(),
});
provide_num!(u16: |self: Tek| {
":h-ins" => self.h_inputs(),
":h-outs" => self.h_outputs(),
":h-sample" => if self.is_editing() { 0 } else { 5 },
":w-samples" => if self.is_editing() { 4 } else { 11 },
":w-sidebar" => self.w_sidebar(),
":y-ins" => (self.size.h() as u16).saturating_sub(self.h_inputs() + 1),
":y-outs" => (self.size.h() as u16).saturating_sub(self.h_outputs() + 1),
":y-samples" => if self.is_editing() { 1 } else { 0 },
});
#[cfg(test)] #[test] fn test_view_iter () {
let mut tek = Tek::default();
tek.editor = Some(Default::default());