mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
31 lines
653 B
Rust
31 lines
653 B
Rust
mod bar;
|
|
mod widget;
|
|
|
|
use bar::Bar;
|
|
use widget::Widget;
|
|
|
|
use super::{Action as WindowAction, BrowserAction, Profile};
|
|
use adw::TabView;
|
|
use std::rc::Rc;
|
|
|
|
pub struct Header {
|
|
pub widget: Rc<Widget>,
|
|
}
|
|
|
|
impl Header {
|
|
// Constructors
|
|
|
|
pub fn new(
|
|
(browser_action, window_action): (&Rc<BrowserAction>, &Rc<WindowAction>),
|
|
profile: &Rc<Profile>,
|
|
tab_view: &TabView,
|
|
) -> Self {
|
|
// Init components
|
|
let bar = Rc::new(Bar::new((browser_action, window_action), profile, tab_view));
|
|
|
|
// Return new struct
|
|
Self {
|
|
widget: Rc::new(Widget::new(&bar.widget.g_box)),
|
|
}
|
|
}
|
|
}
|