Switch to persistent printer with queue

This commit is contained in:
Joscha 2025-02-27 01:28:08 +01:00
parent 0ea4cf1d22
commit 6555e9c0bd
14 changed files with 221 additions and 76 deletions

View file

@ -1,14 +1,14 @@
use showbits_common::{Node, Tree, WidgetExt, color::WHITE, widgets::Text};
use taffy::style_helpers::percent;
use crate::printer::Printer;
use crate::persistent_printer::PersistentPrinter;
use super::{Context, Drawing};
pub struct TextDrawing(pub String);
impl Drawing for TextDrawing {
fn draw(&self, printer: &mut Printer, ctx: &mut Context) -> anyhow::Result<()> {
fn draw(&self, printer: &mut PersistentPrinter, ctx: &mut Context) -> anyhow::Result<()> {
let mut tree = Tree::<Context>::new(WHITE);
let text = Text::new()