Macro load_layout

Source
load_layout!() { /* proc-macro */ }
Expand description

Macro for loading layout from XML.

This macro parses an XML layout representation and generates Rust code to construct the layout within an egui UI.

ยงExample

load_layout!(
    <Strip direction="west">
        <Panel size="relative" value="0.3">
            color_background(ui, egui::Color32::from_rgb(0, 0, 255));
        </Panel>
        <Panel size="remainder">
            <Strip direction="north">
                <Panel size="relative" value="0.3">
                    color_background(ui, egui::Color32::from_rgb(0, 255, 255));
                </Panel>
                <Panel size="remainder">
                    color_background(ui, egui::Color32::from_rgb(255, 0, 255));
                </Panel>
            </Strip>
        </Panel>
    </Strip>
);