35 lines
582 B
Rust
Raw Normal View History

2024-09-20 18:02:10 +03:00
mod label;
mod page;
2024-09-22 22:23:44 +03:00
mod widget;
2024-09-18 22:38:18 +03:00
2024-09-22 02:00:54 +03:00
pub struct Tab {
2024-09-22 22:23:44 +03:00
widget: widget::Tab,
2024-09-18 22:38:18 +03:00
}
2024-09-22 02:00:54 +03:00
impl Tab {
2024-09-22 22:23:44 +03:00
// Construct
pub fn new() -> Tab {
let widget = widget::Tab::new();
2024-09-22 02:00:54 +03:00
2024-09-22 22:26:10 +03:00
let this = Self { widget };
this.append(true); // @TODO test
this
2024-09-18 22:47:53 +03:00
}
2024-09-22 02:00:54 +03:00
2024-09-22 22:23:44 +03:00
// Actions
pub fn append(&self, current: bool) -> u32 {
self.widget.append(
label::Label::new().widget().gtk(),
page::Page::new().widget().gtk(),
true,
)
}
2024-09-18 22:47:53 +03:00
2024-09-22 22:23:44 +03:00
// Getters
pub fn widget(&self) -> &widget::Tab {
&self.widget
}
2024-09-20 18:02:10 +03:00
}