Audacity  3.0.3
Functions
AudacityMessageBox.cpp File Reference
#include "AudacityMessageBox.h"
#include "Internat.h"
#include "Journal.h"
#include "wxArrayStringEx.h"
Include dependency graph for AudacityMessageBox.cpp:

Go to the source code of this file.

Functions

int AudacityMessageBox (const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
 

Function Documentation

◆ AudacityMessageBox()

int AudacityMessageBox ( const TranslatableString message,
const TranslatableString caption,
long  style,
wxWindow *  parent,
int  x,
int  y 
)

Definition at line 17 of file AudacityMessageBox.cpp.

20 {
21  // wxMessageBox is implemented with native message boxes and does not
22  // use the wxWidgets message machinery. Therefore the wxEventFilter that
23  // most journal recording relies on fails us here. So if replaying, don't
24  // really make the modal dialog, but just return the expected value.
25  return Journal::IfNotPlaying( L"MessageBox", [&]{
26  return ::wxMessageBox(
27  message.Translation(), caption.Translation(),
28  style, parent, x, y);
29  } );
30 }

References Journal::IfNotPlaying(), and TranslatableString::Translation().

Referenced by AudioIO::AllocateBuffers(), MacroCommands::ApplyCommand(), MacroCommands::ApplyEffectCommand(), AudioIO::AudioIO(), MacrosWindow::ChangeOK(), CheckFFmpegPresence(), ExportMP3::CheckFileName(), ExportCL::CheckFileName(), ProjectFileManager::Compact(), ConvertLegacyProjectFile(), CreateDirectory(), ThemeBase::CreateImageCache(), ExportMultipleDialog::DirOk(), anonymous_namespace{FileMenus.cpp}::DoExport(), wxWidgetsBasicUI::DoMessageBox(), ProjectFileManager::DoSave(), PluginManager::DropFile(), encode_audio(), ExportFFmpeg::EncodeAudioFrame(), EVT_MENU_RANGE(), TimerRecordDialog::ExecutePostRecordActions(), ExportCL::Export(), ExportFFmpeg::Export(), ExportFLAC::Export(), ExportMP3::Export(), ExportOGG::Export(), ExportPCM::Export(), AudioUnitEffect::ExportPresets(), Effect::ExportPresets(), VSTEffect::ExportPresets(), FFmpegStartup(), ExportFFmpeg::Finalize(), EffectManager::GetAudacityCommand(), FrequencyPlotDialog::GetAudio(), EffectManager::GetEffect(), Exporter::GetFilename(), gtk_filedialog_ok_callback(), AUPImportFileHandle::HandleNoteTrack(), HandlePrint(), AUPImportFileHandle::HandleProject(), AUPImportFileHandle::HandleTimeTrack(), VSTEffect::HandleXMLTag(), FFmpegPresets::HandleXMLTag(), AutoRecoveryDialog::HaveChecked(), GStreamerImportFileHandle::Import(), AUPImportFileHandle::Import(), LabelTrack::Import(), ImportMIDI(), AudioUnitEffect::ImportPresets(), VSTEffect::ImportPresets(), GStreamerImportFileHandle::Init(), ExportFFmpeg::Init(), ExportFFmpeg::InitCodecs(), AudacityApp::InitTempDir(), ProjectFileManager::IsAlreadyOpen(), anonymous_namespace{SampleHandle.cpp}::IsSampleEditingPossible(), Module::Load(), ThemeBase::LoadComponents(), VSTEffect::LoadFXB(), VSTEffect::LoadFXP(), MP3Exporter::LoadLibrary(), FFmpegLibs::LoadLibs(), FFmpegPresets::LoadPreset(), VSTEffect::LoadXML(), AdornedRulerPanel::LockPlayRegion(), LOFImportFileHandle::lofOpenFiles(), AudacityCommand::MessageBox(), Effect::MessageBox(), VoiceKey::OffBackward(), VoiceKey::OffForward(), MacrosWindow::OnAdd(), ApplyMacroDialog::OnApplyToFiles(), ApplyMacroDialog::OnApplyToProject(), VoiceKey::OnBackward(), DependencyDialog::OnCancel(), ProjectManager::OnCloseWindow(), HistoryDialog::OnCompact(), ExportMultipleDialog::OnCreate(), ExportFFmpegOptions::OnDeletePreset(), EffectUIHost::OnDeletePreset(), ExtImportPrefs::OnDelRule(), AutoRecoveryDialog::OnDiscardSelected(), TagsEditorDialog::OnEdit(), ContrastDialog::OnExport(), FrequencyPlotDialog::OnExport(), LabelDialog::OnExport(), FileActions::Handler::OnExportLabels(), FileActions::Handler::OnExportMIDI(), ExportFFmpegOptions::OnExportPresets(), LibraryPrefs::OnFFmpegFindButton(), NyqBench::OnFindDialog(), VoiceKey::OnForward(), KeyConfigPrefs::OnImport(), LabelDialog::OnImport(), FileActions::Handler::OnImportLabels(), AudacityApp::OnInit(), TagsEditorDialog::OnLoad(), TrackActions::Handler::OnNewTimeTrack(), LangChoiceDialog::OnOk(), TimerRecordDialog::OnOK(), AudioUnitEffectImportDialog::OnOk(), PluginRegistrationDialog::OnOK(), RateMenuTable::OnRateOther(), ProjectAudioManager::OnRecord(), AutoRecoveryDialog::OnRecoverSelected(), EditActions::Handler::OnRedo(), TrackActions::Handler::OnResample(), TagsEditorDialog::OnReset(), ExtImportPrefs::OnRuleTableEdit(), BenchmarkDialog::OnRun(), NyqBench::OnSave(), anonymous_namespace{LogWindow.cpp}::OnSave(), NyqBench::OnSaveAs(), KeyConfigPrefs::OnSet(), anonymous_namespace{SpectrumView.cpp}::SpectrogramSettingsHandler::OnSpectrogramSettings(), TransportActions::Handler::OnTimerRecord(), EditActions::Handler::OnUndo(), PluginActions::Handler::OnWriteJournal(), AUPImportFileHandle::Open(), ProjectFileManager::OpenFile(), SFFileCloser::operator()(), FFmpegPresets::OverwriteIsOk(), anonymous_namespace{AudacityApp.cpp}::PopulatePreferences(), LV2Effect::PopulateUI(), GStreamerImportFileHandle::ProcessBusMessage(), ProjectFSCK(), ThemeBase::ReadImageCache(), MacroCommands::ReadMacro(), ProjectFileManager::ReadProjectFile(), CommandManager::RemoveDuplicateShortcuts(), MacroCommands::ReportAndSkip(), ExportFFmpegOptions::ReportIfBadCombination(), ProjectFileManager::SaveAs(), ThemeBase::SaveComponents(), VSTEffect::SaveFXB(), VSTEffect::SaveFXP(), ExportFFmpegOptions::SavePreset(), FFmpegPresets::SavePreset(), KeyConfigPrefs::SetKeyForSelected(), GUIPrefs::SetLang(), DeviceToolBar::ShowComboDialog(), ShowDependencyDialogIfNeeded(), anonymous_namespace{HelpMenus.cpp}::ShowDiagnostics(), Module::ShowLoadFailureError(), ExportMultipleDialog::ShowModal(), AudioIO::StartStream(), ModuleManager::TryLoadModules(), MessageBoxTarget::Update(), NyqBench::Validate(), DirectoriesPrefs::Validate(), SpectrumPrefs::Validate(), SpectrogramSettings::Validate(), and Sequence::WriteXML().

Here is the call graph for this function:
Journal::IfNotPlaying
int IfNotPlaying(const wxString &string, const InteractiveAction &action)
Call action only if not replaying; synchronize on string and int values.
Definition: Journal.cpp:257
TranslatableString::Translation
wxString Translation() const
Definition: TranslatableString.h:79