frontend: main_view: GUI compontent implementing the base widget

* will reference and include its child widgets from independent source files

Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
2020-06-19 16:59:38 +02:00
parent e02f8b338b
commit 158d25b76e

33
frontend/src/main_view.rs Normal file
View File

@@ -0,0 +1,33 @@
use orbtk::prelude::*;
use crate::policycheck_view::PolicyCheckView;
//data::PolicyList,
//policylist_view::PolicyListView,
//policy_view::PolicyDataView
widget!(MainView {
policylist_count: usize,
policylist_view: u32,
policy_view: u32
});
impl Template for MainView {
fn template(self, id: Entity, ctx: &mut BuildContext) -> Self {
let policycheck_view = PolicyCheckView::new()
//.policy_view(id)
//.policycheck_view(id)
//.policy_list_count(id)
.build(ctx);
/* let policy_view = PolicyList::new()
.back_entity(policycheck_view.0)
.policy_view(id)
.visibility("collapsed")
.build(ctx);
*/
self.name("MainView")
.policylist_count(0)
//.policy_list(policy_list.0)
.child(policycheck_view)
}
}