egui/crates/egui_demo_app/src
Emil Ernerfeldt 5d2e192927
Selectable text in Labels (#3814)
* Closes https://github.com/emilk/egui/issues/3804

Add ability to select the text in labels with mouse-drag, double-click,
and keyboard (once clicked).
Hit Cmd+C to copy the text. If everything of a label with elided text is
selected, the copy command will copy the full non-elided text. IME and
accesskit _should_ work, but is untested.

You can control wether or not text in labels is selected globally in
`style.interaction.selectable_labels` or on a per-label basis in
`Label::selectable`. The default is ON.

This also cleans up the `TextEdit` code somewhat, fixing a couple
smaller bugs along the way.

This does _not_ implement selecting text across multiple widgets. Text
selection is only supported within a single `Label`, `TextEdit`, `Link`
or `Hyperlink`.


![label-text-selection](https://github.com/emilk/egui/assets/1148717/c161e819-50da-4b97-9686-042e6abf3564)


## TODO
* [x] Test
2024-01-14 15:17:55 +01:00
..
apps Selectable text in Labels (#3814) 2024-01-14 15:17:55 +01:00
backend_panel.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
frame_history.rs Support images with rounded corners (#3257) 2023-08-15 09:29:30 +02:00
lib.rs eframe web: Better panic handling (#2942) 2023-04-21 08:33:01 +02:00
main.rs Fix some clippy 1.75 lints (#3754) 2023-12-30 11:23:21 +01:00
web.rs Update some crate dependencies (#3594) 2023-11-21 16:07:56 +01:00
wrap_app.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00