Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global overlay drawing system (e.g. for drag and drop) #2307

Open
tznind opened this issue Jan 27, 2023 · 1 comment
Open

Global overlay drawing system (e.g. for drag and drop) #2307

tznind opened this issue Jan 27, 2023 · 1 comment
Labels
enhancement v2 For discussions, issues, etc... relavant for v2

Comments

@tznind
Copy link
Collaborator

tznind commented Jan 27, 2023

Is your feature request related to a problem? Please describe.

Sometimes you want to be able to paint arbitrary stuff over the top of other views. For example during drag and drop.

Use cases

The primary use case is for 'drag and drop' style effects e.g.

  • Showing a representation of a file as you drag from one box to another
  • Showing a tab as you drag around the screen to drop into another TabView

For example after dragging a tab in VisualStudio you see the title in 2 places. Its original location and wherever the cursor is.

shot-2023-01-27_19-49-19

But there are other potential use cases e.g.

  • Holding down a button to show a tutorial overlay over the UI.

Describe the solution you'd like

The drawing would need to happen last after all other views had drawn for the loop iteration.

When a new drawing/location is set (e.g. after the mouse moves) then the old contents would need to be invalidated (so that dragging didn't leave a 'trail').

Performance would have to be good so maybe have some kind of inbuilt throttling or back buffer. Especially relevant if redrawing on Mouse Move events.

Alternatives Considered
It would probably be possible to have the rendered content be a View itself but this feels hacky and would likely interfere with detecting what the mouse was released over (e.g. because the animation follows the mouse)

@tznind tznind changed the title Global overlay drawing system Global overlay drawing system (e.g. for drag and drop) Jan 27, 2023
@tig tig added the enhancement label Feb 7, 2023
@tig tig added the v2 For discussions, issues, etc... relavant for v2 label Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement v2 For discussions, issues, etc... relavant for v2
Projects
Status: No status
Status: 🆕 Not Triaged
Development

No branches or pull requests

2 participants