init tab child widgets

This commit is contained in:
yggverse 2024-09-18 22:38:18 +03:00
parent f05a9c765e
commit 5070010b2b
3 changed files with 34 additions and 0 deletions

View File

@ -1,6 +1,22 @@
#[path = "tab/label.rs"] mod label;
#[path = "tab/page.rs"] mod page;
use gtk::Notebook;
pub fn new() -> Notebook
{
return Notebook::builder().scrollable(true).build();
}
pub fn append(
tab : Notebook,
is_current : bool
) -> u32
{
return tab.append_page(
&page::new(),
Some(
&label::new()
)
);
}

View File

@ -0,0 +1,9 @@
use gtk::Box;
// use gtk::prelude::BoxExt; @TODO append
pub fn new() -> Box
{
return Box::builder().orientation(
gtk::Orientation::Vertical
).build();
}

View File

@ -0,0 +1,9 @@
use gtk::Box;
// use gtk::prelude::BoxExt; @TODO append
pub fn new() -> Box
{
return Box::builder().orientation(
gtk::Orientation::Vertical
).build();
}