1 /********************************************************************** 2 3 Audacity: A Digital Audio Editor 4 5 HistoryWindow.h 6 7 Joshua Haberman 8 9 **********************************************************************/ 10 11 #ifndef __AUDACITY_HISTORY_WINDOW__ 12 #define __AUDACITY_HISTORY_WINDOW__ 13 14 #include "Prefs.h" 15 #include "widgets/wxPanelWrapper.h" // to inherit 16 17 class wxButton; 18 class wxListCtrl; 19 class wxListEvent; 20 class wxSpinCtrl; 21 class wxTextCtrl; 22 class AudacityProject; 23 class ShuttleGui; 24 class UndoManager; 25 26 class HistoryDialog final : public wxDialogWrapper, 27 public PrefsListener 28 { 29 30 public: 31 HistoryDialog(AudacityProject * parent, UndoManager *manager); 32 33 void UpdateDisplay(wxEvent &e); 34 35 bool Show( bool show = true ) override; 36 37 private: 38 void Populate(ShuttleGui & S); 39 40 void OnAudioIO(wxCommandEvent & evt); 41 void DoUpdate(); 42 void UpdateLevels(); 43 44 void OnShow(wxShowEvent & event); 45 void OnSize(wxSizeEvent & event); 46 void OnCloseWindow(wxCloseEvent & event); 47 void OnListKeyDown(wxKeyEvent & event); 48 void OnItemSelected(wxListEvent & event); 49 void OnDiscard(wxCommandEvent & event); 50 void OnDiscardClipboard(wxCommandEvent & event); 51 void OnCompact(wxCommandEvent & event); 52 void OnGetURL(wxCommandEvent & event); 53 54 // PrefsListener implementation 55 void UpdatePrefs() override; 56 57 AudacityProject *mProject; 58 UndoManager *mManager; 59 wxListCtrl *mList; 60 wxTextCtrl *mTotal; 61 wxTextCtrl *mClipboard; 62 wxTextCtrl *mAvail; 63 wxSpinCtrl *mLevels; 64 wxButton *mDiscard; 65 wxButton *mCompact; 66 67 int mSelected; 68 bool mAudioIOBusy; 69 70 public: 71 DECLARE_EVENT_TABLE() 72 }; 73 74 #endif 75