Closed dhardy closed 1 year ago
Another extract from #387: new layout syntax (row![a, b, c] instead of row: [a, b, c]), including support as stand-alone macros.
row![a, b, c]
row: [a, b, c]
Stand-alone usage is mostly useless for now since there's currently no way to integrate event handling, but it is used in examples/layout.rs:
examples/layout.rs
let ui = kas::grid! { (1, 0) => "Layout demo", (2, 0) => CheckBox::default(), (0..3, 1) => ScrollLabel::new(LIPSUM), (0, 2) => align!(center, "abc אבג def"), (1..3, 3) => align!(stretch, ScrollLabel::new(CRASIT)), (0, 3) => EditBox::new("A small\nsample\nof text") .with_multi_line(true), };
Another extract from #387: new layout syntax (
row![a, b, c]
instead ofrow: [a, b, c]
), including support as stand-alone macros.Stand-alone usage is mostly useless for now since there's currently no way to integrate event handling, but it is used in
examples/layout.rs
: