audacia/src/AudacityLogger.h

56 lines
1.1 KiB
C
Raw Normal View History

2013-10-23 18:08:12 +00:00
/**********************************************************************
Audacity: A Digital Audio Editor
AudacityLogger.h
Dominic Mazzoni
This is the main source file for Audacity which handles
initialization and termination by subclassing wxApp.
**********************************************************************/
#ifndef __AUDACITY_LOGGER__
#define __AUDACITY_LOGGER__
#include "Audacity.h"
#include <wx/event.h>
#include <wx/log.h>
#include <wx/frame.h>
#include <wx/textctrl.h>
#include <wx/string.h>
#include "Experimental.h"
class AudacityLogger final : public wxEvtHandler, public wxLog {
2013-10-23 18:08:12 +00:00
public:
AudacityLogger();
virtual ~AudacityLogger();
void Show(bool show = true);
void Destroy();
#if defined(EXPERIMENTAL_CRASH_REPORT)
wxString GetLog();
#endif
2013-10-23 18:08:12 +00:00
protected:
void Flush() override;
void DoLogText(const wxString & msg) override;
2013-10-23 18:08:12 +00:00
private:
void OnCloseWindow(wxCloseEvent & e);
void OnClose(wxCommandEvent & e);
void OnClear(wxCommandEvent & e);
void OnSave(wxCommandEvent & e);
wxFrame *mFrame;
wxTextCtrl *mText;
wxString mBuffer;
bool mUpdated;
};
#endif