2024-10-11 01:38:12 +03:00
|
|
|
use adw::{TabView, ToolbarView};
|
|
|
|
use gtk::{prelude::BoxExt, Box, Orientation};
|
2024-10-06 05:03:45 +03:00
|
|
|
|
|
|
|
pub struct Widget {
|
|
|
|
gobject: Box,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Widget {
|
|
|
|
// Construct
|
2024-10-11 01:38:12 +03:00
|
|
|
pub fn new(header: &ToolbarView, tab: &TabView) -> Self {
|
2024-10-06 05:03:45 +03:00
|
|
|
let gobject = Box::builder().orientation(Orientation::Vertical).build();
|
2024-10-09 10:50:41 +03:00
|
|
|
gobject.append(header);
|
2024-10-06 05:03:45 +03:00
|
|
|
gobject.append(tab);
|
|
|
|
|
|
|
|
Self { gobject }
|
|
|
|
}
|
|
|
|
|
|
|
|
// Getters
|
|
|
|
pub fn gobject(&self) -> &Box {
|
|
|
|
&self.gobject
|
|
|
|
}
|
|
|
|
}
|