Audacity  2.2.0
BatchCommandDialog.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  BatchCommandDialog.h
6 
7  Dominic Mazzoni
8  James Crook
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_BATCH_COMMAND_DIALOG__
13 #define __AUDACITY_BATCH_COMMAND_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 class wxWindow;
29 class wxCheckBox;
30 class wxChoice;
31 class wxTextCtrl;
32 class wxStaticText;
33 class wxRadioButton;
34 class wxListCtrl;
35 class wxListEvent;
36 class wxButton;
37 class ShuttleGui;
38 
39 class BatchCommandDialog final : public wxDialogWrapper {
40  public:
41  // constructors and destructors
42  BatchCommandDialog(wxWindow *parent, wxWindowID id);
43  void SetCommandAndParams(const wxString &Command, const wxString &Params);
44  public:
45  wxString mSelectedCommand;
47  private:
48  void Populate();
50  void OnEditParams(wxCommandEvent &event);
51  void OnUsePreset(wxCommandEvent &event);
52  void OnChoice(wxCommandEvent &event);
53  void OnOk(wxCommandEvent &event);
54  void OnCancel(wxCommandEvent &event);
55  void OnItemSelected(wxListEvent &event);
56 
57  void ValidateChoices();
58  void PopulateCommandList();
59  int GetSelectedItem();
60 
61  wxButton *mEditParams;
62  wxButton *mUsePreset;
63  wxListCtrl *mChoices;
64  wxTextCtrl * mCommand;
65  wxTextCtrl * mParameters;
66  DECLARE_EVENT_TABLE()
67 };
68 
69 
70 #endif
void OnUsePreset(wxCommandEvent &event)
Definition: BatchCommandDialog.cpp:205
void Populate()
Definition: BatchCommandDialog.cpp:69
void ValidateChoices()
Definition: BatchCommandDialog.cpp:146
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:366
void SetCommandAndParams(const wxString &Command, const wxString &Params)
Definition: BatchCommandDialog.cpp:216
wxString mSelectedParameters
Definition: BatchCommandDialog.h:46
void OnItemSelected(wxListEvent &event)
Definition: BatchCommandDialog.cpp:166
void OnEditParams(wxCommandEvent &event)
Definition: BatchCommandDialog.cpp:194
void PopulateCommandList()
Definition: BatchCommandDialog.cpp:119
Abstract base class for command interface. It implements Command::SetParameter() and defers all other...
Definition: Command.h:70
Definition: wxPanelWrapper.h:19
wxTextCtrl * mCommand
Definition: BatchCommandDialog.h:64
wxTextCtrl * mParameters
Definition: BatchCommandDialog.h:65
Provides a list of configurable commands for use with BatchCommands.
Definition: BatchCommandDialog.h:39
void PopulateOrExchange(ShuttleGui &S)
Definition: BatchCommandDialog.cpp:77
wxButton * mEditParams
Definition: BatchCommandDialog.h:61
wxString mSelectedCommand
Definition: BatchCommandDialog.h:45
void OnOk(wxCommandEvent &event)
Definition: BatchCommandDialog.cpp:154
wxListCtrl * mChoices
Definition: BatchCommandDialog.h:63
wxButton * mUsePreset
Definition: BatchCommandDialog.h:62
BatchCommandDialog(wxWindow *parent, wxWindowID id)
Definition: BatchCommandDialog.cpp:59
int GetSelectedItem()
Definition: BatchCommandDialog.cpp:131
void OnChoice(wxCommandEvent &event)
Definition: BatchCommandDialog.cpp:150
void OnCancel(wxCommandEvent &event)
Definition: BatchCommandDialog.cpp:161