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

Method PopulateOrExchange

src/export/ExportFilePanel.cpp:146–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144ExportFilePanel::~ExportFilePanel() = default;
145
146void ExportFilePanel::PopulateOrExchange(ShuttleGui& S)
147{
148 TranslatableStrings formats;
149 if(S.GetMode() == eIsCreating)
150 {
151 for(auto [plugin, formatIndex] : ExportPluginRegistry::Get())
152 {
153 auto formatInfo = plugin->GetFormatInfo(formatIndex);
154 formats.push_back(formatInfo.description);
155 }
156 }
157
158 S.SetBorder(5);
159 S.StartMultiColumn(3, wxEXPAND);
160 {
161 S.SetStretchyCol(1);
162
163 mFullName = S.AddTextBox(XO("File &Name:"), {}, 0);
164 mFullName->Bind(wxEVT_KILL_FOCUS, &ExportFilePanel::OnFullNameFocusKill, this);
165 S.AddSpace(1);
166
167 mFolder = S.AddTextBox(XO("Fo&lder:"), {}, 0);
168 S.Id(FolderBrowseID).AddButton(XO("&Browse..."));
169
170 mFormat = S.Id(FormatID).AddChoice(XO("&Format:"), formats);
171 S.AddSpace(1);
172 }
173 S.EndMultiColumn();
174
175 S.SetBorder(5);
176 S.StartStatic(XO("Audio options"));
177 {
178 S.StartTwoColumn();
179 {
180 if(auto prompt = S.AddPrompt(XO("Channels")))
181 prompt->SetMinSize({140, -1});
182
183 S.StartHorizontalLay(wxALIGN_LEFT);
184 {
185 S.SetBorder(2);
186
187 const int channels = 2;
188
189 mMono = S.Id(AudioMixModeMonoID).AddRadioButton(XO("M&ono"), 1, channels);
190 mStereo = S.Id(AudioMixModeStereoID).AddRadioButtonToGroup(XO("&Stereo"), 2, channels);
191 if(!mMonoStereoMode)
192 {
193 //i18n-hint refers to custom channel mapping configuration
194 mCustomMapping = S.Id(AudioMixModeCustomID).AddRadioButtonToGroup(XO("Custom mappin&g"), 0, true);
195 mCustomizeChannels = S.Id(AudioChannelsConfigureID)
196 //i18n-hint accessibility hint, refers to export channel configuration
197 .Name(XO("Configure custom mapping"))
198 .AddButton(XO("Configure"));
199#if wxUSE_ACCESSIBILITY
200 safenew WindowAccessible(mCustomizeChannels);
201#endif
202 }
203 }

Callers

nothing calls this directly

Calls 15

GetFunction · 0.85
GetModeMethod · 0.80
SetStretchyColMethod · 0.80
AddTextBoxMethod · 0.80
BindMethod · 0.80
AddChoiceMethod · 0.80
StartStaticMethod · 0.80
AddPromptMethod · 0.80
AddRadioButtonMethod · 0.80
AddRadioButtonToGroupMethod · 0.80
StartPanelMethod · 0.80
EndPanelMethod · 0.80

Tested by

no test coverage detected