egui/crates/emath/src
Emil Ernerfeldt 41aad74552
Cross-widget text select (#3870)
* Closes https://github.com/emilk/egui/issues/3816


![cross-widget-text-selection](https://github.com/emilk/egui/assets/1148717/5582b9d2-8b04-47b7-9637-f48e44064a70)

Turn off with `style.interaction.multi_widget_text_select`.

There is an API for this in `LabelSelectionState`, but it's pretty
bare-bones.

This became really hairy implementation-wise, but it works decently
well.

# Limitations
* Drag-select to scroll doesn't work
* A selection disappears if you scroll past one of its end-points
* Only the text of labels and links are selectable
 
## TODO
* [x] An option to turn it off
* [x] An API for querying about the selected text, and to deselect it.
* [x] Scrolling past selection behaves weird
* [x] Shift-click to select a range
2024-01-24 15:45:22 +01:00
..
align.rs Add `Align2::anchor_size` (#3863) 2024-01-22 16:47:50 +01:00
history.rs Highlight submenu buttons when hovered and open (#3780) 2024-01-07 22:08:32 +01:00
lib.rs Keep unsafe code forbidden when puffin is disabled (#3603) 2023-11-22 20:37:46 +01:00
numeric.rs Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00
pos2.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
range.rs Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
rect.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
rect_transform.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
rot2.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
smart_aim.rs Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00
vec2.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
vec2b.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00