mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
create separated widget mod implementation
This commit is contained in:
parent
8fa56ebf9a
commit
6f3ad01c35
3 changed files with 45 additions and 25 deletions
23
src/browser/main/widget.rs
Normal file
23
src/browser/main/widget.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
use gtk::prelude::BoxExt;
|
||||
|
||||
pub struct Main {
|
||||
gtk: gtk::Box,
|
||||
}
|
||||
|
||||
impl Main {
|
||||
// Construct
|
||||
pub fn new(tab: >k::Notebook) -> Main {
|
||||
let gtk = gtk::Box::builder()
|
||||
.orientation(gtk::Orientation::Vertical)
|
||||
.build();
|
||||
|
||||
gtk.append(tab);
|
||||
|
||||
Self { gtk }
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gtk(&self) -> >k::Box {
|
||||
&self.gtk
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue