24#include <wx/artprov.h>
25#include <wx/checkbox.h>
27#include <wx/stattext.h>
37 bool showCancelButton);
40 void OnOK(wxCommandEvent& event);
53 static auto result =
XXO(
"Don't show this warning again");
59 bool showCancelButton)
61 wxDefaultPosition, wxDefaultSize,
62 (showCancelButton ? wxDEFAULT_DIALOG_STYLE : wxCAPTION | wxSYSTEM_MENU))
66 SetIcon(wxArtProvider::GetIcon(wxART_WARNING, wxART_MESSAGE_BOX));
70 S.StartVerticalLay(
false);
72 S.AddFixedText(message);
81 GetSizer()->Fit(
this);
87 EndModal(
mCheckBox->GetValue() ? wxID_NO : wxID_YES);
91 const wxString &internalDialogName,
93 bool showCancelButton,
101 WarningDialog dlog(parent, message, footer, showCancelButton);
103 int retCode = dlog.ShowModal();
104 if (retCode == wxID_CANCEL)
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XXO("&Cut/Copy/Paste Toolbar")
audacity::BasicSettings * gPrefs
wxString WarningDialogKey(const wxString &internalDialogName)
const TranslatableString & DefaultWarningFooter()
int ShowWarningDialog(wxWindow *parent, const wxString &internalDialogName, const TranslatableString &message, bool showCancelButton, const TranslatableString &footer)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Holds a msgid for the translation catalog; may also bind format arguments.
Gives a warning message, that can be dismissed, with crucially the ability to not see similar warning...
WarningDialog(wxWindow *parent, const TranslatableString &message, const TranslatableString &footer, bool showCancelButton)
void OnOK(wxCommandEvent &event)
virtual bool Flush() noexcept=0
virtual bool Write(const wxString &key, bool value)=0
virtual bool Read(const wxString &key, bool *value) const =0