Cantabile Development Blog

Follow the development of music software Cantabile

Articles | Full Index | RSS Feed


Drag-Drop Support

Something I've wanted in Cantabile for quite a while is the ability to drag and drop plugins and racks to re-order and copy them. Finally it's done!

To re-ordering plugins and racks is simply a matter of clicking the plugin or rack name and dragging to a new location.

images/DragDrop1.png

If the rack you're dragging to is collapsed, you can still drop a plugin and it will be placed at the end of the rack. Alternatively you can hover over the rack and after about a second the rack will expand and you can select where to drop the plugin.

To copy instead of moving hold the control key while dragging:

images/DragDrop2.png

To create a new rack when dropping position the cursor between the two racks (only works if the rack above is expanded):

images/DragDrop3.png

Also, you can drag .fxb, .fxp and .dll files from Windows Explorer and either insert into a rack (like above), or replace an existing plugin:

images/DragDrop4.png

You can drop Cantabile session files anywhere on the main window to open that session, or if you drop a .fxb, .fxp or .dll somewhere on the main window, but outside the list of plugins it will create a new session with that plugin loaded into the first slot.

There was a fair bit of work in all this:

  • Update SkinLib to support OLE drag drop in child windowless controls
  • Update SkinLib for post paint operations so the insert markers (the orange line/box in the above screenshots) can be painted over the plugins and racks
  • Add code to automatically scroll the plugin list when the cursor is near the edge.
  • Hover detection for the automatic rack expand
  • Implement an OLE Drag Source for the drag operations.

Ironically the actual work of moving and inserting plugins was mostly already done with the existing support for Move Up/Down and clipboard support.

Finally, while testing the drag drop I found myself habitually reaching for Ctrl+Z to undo what I just did. Unfortunately Cantabile has no Undo feature. Perhaps I should do something about that...

Posted on December 3, 2007

Share This

Leave A Comment

All comments will be reviewed for spam before being displayed.