complete widget submodule refactory

This commit is contained in:
yggverse 2024-09-22 22:23:44 +03:00
parent e45b7f0a4a
commit 1e42a75f2e
29 changed files with 585 additions and 145 deletions

View file

@ -0,0 +1,24 @@
use gtk::prelude::BoxExt;
pub struct Page {
gtk: gtk::Box,
}
impl Page {
// Construct
pub fn new(navigation: &gtk::Box, content: &gtk::Box) -> Page {
let gtk = gtk::Box::builder()
.orientation(gtk::Orientation::Vertical)
.build();
gtk.append(navigation);
gtk.append(content);
Self { gtk }
}
// Getters
pub fn gtk(&self) -> &gtk::Box {
&self.gtk
}
}