13#include <wx/checkbox.h>
15#include <wx/stattext.h>
19constexpr auto style = wxDEFAULT_DIALOG_STYLE | wxCENTRE;
31 parent, wxID_ANY, caption, wxDefaultPosition, wxDefaultSize,
style)
33 wxStaticText* messageText =
34 new wxStaticText(
this, wxID_ANY, message.Translation());
37 wxCheckBox* checkBox =
38 new wxCheckBox(
this, wxID_ANY,
XO(
"Don't ask me again").Translation());
41 wxBoxSizer* mainSizer =
new wxBoxSizer(wxVERTICAL);
42 constexpr auto border = 10;
43 mainSizer->Add(messageText, 0, wxALL | wxALIGN_CENTER, border);
48 wxStdDialogButtonSizer* buttonSizer =
49 CreateStdDialogButtonSizer(wxYES | wxNO);
52 buttonSizer->Insert(0, checkBox, 0, wxALL | wxALIGN_CENTER, border);
53 mainSizer->Add(buttonSizer, 0, wxALL | wxALIGN_CENTER, border);
55 SetSizerAndFit(mainSizer);
57 if ((
style | wxCENTRE) != 0)
65 return ShowModal() == wxID_YES;
void OnClose(wxCloseEvent &event)
void OnCheckBoxEvent(wxCommandEvent &evt)
Holds a msgid for the translation catalog; may also bind format arguments.