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