mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-15 21:15:51 +02:00
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:
@@ -353,13 +353,14 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
|
||||
Steinberg::IPtr<Steinberg::Vst::IContextMenu> menu;
|
||||
|
||||
/**
|
||||
* All targets we pass to `IContextMenu::addItem`. We'll store them per
|
||||
* All targets passed to `IContextMenu::addItem`. We'll store them per
|
||||
* item tag, so we can drop them together with the menu. We probably
|
||||
* don't have to use smart pointers for this, but the docs are missing a
|
||||
* lot of details o how this should be implemented and there's no
|
||||
* example implementation around.
|
||||
*/
|
||||
std::unordered_map<int32, Steinberg::IPtr<YaContextMenuTarget>> targets;
|
||||
std::unordered_map<int32, Steinberg::IPtr<YaContextMenuTarget>>
|
||||
plugin_targets;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user