Files
LACT/gui/src/app/root_stack.rs

52 lines
1.1 KiB
Rust
Raw Normal View History

2021-01-30 08:35:01 +02:00
mod info_page;
mod oc_page;
2021-03-23 08:17:55 +02:00
mod software_page;
2021-03-01 10:36:56 +02:00
mod thermals_page;
2021-01-30 08:35:01 +02:00
2021-08-13 12:20:41 +03:00
use gtk::prelude::*;
2021-01-30 08:35:01 +02:00
use gtk::*;
use info_page::InformationPage;
use oc_page::OcPage;
2021-03-23 08:17:55 +02:00
use software_page::SoftwarePage;
2021-01-31 12:28:45 +02:00
use thermals_page::ThermalsPage;
2021-01-30 08:35:01 +02:00
2021-01-30 09:36:45 +02:00
#[derive(Clone)]
2021-01-30 08:35:01 +02:00
pub struct RootStack {
pub container: Stack,
pub info_page: InformationPage,
2021-01-31 12:28:45 +02:00
pub thermals_page: ThermalsPage,
2021-03-23 08:17:55 +02:00
pub software_page: SoftwarePage,
pub oc_page: OcPage,
2021-01-30 08:35:01 +02:00
}
impl RootStack {
pub fn new() -> Self {
let container = Stack::new();
let info_page = InformationPage::new();
container.add_titled(&info_page.container, "info_page", "Information");
let oc_page = OcPage::new();
container.add_titled(&oc_page.container, "oc_page", "OC");
2021-03-01 10:36:56 +02:00
2021-01-31 12:28:45 +02:00
let thermals_page = ThermalsPage::new();
container.add_titled(&thermals_page.container, "thermals_page", "Thermals");
2021-01-30 09:36:45 +02:00
2021-03-23 08:17:55 +02:00
let software_page = SoftwarePage::new();
container.add_titled(&software_page.container, "software_page", "Software");
2021-01-30 09:36:45 +02:00
Self {
container,
info_page,
2021-01-31 12:28:45 +02:00
thermals_page,
oc_page,
2021-03-23 08:17:55 +02:00
software_page,
2021-01-30 09:36:45 +02:00
}
2021-01-30 08:35:01 +02:00
}
2021-01-30 09:36:45 +02:00
}