border enclose; move file impls

This commit is contained in:
🪞👃🪞 2025-01-01 22:13:40 +01:00
parent 9c50ea44c9
commit d4c96f4b41
3 changed files with 83 additions and 82 deletions

View file

@ -30,6 +30,9 @@ pub trait BorderStyle: Send + Sync + Copy {
fn wrap <W: Content<Tui>> (self, w: W) -> Bordered<Self, W> {
Bordered(self, w)
}
fn enclose <W: Content<Tui>> (self, w: W) -> impl Content<Tui> {
Tui::bg(self.style().unwrap().bg.unwrap(), lay!(Fill::xy(Border(self)), w))
}
const NW: &'static str = "";
const N: &'static str = "";
const NE: &'static str = "";