Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
44 lines
1.3 KiB
Rust
44 lines
1.3 KiB
Rust
pub struct LogViewerApp;
|
|
|
|
impl Default for LogViewerApp {
|
|
fn default() -> Self {
|
|
Self
|
|
}
|
|
}
|
|
|
|
impl eframe::App for LogViewerApp {
|
|
fn ui(&mut self, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
|
|
egui::Panel::top("menu_bar").show_inside(ui, |ui| {
|
|
egui::MenuBar::new().ui(ui, |ui| {
|
|
ui.menu_button("File", |ui| {
|
|
if ui.button("Open").clicked() {
|
|
// TODO: file open dialog
|
|
}
|
|
if ui.button("Quit").clicked() {
|
|
// TODO: quit
|
|
}
|
|
});
|
|
ui.menu_button("Edit", |ui| {
|
|
if ui.button("Find (Ctrl+F)").clicked() {
|
|
// TODO: find
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
egui::Panel::bottom("status_bar").show_inside(ui, |ui| {
|
|
ui.horizontal(|ui| {
|
|
ui.label("Ready");
|
|
});
|
|
});
|
|
|
|
egui::CentralPanel::default().show_inside(ui, |ui| {
|
|
ui.vertical_centered(|ui| {
|
|
ui.add_space(100.0);
|
|
ui.heading("Log Viewer");
|
|
ui.label("Open a file to get started (File → Open)");
|
|
});
|
|
});
|
|
}
|
|
}
|