egui/crates/egui_demo_lib/src/demo
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
..
about.rs Tweak "About" panel in the demo slightly 2024-01-08 12:20:16 +01:00
code_editor.rs Add syntax highlighing feature to `egui_extras` (#3333) 2023-09-13 20:39:40 +02:00
code_example.rs Fix code example in `egui_demo_lib` 2023-11-30 17:53:34 +01:00
context_menu.rs Add `emath::Vec2b`, replacing `egui_plot::AxisBools` (#3543) 2023-11-11 21:31:36 +01:00
dancing_strings.rs Avoid deadlocks by using lambdas for context lock (#2625) 2023-01-25 10:24:23 +01:00
demo_app_windows.rs Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
drag_and_drop.rs Add `Response::contains_pointer` (#3859) 2024-01-22 11:17:03 +01:00
extra_viewport.rs CentralPanel: base id on the current viewport (#3593) 2023-11-20 21:54:32 +01:00
font_book.rs Add `Context::open_url` and `Context::copy_text` (#3380) 2023-09-24 09:31:21 +02:00
highlighting.rs Add missing links to source code (#3770) 2024-01-08 09:07:25 +01:00
layout_test.rs Add missing links to source code (#3770) 2024-01-08 09:07:25 +01:00
misc_demo_window.rs Use `Self` everywhere (#3787) 2024-01-08 17:41:21 +01:00
mod.rs Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
multi_touch.rs Increase MSRV to 1.67 (#3234) 2023-08-11 13:54:02 +02:00
paint_bezier.rs Avoid deadlocks by using lambdas for context lock (#2625) 2023-01-25 10:24:23 +01:00
painting.rs `Painter` extend accepts `IntoIter` (#2249) 2022-11-07 09:32:28 +01:00
panels.rs Cross-widget text select (#3870) 2024-01-24 15:45:22 +01:00
password.rs Avoid deadlocks by using lambdas for context lock (#2625) 2023-01-25 10:24:23 +01:00
plot_demo.rs Make `egui_plot::PlotMemory` public (#3871) 2024-01-23 09:47:47 +01:00
scrolling.rs Add `emath::Vec2b`, replacing `egui_plot::AxisBools` (#3543) 2023-11-11 21:31:36 +01:00
sliders.rs Allow changing handle shape of a slider (#3429) 2023-11-21 11:24:29 +01:00
strip_demo.rs Fix the "ever-growing height" problem of Strip and Table demos (#3122) 2023-08-10 12:35:40 +02:00
table_demo.rs Implement table row selection and hover highlighting (#3347) 2024-01-06 18:10:34 +01:00
tests.rs Add missing links to source code (#3770) 2024-01-08 09:07:25 +01:00
text_edit.rs Selectable text in Labels (#3814) 2024-01-14 15:17:55 +01:00
text_layout.rs Add `emath::Vec2b`, replacing `egui_plot::AxisBools` (#3543) 2023-11-11 21:31:36 +01:00
toggle_switch.rs Move all crates into a `crates` directory (#1940) 2022-08-20 10:41:49 +02:00
widget_gallery.rs Fix broken doc links in the demo app widget gallery (#3441) 2023-11-10 21:39:49 +01:00
window_options.rs Implemented window header color change when focused (on top). (#3515) 2024-01-07 16:57:32 +01:00