summaryrefslogtreecommitdiffstats
path: root/src/tuine/widget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tuine/widget.rs')
-rw-r--r--src/tuine/widget.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tuine/widget.rs b/src/tuine/widget.rs
new file mode 100644
index 00000000..ebe06dc6
--- /dev/null
+++ b/src/tuine/widget.rs
@@ -0,0 +1,7 @@
+use tui::{layout::Rect, Frame};
+
+/// A [`Widget`] converts raw data into something that a user can see and interact with.
+pub trait Widget<Data> {
+ /// How to actually draw the widget to the terminal.
+ fn draw(&self, f: &mut Frame<'_>, draw_location: Rect, widget_id: u64);
+}