| 144 | ExportFilePanel::~ExportFilePanel() = default; |
| 145 | |
| 146 | void 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 | } |
nothing calls this directly
no test coverage detected