From 48787b5e602455129e0bf9804820b14d3a4d928f Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 6 Jan 2021 23:45:24 +0100 Subject: [PATCH] Add logging for IContextMenuTarget --- src/common/logging/vst3.cpp | 11 ++++++++++- src/common/logging/vst3.h | 2 ++ src/common/serialization/vst3/context-menu-proxy.h | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/common/logging/vst3.cpp b/src/common/logging/vst3.cpp index 418bdcc3..7ba21859 100644 --- a/src/common/logging/vst3.cpp +++ b/src/common/logging/vst3.cpp @@ -165,6 +165,15 @@ bool Vst3Logger::log_request(bool is_host_vst, }); } +bool Vst3Logger::log_request( + bool is_host_vst, + const YaContextMenuTarget::ExecuteMenuItem& request) { + return log_request_base(is_host_vst, [&](auto& message) { + message << request.owner_instance_id << ": ::executeMenuItem(tag = " << request.tag << ")"; + }); +} + bool Vst3Logger::log_request( bool is_host_vst, const YaEditController::SetComponentState& request) { @@ -929,7 +938,7 @@ bool Vst3Logger::log_request(bool is_host_vst, return log_request_base(is_host_vst, [&](auto& message) { // We don't know what class this instance was originally instantiated // as, but it also doesn't really matter - message << request.owner_instance_id << ": ::~IContextMenu()"; }); } diff --git a/src/common/logging/vst3.h b/src/common/logging/vst3.h index a3c89ce0..ac22b3ab 100644 --- a/src/common/logging/vst3.h +++ b/src/common/logging/vst3.h @@ -72,6 +72,8 @@ class Vst3Logger { bool log_request(bool is_host_vst, const YaConnectionPoint::Connect&); bool log_request(bool is_host_vst, const YaConnectionPoint::Disconnect&); bool log_request(bool is_host_vst, const YaConnectionPoint::Notify&); + bool log_request(bool is_host_vst, + const YaContextMenuTarget::ExecuteMenuItem&); bool log_request(bool is_host_vst, const YaEditController::SetComponentState&); bool log_request(bool is_host_vst, diff --git a/src/common/serialization/vst3/context-menu-proxy.h b/src/common/serialization/vst3/context-menu-proxy.h index 1fbeba7c..872e7ab1 100644 --- a/src/common/serialization/vst3/context-menu-proxy.h +++ b/src/common/serialization/vst3/context-menu-proxy.h @@ -34,6 +34,8 @@ * the user clicks on them. As far as I'm aware, not a single Linux VST3 host * implements `IComponentHandler3` and thus provides support for these context * menus. + * + * TODO: None of this has been tested because no host on Linux implement this. */ class Vst3ContextMenuProxy : public YaContextMenu { public: