-namespace Mackie
-{
-
-class Control;
-
-/**
- This is a loose group of controls, eg cursor buttons,
- transport buttons, functions buttons etc.
-*/
-class Group
-{
-public:
- Group( const std::string & name )
- : _name( name )
- {
- }
-
- virtual ~Group() {}
-
- virtual bool is_strip() const
- {
- return false;
- }
-
- virtual bool is_master() const
- {
- return false;
- }
-
- virtual void add( Control & control );
-
- const std::string & name() const
- {
- return _name;
- }
-
- // This is for Surface only
- void name( const std::string & rhs ) { _name = rhs; }
-
- typedef std::vector<Control*> Controls;
- const Controls & controls() const { return _controls; }
-
-protected:
- Controls _controls;
-
-private:
- std::string _name;
-};
-
-class Button;
-class Pot;
-class Fader;
-
-/**
- This is the set of controls that make up a strip.
-*/
-class Strip : public Group
-{
-public:
- /**
- \param is the index of the strip. 0-based.
- */
- Strip( const std::string & name, int index );
-
- virtual bool is_strip() const
- {
- return true;
- }
-
- virtual void add( Control & control );
-
- /// This is the index of the strip. zero-based.
- int index() const { return _index; }
-
- /// This is for Surface only
- /// index is zero-based
- void index( int rhs ) { _index = rhs; }
-
- Button & solo();
- Button & recenable();
- Button & mute();
- Button & select();
- Button & vselect();
- Button & fader_touch();
- Pot & vpot();
- Fader & gain();
-
- 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; }
-
-private:
- Button * _solo;
- Button * _recenable;
- Button * _mute;
- Button * _select;
- Button * _vselect;
- Button * _fader_touch;
- Pot * _vpot;
- Fader * _gain;
- int _index;
-};