I’m currently building a drag 'n drop modulation framework and was wondering the best approach for this. I’m aware of OnDrop
for the IControl class, but don’t know how to implement the rest. When the user drags the cursor from the modulation source to the modulation destination, I’d like to provide some indication (different cursor or something following the cursor) that they are modulating a parameter.
From what I understand, this is my current workflow:
-
The user drags a tab control, which sends a message to the delegate from UI.
-
The plugin controls wait for the
OnDrop
function to be called (assuming the user completes the modulation. -
Once the user drops the modulation onto a control, the control sends a message to the UI with the necessary details to store a modulation object in a list.
There are just a few miscellaneous things that I am unsure of:
- If the user lets go of the mouse during dragging to signify they do not wish to complete the modulation, where is the
OnMouseUp
going to be called? Should I temporarily create a full-screen, transparent control that will receive theOnMouseUp
? And would that interfere with theOnDrop
function for the parameter controls? - If I change the mouse cursor on the drag from the modulation tab and the user decided to not complete the modulation, what will change the cursor back to the normal state?
Thanks in advance!
Edit: Now I’m guessing that OnDrop
is meant for files, so I was trying to use a function meant for something else.