Yoda/src/browser/main/mod.rs

32 lines
519 B
Rust
Raw Normal View History

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