create separated mod for widget

This commit is contained in:
yggverse 2024-10-06 16:28:46 +03:00
parent 7d4cf5c1f3
commit 2b12fe207f
3 changed files with 67 additions and 40 deletions

View file

@ -0,0 +1,19 @@
use gtk::Notebook;
pub struct Widget {
gobject: Notebook,
}
impl Widget {
// Construct
pub fn new() -> Self {
let gobject = Notebook::builder().scrollable(true).build();
Self { gobject }
}
// Getters
pub fn gobject(&self) -> &Notebook {
&self.gobject
}
}