Audacity  2.2.0
EffectRack.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  EffectRack.h
6 
7  Leland Lucius
8 
9  Audacity(R) is copyright (c) 1999-2008 Audacity Team.
10  License: GPL v2. See License.txt.
11 
12 **********************************************************************/
13 
14 #ifndef __AUDACITY_EFFECTRACK_H__
15 #define __AUDACITY_EFFECTRACK_H__
16 
17 #include "../Experimental.h"
18 
19 #if defined(EXPERIMENTAL_EFFECTS_RACK)
20 
21 #include <wx/access.h>
22 #include <wx/bmpbuttn.h>
23 #include <wx/defs.h>
24 #include <wx/frame.h>
25 #include <wx/image.h>
26 #include <wx/panel.h>
27 #include <wx/sizer.h>
28 #include <wx/stattext.h>
29 #include <wx/timer.h>
30 
31 #include "EffectManager.h"
32 
33 class EffectRack final : public wxFrame
34 {
35 public:
36  EffectRack();
37  virtual ~EffectRack();
38 
39  void Add(Effect *effect, bool active = false, bool favorite = false);
40 
41 private:
42 
43  wxBitmap CreateBitmap(const char *xpm[], bool up, bool pusher);
44  int GetEffectIndex(wxWindow *win);
45  void MoveRowUp(int row);
46  void UpdateActive();
47 
48  void OnClose(wxCloseEvent & evt);
49  void OnTimer(wxTimerEvent & evt);
50  void OnApply(wxCommandEvent & evt);
51  void OnBypass(wxCommandEvent & evt);
52 
53  void OnPower(wxCommandEvent & evt);
54  void OnEditor(wxCommandEvent & evt);
55  void OnUp(wxCommandEvent & evt);
56  void OnDown(wxCommandEvent & evt);
57  void OnFav(wxCommandEvent & evt);
58  void OnRemove(wxCommandEvent & evt);
59 
60 private:
61  wxStaticText *mLatency;
62  int mLastLatency;
63 
64  wxBitmap mPowerPushed;
65  wxBitmap mPowerRaised;
66  wxBitmap mSettingsPushed;
67  wxBitmap mSettingsRaised;
68  wxBitmap mUpPushed;
69  wxBitmap mUpRaised;
70  wxBitmap mUpDisabled;
71  wxBitmap mDownPushed;
72  wxBitmap mDownRaised;
73  wxBitmap mDownDisabled;
74  wxBitmap mFavPushed;
75  wxBitmap mFavRaised;
76  wxBitmap mRemovePushed;
77  wxBitmap mRemoveRaised;
78 
79  wxArrayInt mPowerState;
80  wxArrayInt mFavState;
81 
82  int mNumEffects;
83 
84  wxTimer mTimer;
85 
86  wxPanel *mPanel;
87  wxFlexGridSizer *mMainSizer;
88 
89  EffectArray mEffects;
90  EffectArray mActive;
91  bool mBypassing;
92 
93  DECLARE_EVENT_TABLE()
94 };
95 
96 #endif
97 
98 #endif // __AUDACITY_EFFECTRACK_H__
Base class for many of the effects in Audacity.
Definition: Effect.h:62
std::vector< Effect * > EffectArray
Definition: EffectManager.h:37
void OnClose()