mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-08 12:30:12 +02:00
Implement IPlugView::checkSizeConstraint()
With this the whole of `IPlugView` and thus also `IEditController` is implemented.
This commit is contained in:
@@ -333,6 +333,18 @@ bool Vst3Logger::log_request(bool is_host_vst,
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPlugView::CheckSizeConstraint& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
message << request.owner_instance_id
|
||||
<< ": IPlugView::checkSizeConstraint(rect = "
|
||||
"<ViewRect* with left = "
|
||||
<< request.rect.left << ", top = " << request.rect.top
|
||||
<< ", right = " << request.rect.right
|
||||
<< ", bottom = " << request.rect.bottom << ">)";
|
||||
});
|
||||
}
|
||||
|
||||
bool Vst3Logger::log_request(bool is_host_vst,
|
||||
const YaPluginBase::Initialize& request) {
|
||||
return log_request_base(is_host_vst, [&](auto& message) {
|
||||
|
||||
@@ -99,6 +99,7 @@ class Vst3Logger {
|
||||
bool log_request(bool is_host_vst, const YaPlugView::OnFocus&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::SetFrame&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::CanResize&);
|
||||
bool log_request(bool is_host_vst, const YaPlugView::CheckSizeConstraint&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Initialize&);
|
||||
bool log_request(bool is_host_vst, const YaPluginBase::Terminate&);
|
||||
bool log_request(bool is_host_vst, const YaPluginFactory::Construct&);
|
||||
|
||||
@@ -90,6 +90,7 @@ using ControlRequest = std::variant<Vst3PlugViewProxy::Destruct,
|
||||
YaPlugView::OnFocus,
|
||||
YaPlugView::SetFrame,
|
||||
YaPlugView::CanResize,
|
||||
YaPlugView::CheckSizeConstraint,
|
||||
YaPluginBase::Initialize,
|
||||
YaPluginBase::Terminate,
|
||||
YaPluginFactory::Construct,
|
||||
|
||||
@@ -319,6 +319,25 @@ class YaPlugView : public Steinberg::IPlugView {
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API canResize() override = 0;
|
||||
|
||||
/**
|
||||
* Message to pass through a call to `IPlugView::checkSizeConstraint(rect)`
|
||||
* to the Wine plugin host.
|
||||
*/
|
||||
struct CheckSizeConstraint {
|
||||
using Response = UniversalTResult;
|
||||
|
||||
native_size_t owner_instance_id;
|
||||
|
||||
Steinberg::ViewRect rect;
|
||||
|
||||
template <typename S>
|
||||
void serialize(S& s) {
|
||||
s.value8b(owner_instance_id);
|
||||
s.object(rect);
|
||||
}
|
||||
};
|
||||
|
||||
virtual tresult PLUGIN_API
|
||||
checkSizeConstraint(Steinberg::ViewRect* rect) override = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user