Open Ephys GUI
 All Classes Functions Variables Pages
SignalChainManager.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 
24 #ifndef __SIGNALCHAINMANAGER_H_948769B9__
25 #define __SIGNALCHAINMANAGER_H_948769B9__
26 
27 #include "../../JuceLibraryCode/JuceHeader.h"
28 #include "../Processors/Editors/GenericEditor.h"
29 #include "../AccessClass.h"
30 
31 
32 /**
33 
34  Helper functions for editing the signal chain.
35 
36  Created and owned by the EditorViewport.
37 
38  @see EditorViewport.
39 
40 */
41 
42 class GenericEditor;
44 class EditorViewport;
45 
47 {
48 public:
49  SignalChainManager(EditorViewport*, Array<GenericEditor*, CriticalSection>&,
50  Array<SignalChainTabButton*, CriticalSection>&);
52 
53  void updateVisibleEditors(GenericEditor* activeEditor, int index, int insertionPoint, int action);
54 
55  void createNewTab(GenericEditor* editor);
56  void removeTab(int tabIndex);
57  void scrollUp();
58  void scrollDown();
59 
60  void clearSignalChain();
61 
62 private:
63 
64  Array<GenericEditor*, CriticalSection>& editorArray;
65  Array<SignalChainTabButton*, CriticalSection>& signalChainArray;
66 
67  EditorViewport* ev;
68 
69  void refreshTabs();
70 
71  int topTab;
72 
73  const int tabSize;
74 
75 
76 };
77 
78 
79 #endif // __SIGNALCHAINMANAGER_H_948769B9__