shorten TuiIn, TuiOut

This commit is contained in:
🪞👃🪞 2024-12-31 23:42:35 +01:00
parent ca16a91015
commit 21741ebc52
20 changed files with 77 additions and 75 deletions

View file

@ -26,7 +26,7 @@ impl<W: Content<Tui>> Content<Tui> for Bold<W> {
fn content (&self) -> impl Content<Tui> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) {
fn render (&self, to: &mut TuiOut) {
to.fill_bold(to.area(), self.0);
self.1.render(to)
}
@ -38,7 +38,7 @@ impl<W: Content<Tui>> Content<Tui> for Foreground<W> {
fn content (&self) -> impl Content<Tui> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) {
fn render (&self, to: &mut TuiOut) {
to.fill_fg(to.area(), self.0);
self.1.render(to)
}
@ -50,7 +50,7 @@ impl<W: Content<Tui>> Content<Tui> for Background<W> {
fn content (&self) -> impl Content<Tui> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) {
fn render (&self, to: &mut TuiOut) {
to.fill_bg(to.area(), self.0);
self.1.render(to)
}
@ -62,7 +62,7 @@ impl Content<Tui> for Styled<&str> {
fn content (&self) -> impl Content<Tui> {
Some(&self.1)
}
fn render (&self, to: &mut TuiOutput) {
fn render (&self, to: &mut TuiOut) {
// FIXME
let [x, y, ..] = to.area();
//let [w, h] = self.min_size(to.area().wh())?.unwrap();