// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License in the LICENSE-APACHE file or at:
// https://www.apache.org/licenses/LICENSE-2.0
//! Hello world example
use kas::widget::MessageBox;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Build widgets.
// Message is a Window with an "Ok" button and notification status.
// Each Window::new method creates objects then solves constraints.
let text = kas::text::format::Markdown::new("Hello *world*!")?;
let window = MessageBox::new("Message", text);
let theme = kas_theme::FlatTheme::new();
kas_wgpu::Toolkit::new(theme)?.with(window)?.run()
}