-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSetActiveView.h
53 lines (41 loc) · 1.18 KB
/
SetActiveView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* SetActiveView.h
*
* Created on: Jul 25, 2014
* Author: bastl
*/
#ifndef SETACTIVEVIEW_H_
#define SETACTIVEVIEW_H_
#include <IView.h>
#include <ILEDsAndButtonsHW.h>
#include <IStepMemory.h>
#include <RadioButtons.h>
#include <Switches.h>
#include <Player.h>
#include "InstrumentBar.h"
#include "IButtonMap.h"
class SetActiveView : public IView {
public:
void init(unsigned char currentInstrumentIndex = 0, unsigned char currentPanIndex = 0);
void update();
unsigned char getSelectedInstrumentIndex();
unsigned char getSelectedBarIndex();
private:
unsigned char currentPanIndex_;
unsigned char currentInstrumentIndex_;
unsigned int currentStatuses_;
RadioButtons panButtons_;
RadioButtons instrumentButtons_;
Switches stepButtons_;
void updateActives();
void updateConfiguration();
ILEDHW::LedState getLEDStateFromActiveMultiStatus(IStepMemory::ActiveMultiStatus status);
void setActiveUpTo(unsigned char stepUpTo, bool instrumentSelected);
};
inline unsigned char SetActiveView::getSelectedInstrumentIndex() {
return currentInstrumentIndex_;
}
inline unsigned char SetActiveView::getSelectedBarIndex() {
return currentPanIndex_;
}
#endif /* SETACTIVEVIEW_H_ */