MCPcopy Create free account
hub / github.com/audacity/audacity / PopulateOrExchange

Method PopulateOrExchange

src/effects/LegacyCompressor.cpp:92–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92std::unique_ptr<EffectEditor> EffectLegacyCompressor::PopulateOrExchange(
93 ShuttleGui& S, EffectInstance&, EffectSettingsAccess&, const EffectOutputs*)
94{
95 mUIParent = S.GetParent();
96 S.SetBorder(5);
97
98 S.StartHorizontalLay(wxEXPAND, true);
99 {
100 S.SetBorder(10);
101 mPanel = safenew EffectLegacyCompressorPanel(
102 S.GetParent(), wxID_ANY, mThresholdDB, mNoiseFloorDB, mRatio);
103 S.Prop(true)
104 .Position(wxEXPAND | wxALL)
105 .MinSize( { 400, 200 } )
106 .AddWindow(mPanel);
107 S.SetBorder(5);
108 }
109 S.EndHorizontalLay();
110
111 S.StartStatic( {} );
112 {
113 S.StartMultiColumn(3, wxEXPAND);
114 {
115 S.SetStretchyCol(1);
116 mThresholdLabel = S.AddVariableText(XO("&Threshold:"), true,
117 wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
118 mThresholdSlider = S.Id(ID_Threshold)
119 .Name(XO("Threshold"))
120 .Style(wxSL_HORIZONTAL)
121 .AddSlider( {},
122 Threshold.def * Threshold.scale,
123 Threshold.max * Threshold.scale,
124 Threshold.min * Threshold.scale);
125 mThresholdText = S.AddVariableText(ThresholdFormat(999), true,
126 wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
127
128 mNoiseFloorLabel = S.AddVariableText(XO("&Noise Floor:"), true,
129 wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
130 mNoiseFloorSlider = S.Id(ID_NoiseFloor)
131 .Name(XO("Noise Floor"))
132 .Style(wxSL_HORIZONTAL)
133 .AddSlider( {},
134 NoiseFloor.def * NoiseFloor.scale,
135 NoiseFloor.max * NoiseFloor.scale,
136 NoiseFloor.min * NoiseFloor.scale);
137 mNoiseFloorText = S.AddVariableText(ThresholdFormat(999),
138 true, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
139
140 mRatioLabel = S.AddVariableText(XO("&Ratio:"), true,
141 wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
142 mRatioSlider = S.Id(ID_Ratio)
143 .Name(XO("Ratio"))
144 .Style(wxSL_HORIZONTAL)
145 .AddSlider( {},
146 Ratio.def * Ratio.scale,
147 Ratio.max * Ratio.scale,
148 Ratio.min * Ratio.scale);
149 mRatioSlider->SetPageSize(5);

Callers

nothing calls this directly

Calls 15

ThresholdFormatFunction · 0.85
RatioTextFormatFunction · 0.85
AttackTimeFormatFunction · 0.85
DecayTimeFormatFunction · 0.85
AddWindowMethod · 0.80
PositionMethod · 0.80
StartStaticMethod · 0.80
SetStretchyColMethod · 0.80
AddVariableTextMethod · 0.80
AddSliderMethod · 0.80
SetPageSizeMethod · 0.80

Tested by

no test coverage detected