While each stack component – and the contained Buttons – are correctly clipped by the Viewport, the AudioProcessorEditor is not. It is drawn over the scrollbars and outside of the Viewport’s bounds.
In the screen shots you see how the AudioProcessorEditor (containing the text ‘Melody’) draws outside of the Viewport, while its Button sibling components behave as expected.
I’ve tried fiddling with the AudioProcessorEditor instances like this, but to no avail:
I’m quite new to JUCE, so I’m not sure how to continue from here.
BTW, all this happens on macOS, and the hosted plugin UIs are NSView based, but I’m not sure it’s a mac specific issue, which is why I’m posting in General Discussion.
Sorry, I meant a native window handle and not a separate window. However I believe in terms of the OS it’s managed as if it’s a separate window in terms of drawing and event handling.
Have you ever seen another DAW that has that feature?
It’s important to mention that the editor you’re seeing in your code is not the actual editor. It’s a wrapper around the real editor - which I believe would have a separate handle than yours.
I don’t quite understand why it doesn’t work as advertised.
Plugins are just views, not windows. The ‘window’ is only supplied by the DAW.
Here I’m just loading (having JUCE load) a couple of plugins, and their AudioProcessorEditors. The DAW that my plugin is running in is not involved / aware.
Case in point: when I’m developing a native Cocoa application that loads Audio Units, I can access the NSView that the AU provides, stick those into an NSScrollView or NSCollectionView and do anything with it that an NSView supports.
Currently the loaded AudioProcessorEditorare clipped to my plugin window bounds, but not by the Viewport inside my plugin window.