3#include <pluginterfaces/gui/iplugview.h>
20 :
EffectEditor(effect, access), mWrapper(wrapper), mParent(parent)
24 auto vSizer = std::make_unique<wxBoxSizer>(wxVERTICAL);
25 auto controlsRoot =
safenew wxWindow(parent, wxID_ANY);
28 vSizer->Add(controlsRoot);
35 extra.GetDurationFormat(),
42 auto hSizer = std::make_unique<wxBoxSizer>(wxHORIZONTAL);
43 hSizer->Add(
safenew wxStaticText(parent, wxID_ANY,
_(
"Duration:")));
46 vSizer->AddSpacer(10);
47 vSizer->Add(hSizer.release());
49 parent->SetMinSize(vSizer->CalcMin());
50 parent->SetSizer(vSizer.release());
62 [
this](Steinberg::Vst::ParamID
id, Steinberg::Vst::ParamValue value) {
63 Publish({
static_cast<size_t>(
id),
static_cast<float>(value) });
70 mParent->PushEventHandler(
this);
85 bool hasChanges{
false};
102 parent->SetMinSize(wxDefaultSize);
111 static const auto platformType =
117# error "Platform not supported"
120 view->setFrame(plugFrame);
121 if(view->attached(parent->GetHandle(), platformType) != kResultOk)
125 ViewRect initialSize;
126 if(view->getSize(&initialSize) == kResultOk)
127 plugFrame->init(view.get(), &initialSize);
const NumericConverterType & NumericConverterType_TIME()
static Settings & settings()
EffectSettingsAccess & mAccess
void ModifySettings(Function &&function)
Do a correct read-modify-write of settings.
virtual const EffectSettings & Get()=0
virtual void Flush()=0
Make the last Set changes "persistent" in underlying storage.
static FormatterContext SampleRateContext(double sampleRate)
void SetName(const TranslatableString &name)
CallbackReturn Publish(const EffectSettingChanged &message)
Send a message to connected callbacks.
bool ValidateUI() override
Get settings data from the panel; may make error dialogs and return false.
bool UpdateUI() override
Update appearance of the panel for changes in settings.
bool TryLoadNativeUI(wxWindow *parent)
VST3ParametersWindow * mPlainUI
Steinberg::IPtr< Steinberg::IPlugFrame > mPlugFrame
void OnIdle(wxIdleEvent &)
Steinberg::IPtr< Steinberg::IPlugView > mPlugView
bool IsGraphicalUI() override
NumericTextCtrl * mDuration
VST3Editor(wxWindow *parent, VST3Wrapper &wrapper, const EffectUIServices &effect, EffectType type, EffectSettingsAccess &access, bool useNativeUI)
static VST3ParametersWindow * Setup(wxWindow &parent, Steinberg::Vst::IEditController &editController, Steinberg::Vst::IComponentHandler &componentHandler)
Creates VST3ParametersWindow inside parent.
void BeginParameterEdit(EffectSettingsAccess &access)
Steinberg::IPtr< Steinberg::Vst::IEditController > mEditController
Steinberg::IPtr< Steinberg::Vst::IComponentHandler > mComponentHandler
void FetchSettings(EffectSettings &)
Fetch state from settings object, may change internal runtime data.
std::function< void(Steinberg::Vst::ParamID, Steinberg::Vst::ParamValue)> ParamChangedHandler
bool IsActive() const noexcept
void StoreSettings(EffectSettings &) const
Saves current state inside settings object, clears all runtime data.
Steinberg::Vst::ProcessSetup mSetup
void FlushParameters(EffectSettings &settings, bool *hasChanges=nullptr)
Dispatches window resize events from VST PlugView to the wxWindow.
Wrapper for GtkSocket object, which provides X window mapping via XEmbed protocol.
Externalized state of a plug-in.
EffectSettingsExtra extra
Options & AutoPos(bool enable)