rename widget struct entity

This commit is contained in:
yggverse 2024-09-23 15:07:41 +03:00
parent 3d7be25c5f
commit 4b78ccb779
3 changed files with 16 additions and 16 deletions

View file

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