141 XO(
"Audacity"), wxDefaultPosition,
142 { 442, -1 }, wxDEFAULT_DIALOG_STYLE }
144{
148
149 wxFont titleFont = GetFont();
150 titleFont.SetWeight(wxFONTWEIGHT_BOLD);
151 titleFont.SetPixelSize({ 0, 18 });
152
153 wxFont descriptionFont = GetFont();
154 descriptionFont.SetPixelSize({ 0, 14 });
155
157 this, wxID_ANY, description.DialogTitle.Translation());
158 title->SetFont(titleFont);
159
160 auto saveToCloudImage =
161 safenew wxStaticBitmap(
this, wxID_ANY, **description.RemoteImage);
162
163 auto saveToCloudTitle =
safenew wxStaticText(
164 this, wxID_ANY, description.RemoteTitle.Translation());
165 saveToCloudTitle->SetFont(titleFont);
166
167 auto saveToCloudDescription =
safenew wxStaticText(
168 this, wxID_ANY, description.RemoteDescription.Translation());
169 saveToCloudDescription->SetFont(descriptionFont);
171
172 auto saveToCloudButton =
173 CreateButton(
this, descriptionFont, description.RemoteButtonLabel);
174
175 auto saveToComputerImage =
176 safenew wxStaticBitmap(
this, wxID_ANY, **description.LocalImage);
177
178 auto saveToComputerTitle =
safenew wxStaticText(
179 this, wxID_ANY, description.LocalTitle.Translation());
180 saveToComputerTitle->SetFont(titleFont);
181
182 auto saveToComputerDescription =
safenew wxStaticText(
183 this, wxID_ANY, description.LocalDescription.Translation());
184 saveToComputerDescription->SetFont(descriptionFont);
186
187 auto saveToComputerButton =
188 CreateButton(
this, descriptionFont, description.LocalButtonTitle);
189
190 auto rememberChoiceCheckbox =
safenew wxCheckBox(
191 this, wxID_ANY,
192 description.DoNotShowLabel.Translation());
193
196
197 auto sizer =
safenew wxBoxSizer(wxVERTICAL);
198
199 sizer->Add(
title, wxSizerFlags {}.CenterHorizontal().Border(wxTOP, 16));
200
201 auto topSizer =
safenew wxBoxSizer(wxHORIZONTAL);
202
204 saveToCloudImage, saveToCloudTitle, saveToCloudDescription,
205 saveToCloudButton);
206
207 topSizer->Add(cloudSizer.release(), wxSizerFlags {}.Expand());
208
210 saveToComputerImage, saveToComputerTitle, saveToComputerDescription,
211 saveToComputerButton);
212
213 topSizer->Add(
214 computerSizer.release(), wxSizerFlags {}.Expand().Border(wxLEFT, 8));
215
216 sizer->Add(topSizer, wxSizerFlags {}.Expand().Border(wxALL, 16));
217
218 sizer->Add(
safenew wxStaticLine(
this), wxSizerFlags {}.Expand());
219
220 sizer->Add(rememberChoiceCheckbox, wxSizerFlags {}.Border(wxALL, 16));
221
222 SetSizerAndFit(sizer);
224
225 Center();
226
227 Bind(
228 wxEVT_CHAR_HOOK,
229 [this](auto& evt)
230 {
231 if (!IsEscapeKey(evt))
232 {
233 evt.Skip();
234 return;
235 }
236
237 EndModal(wxID_CANCEL);
238 });
239
240 rememberChoiceCheckbox->Bind(
241 wxEVT_CHECKBOX, [this, rememberChoiceCheckbox](auto)
242 {
mDoNotShow = rememberChoiceCheckbox->GetValue(); });
243
244 saveToCloudButton->Bind(wxEVT_BUTTON, [this](auto) { EndModal(wxID_SAVE); });
245 saveToComputerButton->Bind(
246 wxEVT_BUTTON, [this](auto) { EndModal(wxID_OK); });
247}
void SetupAccessibility(wxWindow *window)
std::unique_ptr< wxBoxSizer > SetupVerticalSizer(wxStaticBitmap *image, wxStaticText *title, wxStaticText *description, wxButton *button)
wxButton * CreateButton(wxWindow *parent, const wxFont &font, const TranslatableString &label)
const DialogDescription ExportDialogDescription
const DialogDescription SaveDialogDescription