Proxy host context menu items for VST3 plugins

This wasn't implemented yet because no plugin tried using the interface
in this way before this, but Surge XT incorporates the host's context
menu items into their own (much more elaborate) context menu. To
accommodate this, we now copy over all of the host's prepopulated
context menu items to the Wine plugin host, and calling the targets
associated with any of those items will cause the target on the
associated context menu item on the host to be called.

This is slightly more complicated than what would otherwise be necessary
because Bitwig does not assign tags to their context menu items and
instead always uses 0.
This commit is contained in:
Robbert van der Helm
2022-01-03 17:04:00 +01:00
parent 89cd1e9ee3
commit c625deadef
16 changed files with 219 additions and 107 deletions
+4 -1
View File
@@ -387,10 +387,13 @@ void Vst3Bridge::run() {
const auto& [instance, _] =
get_instance(request.owner_instance_id);
// This is of course only used for calling plugin defined
// targets from the host, this will never be called when the
// host calls their own targets for whatever reason
return instance.registered_context_menus
.at(request.context_menu_id)
.get()
.context_menu_targets_[request.target_tag]
.plugin_targets_[request.target_tag]
->executeMenuItem(request.tag);
},
[&](YaEditController::SetComponentState& request)