Audacity 3.2.0
Classes | Functions | Variables
anonymous_namespace{LogWindow.cpp} Namespace Reference

Classes

struct  LogWindowUpdater
 

Functions

void OnCloseWindow (wxCloseEvent &e)
 
void OnClose (wxCommandEvent &e)
 
void OnClear (wxCommandEvent &e)
 
void OnSave (wxCommandEvent &e)
 
void OnCloseWindow (wxCloseEvent &WXUNUSED(e))
 
void OnClose (wxCommandEvent &WXUNUSED(e))
 
void OnClear (wxCommandEvent &WXUNUSED(e))
 
void OnSave (wxCommandEvent &WXUNUSED(e))
 

Variables

Destroy_ptr< wxFrame > sFrame
 
wxWeakRef< wxTextCtrl > sText
 
std::optional< LogWindowUpdaterpUpdater
 

Function Documentation

◆ OnClear() [1/2]

void anonymous_namespace{LogWindow.cpp}::OnClear ( wxCommandEvent &  e)

◆ OnClear() [2/2]

void anonymous_namespace{LogWindow.cpp}::OnClear ( wxCommandEvent &  WXUNUSEDe)

Definition at line 202 of file LogWindow.cpp.

203{
204 auto pLogger = AudacityLogger::Get();
205 if (pLogger)
206 pLogger->ClearLog();
207}
static AudacityLogger * Get()

References AudacityLogger::Get().

Referenced by LogWindow::Show().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnClose() [1/2]

void anonymous_namespace{LogWindow.cpp}::OnClose ( wxCommandEvent &  e)

◆ OnClose() [2/2]

void anonymous_namespace{LogWindow.cpp}::OnClose ( wxCommandEvent &  WXUNUSEDe)

Definition at line 196 of file LogWindow.cpp.

197{
198 wxCloseEvent dummy;
199 OnCloseWindow(dummy);
200}
void OnCloseWindow(wxCloseEvent &WXUNUSED(e))
Definition: LogWindow.cpp:184

References OnCloseWindow().

Referenced by LogWindow::Show().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnCloseWindow() [1/2]

void anonymous_namespace{LogWindow.cpp}::OnCloseWindow ( wxCloseEvent &  e)

◆ OnCloseWindow() [2/2]

void anonymous_namespace{LogWindow.cpp}::OnCloseWindow ( wxCloseEvent &  WXUNUSEDe)

Definition at line 184 of file LogWindow.cpp.

185{
186#if defined(__WXMAC__)
187 // On the Mac, destroy the window rather than hiding it since the
188 // log menu will override the root windows menu if there is no
189 // project window open.
190 sFrame.reset();
191#else
192 sFrame->Show(false);
193#endif
194}
Destroy_ptr< wxFrame > sFrame
Definition: LogWindow.cpp:43

References sFrame.

Referenced by OnClose(), and LogWindow::Show().

Here is the caller graph for this function:

◆ OnSave() [1/2]

void anonymous_namespace{LogWindow.cpp}::OnSave ( wxCommandEvent &  e)

◆ OnSave() [2/2]

void anonymous_namespace{LogWindow.cpp}::OnSave ( wxCommandEvent &  WXUNUSEDe)

Definition at line 209 of file LogWindow.cpp.

210{
211 wxString fName = _("log.txt");
212
213 fName = SelectFile(FileNames::Operation::Export,
214 XO("Save log to:"),
215 wxEmptyString,
216 fName,
217 wxT("txt"),
219 wxFD_SAVE | wxFD_OVERWRITE_PROMPT | wxRESIZE_BORDER,
220 sFrame.get());
221
222 if (fName.empty()) {
223 return;
224 }
225
226 if (!(sText && sText->SaveFile(fName))) {
228 XO("Couldn't save log to file: %s").Format( fName ),
229 XO("Warning"),
230 wxICON_EXCLAMATION,
231 sFrame.get());
232 return;
233 }
234}
wxT("CloseDown"))
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
XO("Cut/Copy/Paste")
#define _(s)
Definition: Internat.h:73
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)
Definition: SelectFile.cpp:17
FILES_API const FileType TextFiles
Definition: FileNames.h:73
Abstract base class used in importing a file.
wxWeakRef< wxTextCtrl > sText
Definition: LogWindow.cpp:44

References _, AudacityMessageBox(), SelectFile(), sFrame, sText, FileNames::TextFiles, wxT(), and XO().

Referenced by LogWindow::Show().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ pUpdater

std::optional<LogWindowUpdater> anonymous_namespace{LogWindow.cpp}::pUpdater

◆ sFrame

Destroy_ptr<wxFrame> anonymous_namespace{LogWindow.cpp}::sFrame

◆ sText

wxWeakRef<wxTextCtrl> anonymous_namespace{LogWindow.cpp}::sText

Definition at line 44 of file LogWindow.cpp.

Referenced by ProgressDialog::AddMessageAsColumn(), OnSave(), and LogWindow::Show().