Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText Class Referencefinal
Inheritance diagram for anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText:
[legend]
Collaboration diagram for anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText:
[legend]

Public Member Functions

 VST3ValueText (wxWindow *parent, wxWindowID id, Steinberg::Vst::ParamID paramId, const wxString &units, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxStaticTextNameStr)
 
void SetNormalizedValue (Steinberg::Vst::IEditController &editController, Steinberg::Vst::ParamValue value) override
 
Steinberg::Vst::ParamValue GetNormalizedValue (Steinberg::Vst::IEditController &editController) const override
 
- Public Member Functions inherited from VST3ParameterControl
 VST3ParameterControl (Steinberg::Vst::ParamID id)
 
virtual ~VST3ParameterControl ()
 
virtual void SetNormalizedValue (Steinberg::Vst::IEditController &, Steinberg::Vst::ParamValue value)=0
 
virtual Steinberg::Vst::ParamValue GetNormalizedValue (Steinberg::Vst::IEditController &editController) const =0
 
virtual void UpdateAccessible (Steinberg::Vst::IEditController &editController, Steinberg::Vst::ParamValue value)
 
Steinberg::Vst::ParamID GetParameterId () const noexcept
 

Private Attributes

const wxString mUnits
 

Detailed Description

Definition at line 51 of file VST3ParametersWindow.cpp.

Constructor & Destructor Documentation

◆ VST3ValueText()

anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText::VST3ValueText ( wxWindow *  parent,
wxWindowID  id,
Steinberg::Vst::ParamID  paramId,
const wxString &  units,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0,
const wxString &  name = wxStaticTextNameStr 
)
inline

Definition at line 55 of file VST3ParametersWindow.cpp.

63 : wxStaticText(parent, id, wxEmptyString, pos, size, style, name)
64 , VST3ParameterControl(paramId)
65 , mUnits(units) { }
const TranslatableString name
Definition: Distortion.cpp:76
VST3ParameterControl(Steinberg::Vst::ParamID id)

Member Function Documentation

◆ GetNormalizedValue()

Steinberg::Vst::ParamValue anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText::GetNormalizedValue ( Steinberg::Vst::IEditController &  editController) const
inlineoverridevirtual

Implements VST3ParameterControl.

Definition at line 77 of file VST3ParametersWindow.cpp.

78 {
79 return editController.getParamNormalized(GetParameterId());
80 }
Steinberg::Vst::ParamID GetParameterId() const noexcept

◆ SetNormalizedValue()

void anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText::SetNormalizedValue ( Steinberg::Vst::IEditController &  editController,
Steinberg::Vst::ParamValue  value 
)
inlineoverridevirtual

Implements VST3ParameterControl.

Definition at line 67 of file VST3ParametersWindow.cpp.

68 {
69 Steinberg::Vst::String128 str { };
70 editController.getParamStringByValue(GetParameterId(), value, str);
71 if(mUnits.empty())
72 SetLabel(VST3Utils::ToWxString(str));
73 else
74 SetLabel(wxString::Format("%s %s", VST3Utils::ToWxString(str), mUnits));
75 }
#define str(a)
static wxString ToWxString(const Steinberg::Vst::TChar *str)
Definition: VST3Utils.cpp:93

References str, and VST3Utils::ToWxString().

Here is the call graph for this function:

Member Data Documentation

◆ mUnits

const wxString anonymous_namespace{VST3ParametersWindow.cpp}::VST3ValueText::mUnits
private

Definition at line 53 of file VST3ParametersWindow.cpp.


The documentation for this class was generated from the following file: