diff --git a/frontend/src/main.rs b/frontend/src/main.rs new file mode 100644 index 0000000..2408e4f --- /dev/null +++ b/frontend/src/main.rs @@ -0,0 +1,52 @@ +use orbtk::prelude::*; +use orbtk::theme::DEFAULT_THEME_CSS; +//use orbtk::theme::LIGHT_THEME_EXTENSION_CSS; + +pub mod base_state; +pub mod data; +pub mod keys; +pub mod main_view; + +// validation check of a policy data element given by its poliy code +pub mod policycheck_view; +pub mod policycheck_state; + +// manage list of policy data structures +pub mod policylist_view; +pub mod policylist_state; + +//#[cfg(feature = "light-theme")] +static WIDGET_EXT: &'static str = include_str!("../resources/stylesheets/policyholder_check.css"); + +fn get_theme() -> ThemeValue { + //ThemeValue::create_from_css(LIGHT_THEME_EXTENSION_CSS) + ThemeValue::create_from_css(DEFAULT_THEME_CSS) + .extension_css(WIDGET_EXT) + .build() +} + +fn main() { + Application::from_name("rzerres.advotracker") + .window(move |ctx| { + Window::new() + //.title("OrbTk - Policyholder checker example") + .title("AdvoTracker - Versicherungsnummern") + .position((-500.0, -100.0)) + .size(480.0, 260.0) + .min_width(460.0) + .min_height(180.0) + .resizeable(true) + .theme(get_theme()) + .child(main_view::MainView::new().build(ctx)) + .build(ctx) + }) + .run(); +} + +#[cfg(test)] +mod tests { + #[test] + fn it_works() { + assert_eq!(2 + 2, 4); + } +}