I have used the plugin example to get my app to the point where I can open VST3 plugins inside a new window. However, I would like to just embed the editor component inside the current application window, not open a new window. I also would not like the plugin editor to steal keyboard focus. Is this possible to do? The app is linux only and the plugins would be VST3 only. There would also only ever be 1 plugin being shown at a time
See this screenshot from Reaper which shows the editor inside the FX window for an example of what I would like to accomplish:
So I have made some sort of hack-like progress. I definitely do not feel like this is the way to do it but it gives me hope. I have a plugin view component which I kind of modeled after the juce ViewPort. This plugin view has a weak reference to a content component, along with a setViewedComponent method which sets this weak reference to the component that is to be displayed. When I want to show the plugin editor I open the window using plugin->showWindowExplicitly(). Then I use the setViewedComponent method on my plugin view and pass in the child component at index 1 of the plugin window (its index 1 since my plugin is resizable and index 0 seems to be just the resizable content component or something, not the actual editor)
// plugin is a tracktion_engine:::Plugin* plugin->showWindowExplicitly(); pluginView->setViewedComponent(plugin->windowState->pluginWindow->getChildComponent(1));
This produces the following:
The black window is the plugin window, while the grey window is my actual app. The editor is in my app window, and resizing the app works as expected. Once I close the external plugin window the editor disappears though. Also it seems the new window steals keyboard focus away which I don’t want.