22#include <wx/textctrl.h>
37 text =
S.Id(wxID_STATIC)
38 .Style(wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH)
41 wxButton *save =
safenew wxButton(
S.GetParent(), wxID_OK,
_(
"&Save"));
47 auto style = text->GetDefaultStyle();
48 style.SetFontFamily( wxFONTFAMILY_TELETYPE );
49 text->SetDefaultStyle(
style);
54 dlg.SetSize(350, 450);
56 if (dlg.ShowModal() == wxID_OK)
58 const auto fileDialogTitle =
XO(
"Save %s").Format( description );
59 wxString fName =
SelectFile(FileNames::Operation::Export,
65 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
69 if (!text->SaveFile(fName))
72 XO(
"Unable to save %s").
Format( description ),
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
void ShowDiagnostics(AudacityProject &project, const wxString &info, const TranslatableString &description, const wxString &defaultPath, bool fixedWidth)
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
accessors for certain important windows associated with each project
FilePath SelectFile(FileNames::Operation op, const TranslatableString &message, const FilePath &default_path, const FilePath &default_filename, const FileExtension &default_extension, const FileTypes &fileTypes, int flags, wxWindow *parent)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
FILES_API const FileType TextFiles
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.
void SetName(const TranslatableString &title)