Implement IComponentHandler::beginEdit()

This commit is contained in:
Robbert van der Helm
2020-12-19 15:36:50 +01:00
parent eacd5f27f5
commit 3b06bca95e
8 changed files with 56 additions and 9 deletions
+2 -1
View File
@@ -105,7 +105,8 @@ void serialize(S& s, ControlRequest& payload) {
* information we want or the operation we want to perform. A request of type
* `CallbackRequest(T)` should send back a `T::Response`.
*/
using CallbackRequest = std::variant<WantsConfiguration>;
using CallbackRequest =
std::variant<WantsConfiguration, YaComponentHandler::BeginEdit>;
template <typename S>
void serialize(S& s, CallbackRequest& payload) {
@@ -61,6 +61,24 @@ class YaComponentHandler : public Steinberg::Vst::IComponentHandler {
inline bool supported() const { return arguments.supported; }
/**
* Message to pass through a call to `IComponentHandler::beginEdit(id)` to
* the component handler provided by the host.
*/
struct BeginEdit {
using Response = UniversalTResult;
native_size_t owner_instance_id;
Steinberg::Vst::ParamID id;
template <typename S>
void serialize(S& s) {
s.value8b(owner_instance_id);
s.value4b(id);
}
};
virtual tresult PLUGIN_API
beginEdit(Steinberg::Vst::ParamID id) override = 0;
virtual tresult PLUGIN_API