mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
init update action
This commit is contained in:
parent
68a97fdc88
commit
ae3cc7a7d5
14 changed files with 91 additions and 27 deletions
|
|
@ -1,17 +1,23 @@
|
|||
mod content;
|
||||
mod navigation;
|
||||
|
||||
use content::Content;
|
||||
use navigation::Navigation;
|
||||
|
||||
use gtk::{glib::GString, prelude::BoxExt, Box, Orientation};
|
||||
|
||||
pub struct Page {
|
||||
widget: Box,
|
||||
navigation: Navigation,
|
||||
content: Content,
|
||||
}
|
||||
|
||||
impl Page {
|
||||
// Construct
|
||||
pub fn new(name: GString) -> Page {
|
||||
// Init components
|
||||
let navigation = navigation::Navigation::new();
|
||||
let content = content::Content::new();
|
||||
let content = Content::new();
|
||||
let navigation = Navigation::new();
|
||||
|
||||
// Init widget
|
||||
let widget = Box::builder()
|
||||
|
|
@ -23,7 +29,17 @@ impl Page {
|
|||
widget.append(content.widget());
|
||||
|
||||
// Result
|
||||
Self { widget }
|
||||
Self {
|
||||
widget,
|
||||
content,
|
||||
navigation,
|
||||
}
|
||||
}
|
||||
|
||||
// Actions
|
||||
pub fn update(&self) {
|
||||
self.navigation.update();
|
||||
// @TODO self.content.update();
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue