2025-06-23 21:52:45 +08:00
|
|
|
use iced::{Length, alignment::Horizontal, widget::Column};
|
|
|
|
|
|
|
|
|
|
use crate::ui::main_window::{MainWindowMsg, TabContent};
|
|
|
|
|
|
|
|
|
|
#[derive(Default)]
|
|
|
|
|
pub struct PartViewer {}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, PartialEq, Eq, Clone)]
|
|
|
|
|
pub enum PartViewerMsg {
|
|
|
|
|
Nothing,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl TabContent for PartViewer {
|
|
|
|
|
type TabMessage = PartViewerMsg;
|
|
|
|
|
|
|
|
|
|
fn update(&self, msg: Self::TabMessage) {
|
|
|
|
|
match msg {
|
|
|
|
|
PartViewerMsg::Nothing => {
|
|
|
|
|
println!("This function not allowed.");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn content(&self) -> iced::Element<'_, MainWindowMsg> {
|
|
|
|
|
let btn = iced::widget::button("PartViewer")
|
|
|
|
|
.on_press(MainWindowMsg::PartViewer(PartViewerMsg::Nothing));
|
|
|
|
|
|
|
|
|
|
Column::new()
|
|
|
|
|
.align_x(Horizontal::Left)
|
|
|
|
|
.width(Length::Fill)
|
|
|
|
|
.height(Length::Fill)
|
|
|
|
|
.push(btn)
|
|
|
|
|
.into()
|
|
|
|
|
}
|
|
|
|
|
}
|