use gtk::{ prelude::{BoxExt, IsA}, Box, Orientation, }; pub struct Widget { pub g_box: Box, } impl Widget { // Constructors /// Build new `Self` pub fn build( // Components navigation: &impl IsA, content: &impl IsA, search: &impl IsA, input: &impl IsA, ) -> Self { // Init self let g_box = Box::builder().orientation(Orientation::Vertical).build(); g_box.append(navigation); g_box.append(content); g_box.append(search); g_box.append(input); Self { g_box } } }