First commit
CI / fmt (push) Has been cancelled
CI / clippy (push) Has been cancelled
CI / doc (push) Has been cancelled
CI / test macos-latest (push) Has been cancelled
CI / test windows-latest (push) Has been cancelled

This commit is contained in:
2026-07-31 22:31:23 +02:00
commit 0a3ddbdcaf
13 changed files with 661 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
use ratatui::{
buffer::Buffer,
layout::Rect,
style::Stylize,
symbols::border,
text::{Line, Text},
widgets::{Block, Paragraph, Widget},
};
use crate::binary_repr::BinaryRepr;
#[derive(Debug, Default)]
pub struct Unsigned {
repr: BinaryRepr,
}
impl Unsigned {
pub fn update(&mut self, input: &BinaryRepr) {
self.repr = input.clone();
}
}
impl Widget for &Unsigned {
fn render(self, area: Rect, buf: &mut Buffer) {
let input_text = Text::from(self.repr.to_unsigned().yellow());
let input_block = Block::bordered()
.title(Line::from("unsigned".bold()))
.border_set(border::PLAIN);
Paragraph::new(input_text)
.block(input_block)
.render(area, buf);
}
}