extract match_exp

This commit is contained in:
🪞👃🪞 2025-01-07 21:48:58 +01:00
parent 9a70fbc416
commit 3975837393
3 changed files with 56 additions and 48 deletions

View file

@ -5,12 +5,6 @@ use EdnItem::*;
const EDN: &'static str = include_str!("groovebox.edn");
//impl Content<TuiOut> for Groovebox {
//fn content (&self) -> impl Render<TuiOut> {
//self.size.of(EdnView::from_source(self, EDN))
//}
//}
// this works:
render!(TuiOut: (self: Groovebox) => self.size.of(
Bsp::s(self.toolbar_view(),
@ -19,6 +13,13 @@ render!(TuiOut: (self: Groovebox) => self.size.of(
Bsp::n(self.status_view(),
Bsp::w(self.pool_view(), Fill::xy(Bsp::e(self.sampler_view(), &self.editor)))))))));
// this almost works:
//impl Content<TuiOut> for Groovebox {
//fn content (&self) -> impl Render<TuiOut> {
//self.size.of(EdnView::from_source(self, EDN))
//}
//}
impl Groovebox {
fn toolbar_view (&self) -> impl Content<TuiOut> + use<'_> {
Fill::x(Fixed::y(2, lay!(