26#include <wx/stattext.h>
27#include <wx/statbmp.h>
28#include <wx/artprov.h>
29#include <wx/radiobox.h>
30#include <wx/bmpbuttn.h>
51 void OnOK( wxCommandEvent &event );
53 void OnHelp(wxCommandEvent& event);
61#define ID_SHOW_LOG_BUTTON 3333
78 wxDefaultPosition, wxDefaultSize,
87 S.StartVerticalLay( 0 );
89 S.StartHorizontalLay(wxALIGN_LEFT | wxALL, 0);
92 wxBitmap bitmap = wxArtProvider::GetIcon(wxART_WARNING,
94 auto icon =
safenew wxStaticBitmap(
S.GetParent(), -1, bitmap);
100 S.Prop(1).AddVariableText( message,
false, wxCENTER | wxLEFT );
102 S.EndHorizontalLay();
104 const auto buttonLabels = transform_container<wxArrayStringEx>(
107 const auto count = buttons.size();
109 const auto boxStr = boxMsg.Translation();
113 mRadioBox =
safenew wxRadioBox(
S.GetParent(), -1,
115 wxDefaultPosition, wxDefaultSize,
116 count, count ? &buttonLabels[0] :
nullptr,
117 1, wxRA_SPECIFY_COLS);
118 mRadioBox->SetSelection(0);
121 .Position(wxEXPAND | wxALL)
122 .AddWindow( mRadioBox );
125 S.StartHorizontalLay(wxALIGN_CENTER | wxALL, 0);
132 XXO(
"Show Log for Details"), wxALIGN_LEFT | wxALL,
139 auto pButton =
S.Id(wxID_OK)
140 .AddButton(
XXO(
"OK"), wxALIGN_CENTER, !log);
142 if (!mHelpPage.empty()) {
143 auto pHelpBtn =
S.Id(wxID_HELP)
144 .AddBitmapButton(
theTheme.
Bitmap(bmpHelpIcon), wxALIGN_CENTER,
false);
145 pHelpBtn->SetToolTip(
XO(
"Help").Translation());
146 pHelpBtn->SetLabel(
XO(
"Help").Translation());
149 S.EndHorizontalLay();
155 GetSizer()->Fit(
this);
156 GetSizer()->SetSizeHints(
this);
180 wxWindow * pParent = wxTheApp->GetTopWindow();
185 if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
189 message,
title, buttons, helpPage, boxMsg, log);
192 dlog.CentreOnParent();
194 dlog.CenterOnScreen();
199 wxSize
Size = dlog.GetSize();
200 Size.SetHeight( 10 );
201 wxPoint Pos = dlog.GetPosition() -
Size;
204 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
SizeType< float > Size
Alias for SizeType<float>