Implement IPlugFrame::resizeView()

The base IPlugFrame only contains this single function.
This commit is contained in:
Robbert van der Helm
2020-12-22 15:09:33 +01:00
parent 3bc3409929
commit 656f6d3f6c
8 changed files with 86 additions and 26 deletions
+2 -1
View File
@@ -140,7 +140,8 @@ using CallbackRequest = std::variant<WantsConfiguration,
YaComponentHandler::PerformEdit,
YaComponentHandler::EndEdit,
YaComponentHandler::RestartComponent,
YaHostApplication::GetName>;
YaHostApplication::GetName,
YaPlugFrame::ResizeView>;
template <typename S>
void serialize(S& s, CallbackRequest& payload) {
@@ -61,6 +61,28 @@ class YaPlugFrame : public Steinberg::IPlugFrame {
inline bool supported() const { return arguments.supported; }
/**
* Message to pass through a call to `IPlugFrame::resizeView` to the
* `IPlugView` object provided by the host.
*
* XXX: Since we don't support multiple `IPlugView`s right now (as it's not
* used the SDK's current version), we'll just assume that `view` is
* the view stored in `Vst3PluginProxyImpl::plug_view`
*/
struct ResizeView {
using Response = UniversalTResult;
native_size_t owner_instance_id;
Steinberg::ViewRect new_size;
template <typename S>
void serialize(S& s) {
s.value8b(owner_instance_id);
s.object(new_size);
}
};
virtual tresult PLUGIN_API
resizeView(Steinberg::IPlugView* view,
Steinberg::ViewRect* newSize) override = 0;