-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstrumentBar.h
41 lines (34 loc) · 995 Bytes
/
InstrumentBar.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
/*
* InstrumentBar.h
*
* Created on: Sep 3, 2014
* Author: bastl
*/
#ifndef INSTRUMENTBAR_H_
#define INSTRUMENTBAR_H_
#include <ILEDHW.h>
#include "IButtonMap.h"
class InstrumentBar {
public:
InstrumentBar();
void init(ILEDHW * hw, IButtonMap * buttonMap_, unsigned char instrumentCount);
void setActive(bool isActive);
void setInstrumentSelected(unsigned char instrumentIndex, bool isSelected);
void setInstrumentPlaying(unsigned char instrumentIndex, bool isPlaying);
void setInstrumentsMutes(unsigned char instrumentsMutes);
void resetSelected();
private:
ILEDHW * hw_;
IButtonMap * buttonMap_;
unsigned char instrumentCount_;
unsigned char instrumentsMutes_;
unsigned char currentSelectedStatuses_;
unsigned char currentPlayingStatuses_;
bool isActive_;
void updateView();
};
inline void InstrumentBar::setInstrumentsMutes(unsigned char instrumentsMutes) {
instrumentsMutes_ = instrumentsMutes;
if (isActive_) updateView();
}
#endif /* INSTRUMENTBAR_H_ */