pub fn gui() -> Result<(), eframe::Error> { let options = eframe::NativeOptions::default(); eframe::run_native("Encoded Message", options, Box::new(|_cc| Ok(Box::::new( Default::default() )))) } struct Gui { message: Option, circle_length: Option, } impl Default for Gui { fn default() -> Self { Self{ message: None, circle_length: None, } } } impl eframe::App for Gui { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { egui::CentralPanel::default().show(ctx, |ui| { //TODO: UI (on unfocus update values) // Message Content input // start shift input // circle length input // generate button (if pressed, generate plot with details) }); } } pub struct Error(eframe::Error); impl From for Error { fn from(err: eframe::Error) -> Self { Error(err) } } impl From for anyhow::Error { fn from(err: Error) -> Self { anyhow::anyhow!(err.0.to_string()) } }