Audacity  2.2.0
BatchProcessDialog.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  BatchProcessDialog.h
6 
7  Dominic Mazzoni
8  James Crook
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_BATCH_PROCESS_DIALOG__
13 #define __AUDACITY_BATCH_PROCESS_DIALOG__
14 
15 #include <wx/defs.h>
16 #include <wx/string.h>
17 
18 
19 #ifdef __WXMSW__
20  #include <wx/ownerdrw.h>
21 #endif
22 
23 //#include "wx/log.h"
24 #include <wx/sizer.h>
25 #include <wx/menuitem.h>
26 #include <wx/checklst.h>
27 
28 #include "BatchCommands.h"
29 
30 class wxWindow;
31 class wxCheckBox;
32 class wxChoice;
33 class wxTextCtrl;
34 class wxStaticText;
35 class wxRadioButton;
36 class wxListCtrl;
37 class wxListEvent;
38 class wxButton;
39 class ShuttleGui;
40 
41 class BatchProcessDialog final : public wxDialogWrapper {
42  public:
43  // constructors and destructors
44  BatchProcessDialog(wxWindow * parent);
45  virtual ~BatchProcessDialog();
46  public:
47  void Populate();
48  void PopulateOrExchange( ShuttleGui & S );
49 
50  void OnApplyToProject(wxCommandEvent & event);
51  void OnApplyToFiles(wxCommandEvent & event);
52  void OnCancel(wxCommandEvent & event);
53 
54  wxButton *mOK;
55  wxButton *mCancel;
56  wxListCtrl *mChains;
57  wxListCtrl *mList;
59 
60  bool mAbort;
61 
62  DECLARE_EVENT_TABLE()
63 };
64 
65 class EditChainsDialog final : public wxDialogWrapper
66 {
67 public:
68  EditChainsDialog(wxWindow * parent);
70 
71 private:
72  void Populate();
74  void PopulateChains();
75  void PopulateList();
76  void AddItem(const wxString &command, wxString const &params);
77  bool ChangeOK();
78 
79  void OnChainSelected(wxListEvent &event);
80  void OnListSelected(wxListEvent &event);
81  void OnChainsBeginEdit(wxListEvent &event);
82  void OnChainsEndEdit(wxListEvent &event);
83  void OnAdd(wxCommandEvent &event);
84  void OnRemove(wxCommandEvent &event);
85  void OnRename(wxCommandEvent &event);
86  void OnSize(wxSizeEvent &event);
87 
88  void OnCommandActivated(wxListEvent &event);
89  void OnInsert(wxCommandEvent &event);
90  void OnDelete(wxCommandEvent &event);
91  void OnUp(wxCommandEvent &event);
92  void OnDown(wxCommandEvent &event);
93  void OnDefaults(wxCommandEvent &event);
94 
95  void OnOK(wxCommandEvent &event);
96  void OnCancel(wxCommandEvent &event);
97 
98  void OnKeyDown(wxKeyEvent &event);
99  void FitColumns();
100 
101  wxListCtrl *mChains;
102  wxListCtrl *mList;
103  wxButton *mRemove;
104  wxButton *mRename;
105  wxButton *mDefaults;
106 
108  wxString mActiveChain;
109 
111  bool mChanged;
112 
113  DECLARE_EVENT_TABLE()
114 };
115 
116 #endif
void OnChainsEndEdit(wxListEvent &event)
Definition: BatchProcessDialog.cpp:762
void PopulateList()
This clears and updates the contents of mList.
Definition: BatchProcessDialog.cpp:608
wxButton * mCancel
Definition: BatchProcessDialog.h:55
EditChainsDialog(wxWindow *parent)
Constructor.
Definition: BatchProcessDialog.cpp:467
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:369
int mSelectedCommand
Definition: BatchProcessDialog.h:110
void OnCancel(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:399
void AddItem(const wxString &command, wxString const &params)
Add one item into mList.
Definition: BatchProcessDialog.cpp:627
~EditChainsDialog()
Definition: BatchProcessDialog.cpp:481
bool mChanged
Definition: BatchProcessDialog.h:111
void OnDefaults(wxCommandEvent &event)
Select the empty Command chain.
Definition: BatchProcessDialog.cpp:989
void OnUp(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:945
wxListCtrl * mList
Definition: BatchProcessDialog.h:57
void OnListSelected(wxListEvent &event)
An item in the chains list has been selected.
Definition: BatchProcessDialog.cpp:691
void PopulateOrExchange(ShuttleGui &S)
Defines the dialog and does data exchange with it.
Definition: BatchProcessDialog.cpp:94
void OnDown(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:967
void Populate()
Creates the dialog and its contents.
Definition: BatchProcessDialog.cpp:486
void OnInsert(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:893
Shows progress in executing commands in BatchCommands.
Definition: BatchProcessDialog.h:41
Definition: wxPanelWrapper.h:19
void OnAdd(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:778
void OnSize(wxSizeEvent &event)
The window has been resized.
Definition: BatchProcessDialog.cpp:697
wxButton * mOK
Definition: BatchProcessDialog.h:54
void FitColumns()
Definition: BatchProcessDialog.cpp:704
void OnApplyToFiles(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:221
wxListCtrl * mChains
Definition: BatchProcessDialog.h:101
wxButton * mRemove
List of commands in current command chain.
Definition: BatchProcessDialog.h:103
wxButton * mDefaults
Definition: BatchProcessDialog.h:105
void OnChainsBeginEdit(wxListEvent &event)
Definition: BatchProcessDialog.cpp:749
bool mAbort
Definition: BatchProcessDialog.h:60
void OnRename(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:854
BatchCommands mBatchCommands
Definition: BatchProcessDialog.h:58
wxListCtrl * mChains
Definition: BatchProcessDialog.h:56
wxListCtrl * mList
List of chains.
Definition: BatchProcessDialog.h:102
void OnKeyDown(wxKeyEvent &event)
Definition: BatchProcessDialog.cpp:1024
Maintains the chain of commands used in batch processing. See also BatchCommandDialog and BatchProces...
Definition: BatchCommands.h:22
void OnRemove(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:823
BatchCommands mBatchCommands
Definition: BatchProcessDialog.h:107
void OnDelete(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:922
void PopulateOrExchange(ShuttleGui &S)
Defines the dialog and does data exchange with it.
Definition: BatchProcessDialog.cpp:521
BatchProcessDialog(wxWindow *parent)
Definition: BatchProcessDialog.cpp:67
void OnApplyToProject(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:147
Definition: BatchProcessDialog.h:65
void OnOK(wxCommandEvent &event)
Send changed values back to Prefs, and update Audacity.
Definition: BatchProcessDialog.cpp:999
wxButton * mRename
Definition: BatchProcessDialog.h:104
void Populate()
Definition: BatchProcessDialog.cpp:85
virtual ~BatchProcessDialog()
Definition: BatchProcessDialog.cpp:81
wxString mActiveChain
Provides list of available commands.
Definition: BatchProcessDialog.h:108
void PopulateChains()
This clears and updates the contents of mChains.
Definition: BatchProcessDialog.cpp:587
bool ChangeOK()
Definition: BatchProcessDialog.cpp:637
EffectDistortion::Params params
Definition: Distortion.cpp:94
void OnCommandActivated(wxListEvent &event)
Definition: BatchProcessDialog.cpp:868
void OnCancel(wxCommandEvent &event)
Definition: BatchProcessDialog.cpp:1014
void OnChainSelected(wxListEvent &event)
An item in the chains list has been selected.
Definition: BatchProcessDialog.cpp:664