28#include <wx/stattext.h>
29#include <wx/statbmp.h>
30#include <wx/artprov.h>
31#include <wx/radiobox.h>
32#include <wx/bmpbuttn.h>
53 void OnOK( wxCommandEvent &event );
55 void OnHelp(wxCommandEvent& event);
63#define ID_SHOW_LOG_BUTTON 3333
80 wxDefaultPosition, wxDefaultSize,
89 S.StartVerticalLay( 0 );
91 S.StartHorizontalLay(wxALIGN_LEFT | wxALL, 0);
94 wxBitmap bitmap = wxArtProvider::GetIcon(wxART_WARNING,
96 auto icon =
safenew wxStaticBitmap(
S.GetParent(), -1, bitmap);
102 S.Prop(1).AddVariableText( message,
false, wxCENTER | wxLEFT );
104 S.EndHorizontalLay();
106 const auto buttonLabels = transform_container<wxArrayStringEx>(
109 const auto count = buttons.size();
111 const auto boxStr = boxMsg.Translation();
115 mRadioBox =
safenew wxRadioBox(
S.GetParent(), -1,
117 wxDefaultPosition, wxDefaultSize,
118 count, count ? &buttonLabels[0] :
nullptr,
119 1, wxRA_SPECIFY_COLS);
120 mRadioBox->SetSelection(0);
123 .Position(wxEXPAND | wxALL)
124 .AddWindow( mRadioBox );
127 S.StartHorizontalLay(wxALIGN_CENTER | wxALL, 0);
134 XXO(
"Show Log for Details"), wxALIGN_LEFT | wxALL,
141 auto pButton =
S.Id(wxID_OK)
142 .AddButton(
XXO(
"OK"), wxALIGN_CENTER, !log);
144 if (!mHelpPage.empty()) {
145 auto pHelpBtn =
S.Id(wxID_HELP)
146 .AddBitmapButton(
theTheme.
Bitmap(bmpHelpIcon), wxALIGN_CENTER,
false);
147 pHelpBtn->SetToolTip(
XO(
"Help").Translation());
148 pHelpBtn->SetLabel(
XO(
"Help").Translation());
151 S.EndHorizontalLay();
157 GetSizer()->Fit(
this);
158 GetSizer()->SetSizeHints(
this);
182 wxWindow * pParent = wxTheApp->GetTopWindow();
187 if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
191 message,
title, buttons, helpPage, boxMsg, log);
194 dlog.CentreOnParent();
196 dlog.CenterOnScreen();
201 wxSize Size = dlog.GetSize();
202 Size.SetHeight( 10 );
203 wxPoint Pos = dlog.GetPosition() -Size;
206 return dlog.ShowModal();
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
XXO("&Cut/Copy/Paste Toolbar")
#define ID_SHOW_LOG_BUTTON
int ShowMultiDialog(const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)
std::vector< TranslatableString > TranslatableStrings
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
static void Show(bool show=true)
Show or hide the unique logging window; create it on demand the first time it is shown.
A dialog presenting an exclusive, multiple choice, help button, and log info.
void OnHelp(wxCommandEvent &event)
MultiDialog(wxWindow *pParent, const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)
void OnShowLog(wxCommandEvent &event)
void OnOK(wxCommandEvent &event)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
wxBitmap & Bitmap(int iIndex)
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const