1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use rui::*;

struct MyAction {}

fn main() {
    rui(vstack((
        rectangle()
            .tap(|_| {
                println!("rect tapped");
                MyAction {}
            })
            .padding(Auto),
        text("tap the rectangle to send an action"),
    ))
    .handle(|_, _: &MyAction| println!("action received")));
}