Files
zed/crates
Antonio Scandurra 510320bb47 Introduce InteractiveText (#3397)
This new element will let us react to click events on arbitrary ranges
of some rendered text, e.g.:

```rs
InteractiveText::new(
    "element-id",
    StyledText::new("Hello world, how is it going?").with_runs(vec![
        cx.text_style().to_run(6),
        TextRun {
            background_color: Some(green()),
            ..cx.text_style().to_run(5)
        },
        cx.text_style().to_run(18),
    ]),
)
.on_click(vec![2..4, 1..3, 7..9], |range_ix, cx| {
    println!("Clicked range {range_ix}");
})
```

As part of this, I also added the ability to give text runs a background
color.

Release Notes:

- N/A
2023-11-23 19:35:03 +01:00
..
…
…
2023-11-22 23:16:28 -05:00
…
2023-11-20 15:51:36 -05:00
2023-11-22 23:03:11 -05:00
2023-11-22 13:05:29 -05:00
2023-11-22 23:16:28 -05:00
WIP
2023-11-20 14:46:01 -08:00
…
…
2023-11-23 19:35:03 +01:00
…
…
…
…
2023-11-21 01:05:29 -05:00
…
2023-11-18 10:46:35 -08:00
…
…
…
2023-11-22 11:19:43 -07:00
WIP
2023-11-20 14:46:01 -08:00
…
…
…
…
…
2023-11-22 23:16:28 -05:00