2024-09-20 18:02:10 +03:00
|
|
|
mod tab;
|
2024-09-22 18:50:47 +03:00
|
|
|
mod widget;
|
2024-09-18 20:33:29 +03:00
|
|
|
|
2024-09-22 02:00:54 +03:00
|
|
|
pub struct Main {
|
2024-09-22 18:50:47 +03:00
|
|
|
widget: widget::Main,
|
|
|
|
tab: tab::Tab,
|
2024-09-22 02:00:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
impl Main {
|
2024-09-22 18:50:47 +03:00
|
|
|
// Construct
|
|
|
|
pub fn new() -> Main {
|
|
|
|
// Init components
|
|
|
|
let tab = tab::new();
|
|
|
|
|
|
|
|
// Init struct
|
|
|
|
Self {
|
|
|
|
widget: widget::Main::new(tab.widget.as_ref()), // @TODO
|
|
|
|
tab,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Actions
|
2024-09-22 02:00:54 +03:00
|
|
|
pub fn tab_append(&self) {
|
|
|
|
self.tab.append(true);
|
|
|
|
}
|
|
|
|
|
2024-09-22 18:50:47 +03:00
|
|
|
// Getters
|
|
|
|
pub fn widget(&self) -> &widget::Main {
|
|
|
|
&self.widget
|
|
|
|
}
|
2024-09-20 18:02:10 +03:00
|
|
|
}
|