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

Drag-N-Drop source and destination elements #134

Open
BillyDM opened this issue Aug 10, 2024 · 0 comments
Open

Drag-N-Drop source and destination elements #134

BillyDM opened this issue Aug 10, 2024 · 0 comments

Comments

@BillyDM
Copy link

BillyDM commented Aug 10, 2024

These elements are used to create drag-n-drop operations in Yarrow.

These elements will contain no styling and will render no primitives.

DragSource element

This element will contain the following action methods in its builder:

  • on_drag_start: Option<A> - emitted when dragging this element has started dragging
  • on_drag_end: Option<A> - emitted when dragging has finished

This element shall not capture any mouse events until dragging has started. Once dragging has started, it should only capture mouse events if the pointer is currently over the element.

DragTarget element

This element will contain the following action methods in its builder:

  • on_pointer_entered: Option<A> - emitted when the pointer hovers over this element while it is activated
  • on_pointer_left: Option<A> - emitted when the pointer leaves this element while it is activated
  • on_dropped: Option<A> - emitted when the pointer button is released inside this element while it is activated

By default this element will be inactive. When inactive, the element should mark itself as "hidden" so Yarrow can skip sending any events to it.

Then when the user activates this element via the handle, the element should unhide itself and respond to events. Once the pointer button goes up (or the window becomes unfocused), the element should automatically deactivate itself again.

@BillyDM BillyDM transferred this issue from MeadowlarkDAW/Yarrow Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

1 participant