mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
init update action
This commit is contained in:
parent
68a97fdc88
commit
ae3cc7a7d5
14 changed files with 91 additions and 27 deletions
|
|
@ -12,7 +12,7 @@ pub struct Main {
|
|||
|
||||
impl Main {
|
||||
// Construct
|
||||
pub fn new() -> Main {
|
||||
pub fn new() -> Arc<Main> {
|
||||
// Init components
|
||||
let tab = Tab::new();
|
||||
|
||||
|
|
@ -22,7 +22,7 @@ impl Main {
|
|||
widget.append(tab.widget());
|
||||
|
||||
// Init struct
|
||||
Self { tab, widget }
|
||||
Arc::new(Self { tab, widget })
|
||||
}
|
||||
|
||||
// Actions
|
||||
|
|
@ -42,6 +42,10 @@ impl Main {
|
|||
self.tab.pin();
|
||||
}
|
||||
|
||||
pub fn update(&self) {
|
||||
self.tab.update();
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &Box {
|
||||
&self.widget
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue