31 lines
528 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 {
2024-09-23 12:41:56 +03:00
Self {
widget: widget::Tab::new(),
}
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(
2024-09-23 15:07:41 +03:00
label::Label::new().widget().container(),
page::Page::new().widget().container(),
2024-09-22 22:27:14 +03:00
current,
2024-09-22 22:23:44 +03:00
)
}
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
}