Cross-widget text select (#3870)
* Closes https://github.com/emilk/egui/issues/3816  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
This commit is contained in:
@@ -32,6 +32,7 @@ impl Default for Demos {
|
||||
Box::<super::MiscDemoWindow>::default(),
|
||||
Box::<super::multi_touch::MultiTouch>::default(),
|
||||
Box::<super::painting::Painting>::default(),
|
||||
Box::<super::panels::Panels>::default(),
|
||||
Box::<super::plot_demo::PlotDemo>::default(),
|
||||
Box::<super::scrolling::Scrolling>::default(),
|
||||
Box::<super::sliders::Sliders>::default(),
|
||||
@@ -42,7 +43,6 @@ impl Default for Demos {
|
||||
Box::<super::widget_gallery::WidgetGallery>::default(),
|
||||
Box::<super::window_options::WindowOptions>::default(),
|
||||
Box::<super::tests::WindowResizeTest>::default(),
|
||||
Box::<super::window_with_panels::WindowWithPanels>::default(),
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user