External Process Editor Copying Into The Main Plugin Editor

Guys, before I reinvent the wheel, I wonder if there’s already some resources about this. I created a new code that opens an external process where my plugin code resides. The main plugin code talks to this process using Pipes. If the external process crashes somehow it doesn’t affect the DAW/Host this way.

It works great, and I’m almost at the point of sharing it. BUT, I would love to have the external editor “tunneled” to the main plugin editor. So we don’t end up with two windows as it now does.

I could just request the GUI changes from time to time, and send all mouse events. Also, I would need to handle PopupMenus and other dialogs in a different way. So I wonder if something like this has already been done, or if there’s already a solution inside JUCE that I don’t know. Already searched a lot. :wink:

Thanks for any helps.

Best Regards, WilliamK @ Wusik.com

Ok, so far I got it working by using the named pipe and just drawing the editor every N ms. I then compare each line of the image with a previous one and only send the data of the lines that changed. This kept CPU usage way low. Before it was very high. I also send all mouse events manually to the external process and there I check for each component in the editor and which one should receive the events, and also which one is been dragged. It all works great, BUT… there are some problems I still need to resolve.

  1. popup menus show and disappear right away. I had to change the code a bit so they show and only go away when the mouse go outside its area. Removing the out-of-focus code.

  2. sometimes dialogs will popup under the window I’m working on and I haven’t figure out why. It could be that they show in mouse-down instead of mouse-up, I will check my code to see if that’s the case.

  3. tools tips I will have to manually handle myself.

But apart from that it all seems to be working ok. I may release this as open-source if some users want it. Just give me more time to really get it working correctly.

Cheers, WilliamK