Open Ephys GUI
 All Classes Functions Variables Pages
AudioEditor.h
1 /*
2  ------------------------------------------------------------------
3 
4  This file is part of the Open Ephys GUI
5  Copyright (C) 2012 Open Ephys
6 
7  ------------------------------------------------------------------
8 
9  This program is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  This program is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this program. If not, see <http://www.gnu.org/licenses/>.
21 
22 */
23 #ifndef __AUDIOEDITOR_H_9D6F1FC3__
24 #define __AUDIOEDITOR_H_9D6F1FC3__
25 
26 
27 #include "../../../JuceLibraryCode/JuceHeader.h"
28 #include "../AudioNode.h"
29 #include <stdio.h>
30 
31 class AudioNode;
32 class AudioComponent;
33 
34 class MuteButton : public ImageButton
35 {
36  public:
37  MuteButton();
38  ~MuteButton();
39 };
40 
41 class AudioWindowButton : public Button
42 {
43  public:
46  void paintButton(Graphics &g, bool isMouseOver, bool isButtonDown);
47  private:
48  Font font;
49 };
50 
51 class AudioConfigurationWindow : public DocumentWindow,
52  public AccessClass
53 {
54 public:
55  AudioConfigurationWindow(AudioDeviceManager& adm, Button* b);
57 
58  void paint (Graphics& g);
59  void resized();
60 
61 private:
62 
63  void closeButtonPressed();
64 
65  Button* controlButton;
66  //AudioDeviceManager* deviceManager;
67 
68 };
69 
70 class AudioEditor : public AudioProcessorEditor,
71  public Button::Listener,
72  public Slider::Listener,
73  public AccessClass
74 
75 {
76 public:
77  AudioEditor (AudioNode* owner);
78  ~AudioEditor();
79 
80  void paint (Graphics& g);
81 
82  bool keyPressed (const KeyPress& key);
83 
84  void resized();
85 
86 private:
87 
88  void buttonClicked (Button* button);
89  void sliderValueChanged(Slider* slider);
90 
91  float lastValue;
92 
93  MuteButton* muteButton;
94  AudioWindowButton* audioWindowButton;
96 
97  Slider* volumeSlider;
98 
99  JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (AudioEditor);
100 
101 };
102 
103 
104 
105 #endif // __AUDIOEDITOR_H_9D6F1FC3__