Audacity 3.2.0
VST3ParametersWindow.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file VST3ParametersWindow.h
6
7 @author Vitaly Sverchinsky
8
9 @brief Part of Audacity VST3 module
10
11**********************************************************************/
12
13#pragma once
14
15#include <unordered_map>
16#include <wx/scrolwin.h>
17#include <pluginterfaces/base/smartpointer.h>
18#include <pluginterfaces/vst/vsttypes.h>
19
20namespace Steinberg
21{
22 namespace Vst
23 {
24 class IComponentHandler;
25 class IEditController;
26 }
27}
28
29class wxStaticText;
31
35class VST3ParametersWindow : public wxScrolledWindow
36{
37 const Steinberg::IPtr<Steinberg::Vst::IEditController> mEditController;
38 const Steinberg::IPtr<Steinberg::Vst::IComponentHandler> mComponentHandler;
39 std::unordered_map<Steinberg::Vst::ParamID, VST3ParameterControl*> mControls;
40 std::unordered_map<Steinberg::Vst::ParamID, VST3ParameterControl*> mLabels;
41public:
42
49 static VST3ParametersWindow* Setup(wxWindow& parent,
50 Steinberg::Vst::IEditController& editController,
51 Steinberg::Vst::IComponentHandler& componentHandler);
52
53 VST3ParametersWindow(wxWindow *parent,
54 Steinberg::Vst::IEditController& editController,
55 Steinberg::Vst::IComponentHandler& handler,
56 wxWindowID id = wxID_ANY,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = wxScrolledWindowStyle,
60 const wxString& name = wxPanelNameStr);
61
62 //Updates all controls to match current state of the IEditController
63 void ReloadParameters();
64
65 //Updates individual parameter, useful during playback
66 //(to update automated parameters or meters)
67 void UpdateParameter(Steinberg::Vst::ParamID paramId);
68
69private:
70
73
74 void OnParameterValueChanged(const wxCommandEvent& evt);
75};
wxString name
Definition: TagsEditor.cpp:166
TranslatableString label
Definition: TagsEditor.cpp:165
"Plain" plugin UI, contains a list of parameter controls and values.
void OnParameterValueChanged(const wxCommandEvent &evt)
void RegisterParameterLabel(VST3ParameterControl *label)
std::unordered_map< Steinberg::Vst::ParamID, VST3ParameterControl * > mControls
void UpdateParameter(Steinberg::Vst::ParamID paramId)
const Steinberg::IPtr< Steinberg::Vst::IComponentHandler > mComponentHandler
VST3ParametersWindow(wxWindow *parent, Steinberg::Vst::IEditController &editController, Steinberg::Vst::IComponentHandler &handler, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxScrolledWindowStyle, const wxString &name=wxPanelNameStr)
static VST3ParametersWindow * Setup(wxWindow &parent, Steinberg::Vst::IEditController &editController, Steinberg::Vst::IComponentHandler &componentHandler)
Creates VST3ParametersWindow inside parent.
std::unordered_map< Steinberg::Vst::ParamID, VST3ParameterControl * > mLabels
void RegisterParameterControl(VST3ParameterControl *control)
const Steinberg::IPtr< Steinberg::Vst::IEditController > mEditController