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

Method PopulateOrExchange

src/effects/EqualizationUI.cpp:108–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108std::unique_ptr<EffectEditor> EqualizationUI::PopulateOrExchange(
109 ShuttleGui & S, EffectInstance &, EffectSettingsAccess &access,
110 const EffectOutputs *)
111{
112 mBands.Init();
113
114 auto &parameters = mCurvesList.mParameters;
115 const auto &M = parameters.mM;
116 const auto &loFreq = parameters.mLoFreq;
117 const auto &hiFreq = parameters.mHiFreq;
118 const auto &curves = mCurvesList.mCurves;
119
120 auto &drawMode = parameters.mDrawMode;
121
122 S.SetBorder(0);
123
124 S.SetSizerProportion(1);
125 S.Prop(1).StartMultiColumn(1, wxEXPAND);
126 {
127 S.SetStretchyCol(0);
128 //S.SetStretchyRow(0); // The 5px Top border
129 S.SetStretchyRow(1); // The Graph
130 S.SetStretchyRow(2); // The EQ sliders
131 szrV = S.GetSizer();
132
133 // -------------------------------------------------------------------
134 // ROW 0: Top border
135 // -------------------------------------------------------------------
136 S.AddSpace(5);
137
138 // -------------------------------------------------------------------
139 // ROW 1: Equalization panel and sliders for vertical scale
140 // -------------------------------------------------------------------
141 S.SetSizerProportion(1);
142 S.Prop(1).StartMultiColumn(3, wxEXPAND);
143 {
144 S.SetStretchyCol(1);
145 S.SetStretchyRow(0);
146 szr1 = S.GetSizer();
147
148 S.StartVerticalLay(wxEXPAND, 1);
149 {
150 // Inserted into sizer later, but the EQ panel needs to point to it
151 mFreqRuler = safenew RulerPanel(
152 S.GetParent(), wxID_ANY, wxHORIZONTAL,
153 wxSize{ 100, 100 }, // Ruler can't handle small sizes
154 RulerPanel::Range{ loFreq, hiFreq },
155 IntFormat::Instance(),
156 XO("Hz"),
157 RulerPanel::Options{}
158 .Log(true)
159 .Flip(true)
160 .LabelEdges(true)
161 .TicksAtExtremes(true)
162 .TickColour( { 0, 0, 0 } )
163 );
164
165 mdBRuler = safenew RulerPanel(

Callers

nothing calls this directly

Calls 15

BindToFunction · 0.85
MsgidsFunction · 0.85
VerbatimFunction · 0.85
SetStretchyColMethod · 0.80
SetStretchyRowMethod · 0.80
GetSizerMethod · 0.80
AddWindowMethod · 0.80
PositionMethod · 0.80
SetTrackLenMethod · 0.80
AddVariableTextMethod · 0.80
AddSliderMethod · 0.80
AddBandSlidersMethod · 0.80

Tested by

no test coverage detected