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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
#ifndef __ardour_mackie_control_protocol_strip_h__
#define __ardour_mackie_control_protocol_strip_h__
#include <string>
#include <iostream>
#include "control_group.h"
namespace Mackie {
class Control;
class Surface;
class Button;
class Pot;
class Fader;
class Meter;
struct StripControlDefinition {
const char* name;
uint32_t base_id;
Control* (*factory)(Surface&, int index, int ordinal, const char* name, Group&);
};
struct GlobalControlDefinition {
const char* name;
uint32_t id;
Control* (*factory)(Surface&, int index, int ordinal, const char* name, Group&);
const char* group_name;
};
/**
This is the set of controls that make up a strip.
*/
class Strip : public Group
{
public:
Strip (const std::string& name, int index); /* master strip only */
Strip (Surface&, const std::string & name, int surface_number, int index, int unit_index, StripControlDefinition* ctls);
virtual bool is_strip() const { return true; }
virtual void add (Control & control);
int index() const { return _index; } // zero based
Button & solo();
Button & recenable();
Button & mute();
Button & select();
Button & vselect();
Button & fader_touch();
Pot & vpot();
Fader & gain();
Meter& meter ();
bool has_solo() const { return _solo != 0; }
bool has_recenable() const { return _recenable != 0; }
bool has_mute() const { return _mute != 0; }
bool has_select() const { return _select != 0; }
bool has_vselect() const { return _vselect != 0; }
bool has_fader_touch() const { return _fader_touch != 0; }
bool has_vpot() const { return _vpot != 0; }
bool has_gain() const { return _gain != 0; }
bool has_meter() const { return _meter != 0; }
private:
Button* _solo;
Button* _recenable;
Button* _mute;
Button* _select;
Button* _vselect;
Button* _fader_touch;
Pot* _vpot;
Fader* _gain;
Meter* _meter;
int _index;
};
std::ostream & operator << (std::ostream &, const Strip &);
class MasterStrip : public Strip
{
public:
MasterStrip (const std::string & name, int index)
: Strip (name, index) {}
virtual bool is_master() const { return true; }
};
}
#endif /* __ardour_mackie_control_protocol_strip_h__ */
|