Audacity
3.2.0
libraries
lib-wx-init
AudacityMessageBox.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
AudacityMessageBox.cpp
6
7
Paul Licameli split this out of ErrorDialog.cpp
8
9
**********************************************************************/
10
11
#include "
AudacityMessageBox.h
"
12
#include "
Internat.h
"
13
14
#include "
Journal.h
"
15
#include "
wxArrayStringEx.h
"
16
17
int
AudacityMessageBox
(
const
TranslatableString
& message,
18
const
TranslatableString
& caption,
19
long
style
, wxWindow *parent,
int
x,
int
y)
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
}
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Definition:
AudacityMessageBox.cpp:17
AudacityMessageBox.h
Internat.h
Journal.h
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition:
TranslatableString.h:32
TranslatableString::Translation
wxString Translation() const
Definition:
TranslatableString.h:79
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:352
anonymous_namespace{AudacityDontAskAgainMessageDialog.cpp}::style
constexpr auto style
Definition:
AudacityDontAskAgainMessageDialog.cpp:19
wxArrayStringEx.h
Generated by
1.9.3