14#include <wx/wupdlock.h>
20Steinberg::tresult PlugFrame::queryInterface (const ::Steinberg::TUID _iid,
void** obj)
22 QUERY_INTERFACE (_iid, obj, Steinberg::FUnknown::iid, Steinberg::IPlugFrame);
23 QUERY_INTERFACE (_iid, obj, Steinberg::IPlugFrame::iid, Steinberg::IPlugFrame);
26 if (
mRunLoop && Steinberg::FUnknownPrivate::iidEqual (_iid, Steinberg::Linux::IRunLoop::iid))
29 *obj =
static_cast<Steinberg::Linux::IRunLoop*
>(
mRunLoop.get());
30 return ::Steinberg::kResultOk;
33 return ::Steinberg::kNoInterface;
37 : mWindow(window), mRunLoop(runLoop)
56 auto size = wxSize(viewRect->getWidth(), viewRect->getHeight());
58 auto topWindow = wxGetTopLevelParent(window);
59 wxWindowUpdateLocker windowUpdateLocker(topWindow);
61 window->SetInitialSize(
size);
63 window->GetChildren()[0]->SetInitialSize(
size);
65 topWindow->SetMinSize(wxDefaultSize);
67 topWindow->SetMinSize(topWindow->GetSize());
75 return view->onSize(viewRect);
77 return Steinberg::kResultFalse;
void init(Steinberg::IPlugView *view, Steinberg::ViewRect *size)
Steinberg::IPtr< Steinberg::Linux::IRunLoop > mRunLoop
PlugFrame(Steinberg::Linux::IRunLoop *runLoop, wxWindow *window)
Steinberg::tresult PLUGIN_API resizeView(Steinberg::IPlugView *view, Steinberg::ViewRect *newSize) override
wxWeakRef< wxWindow > mWindow