Since #3814 we can now select text within a single Label. However, if you put several widgets in a layout, you cannot select all the text across them at once. This gif showcases this shortcoming, here mixing Label with Hyperlink:

In order to support this we need to keep track of the first and last widget of the selection. During layout, egui needs to track wether or not we are hitting one of these "edge" widgets, and then automatically mark all widgets in between as selected.
When hitting the "copy" button, the text of all widgets needs to be copied.
We should probably only allow drag-to-select a range within the same layer (i.e. Window/Area).
Copying text
When hitting Cmd C, each fully or partially selected widget needs to append their text to the clipboard, and probably insert an extra space between (unless there already is one).
Handling this in the general case of right-to-left layouts will be difficult, so let's start with simple left-to-rigth/top-down layouts first.
Since #3814 we can now select text within a single Label. However, if you put several widgets in a layout, you cannot select all the text across them at once. This gif showcases this shortcoming, here mixing
LabelwithHyperlink:In order to support this we need to keep track of the first and last widget of the selection. During layout, egui needs to track wether or not we are hitting one of these "edge" widgets, and then automatically mark all widgets in between as selected.
When hitting the "copy" button, the text of all widgets needs to be copied.
We should probably only allow drag-to-select a range within the same layer (i.e. Window/Area).
Copying text
When hitting
Cmd C, each fully or partially selected widget needs to append their text to the clipboard, and probably insert an extra space between (unless there already is one).Handling this in the general case of right-to-left layouts will be difficult, so let's start with simple left-to-rigth/top-down layouts first.