Crate brisk_eframe

Crate brisk_eframe 

Source
Expand description

stable pipeline dev/1 pipeline docs crates.io

§brisk-eframe

brisk-eframe provides integration with the eframe framework from egui.

§Example

The following creates a user interface with an Hello World! banner.

use brisk_eframe::brisk_it;

struct MyApp {
}

impl MyApp {
    fn new(_: &eframe::CreationContext) -> Self {
        Self {
        }
    }
}

brisk_it! {
    Main
    {
        title: "My egui App",
        viewport: Viewport
        {
            inner_size: [320.0, 240.0],
        },
        App {
            target: MyApp,
            CentralPanel
            {
                Heading
                {
                    text: "Hello World!",
                },
            }
        }
    }
}

A more complete example is available in the hello world example.

Macros§

brisk_it
This macro is used to transform a brisk declarative representation into an eframe app. Look at examples for usage.