mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05: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,8 +1,19 @@
|
|||
use gtk::Box;
|
||||
// use gtk::prelude::BoxExt; @TODO append
|
||||
mod widget;
|
||||
|
||||
pub fn new() -> Box {
|
||||
Box::builder()
|
||||
.orientation(gtk::Orientation::Vertical)
|
||||
.build()
|
||||
pub struct Content {
|
||||
widget: widget::Content,
|
||||
}
|
||||
|
||||
impl Content {
|
||||
// Construct
|
||||
pub fn new() -> Content {
|
||||
Self {
|
||||
widget: widget::Content::new(),
|
||||
}
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn widget(&self) -> &widget::Content {
|
||||
&self.widget
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
src/browser/main/tab/page/content/widget.rs
Normal file
19
src/browser/main/tab/page/content/widget.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
pub struct Content {
|
||||
gtk: gtk::Box,
|
||||
}
|
||||
|
||||
impl Content {
|
||||
// Construct new object
|
||||
pub fn new() -> Content {
|
||||
Self {
|
||||
gtk: gtk::Box::builder()
|
||||
.orientation(gtk::Orientation::Vertical)
|
||||
.build(),
|
||||
}
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gtk(&self) -> >k::Box {
|
||||
&self.gtk
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue