mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
complete widget submodule refactory
This commit is contained in:
parent
e45b7f0a4a
commit
1e42a75f2e
29 changed files with 585 additions and 145 deletions
|
|
@ -1,16 +1,23 @@
|
|||
mod content;
|
||||
mod navigation;
|
||||
mod widget;
|
||||
|
||||
use gtk::prelude::BoxExt;
|
||||
use gtk::Box;
|
||||
|
||||
pub fn new() -> Box {
|
||||
let page = Box::builder()
|
||||
.orientation(gtk::Orientation::Vertical)
|
||||
.build();
|
||||
|
||||
page.append(&navigation::new());
|
||||
page.append(&content::new());
|
||||
|
||||
page
|
||||
pub struct Page {
|
||||
widget: widget::Page,
|
||||
}
|
||||
|
||||
impl Page {
|
||||
pub fn new() -> Page {
|
||||
Self {
|
||||
widget: widget::Page::new(
|
||||
navigation::Navigation::new().widget().gtk(),
|
||||
content::Content::new().widget().gtk(),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &widget::Page {
|
||||
&self.widget
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue