From 97b413aa5962bded37dedb380034fa7b97bdc06c Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sun, 8 Feb 2026 20:26:30 +0000 Subject: task-085: display transaction data in tables --- schist_desktop_gui/src/gui/components/table.rs | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 schist_desktop_gui/src/gui/components/table.rs (limited to 'schist_desktop_gui/src/gui/components/table.rs') diff --git a/schist_desktop_gui/src/gui/components/table.rs b/schist_desktop_gui/src/gui/components/table.rs new file mode 100644 index 0000000..4c6d810 --- /dev/null +++ b/schist_desktop_gui/src/gui/components/table.rs @@ -0,0 +1,42 @@ +use std::collections::HashMap; + +mod view_table; + +#[derive(Clone, Debug, Default)] +pub struct Table +where + Ix: Clone + std::fmt::Debug, +{ + pub cols: Vec>, + pub rows: Vec>, +} + +#[derive(Clone, Debug)] +pub enum Value { + String(String), + Currency(i32), +} + +#[derive(Clone, Debug)] +pub struct Column +where + Ix: Clone + std::fmt::Debug, +{ + pub index: Ix, + pub name: String, +} + +impl Column +where + Ix: Clone + std::fmt::Debug, +{ + pub fn new(index: Ix, name: &str) -> Self { + Self { + index, + name: name.to_string(), + } + } +} + +#[derive(Clone, Debug)] +pub enum Message {} -- cgit v1.2.3