varied and wide changes to get input and output combos closer to working
[ardour.git] / libs / surfaces / mackie / controls.h
index 8538cace8892f77e684467b65c1ffb2e2061ab32..38eb30fb65d7a1f7598876a146ea3e7e10665e32 100644 (file)
@@ -36,27 +36,27 @@ namespace ARDOUR {
        class AutomationControl;
 }
 
-namespace Mackie
-{
+namespace ArdourSurface {
+
+namespace Mackie {
 
 class Strip;
 class Group;
 class Surface;
 
-class Control
-{
+class Control {
 public:
        Control (int id, std::string name, Group& group);
        virtual ~Control() {}
-       
+
        int id() const { return _id; }
        const std::string & name() const  { return _name; }
        Group & group() const { return _group; }
 
        bool in_use () const;
        void set_in_use (bool);
-       
-       /// Keep track of the timeout so it can be updated with more incoming events
+
+       // Keep track of the timeout so it can be updated with more incoming events
        sigc::connection in_use_connection;
 
        virtual MidiByteArray zero() = 0;
@@ -66,33 +66,28 @@ public:
         */
        Control* in_use_touch_control;
 
-       boost::shared_ptr<ARDOUR::AutomationControl> control (bool modified) const { return modified ? modified_ac : normal_ac; }
+       boost::shared_ptr<ARDOUR::AutomationControl> control () const { return normal_ac; }
+       virtual void set_control (boost::shared_ptr<ARDOUR::AutomationControl>);
 
-       virtual void set_normal_control (boost::shared_ptr<ARDOUR::AutomationControl>);
-       virtual void set_modified_control (boost::shared_ptr<ARDOUR::AutomationControl>);
+       float get_value ();
+       void set_value (float val);
 
-       float get_value (bool modified = false);
-       void set_value (float val, bool modified = false);
-       
-       virtual void start_touch (double when, bool modified);
-       virtual void stop_touch (double when, bool mark, bool modified);
+       virtual void start_touch (double when);
+       virtual void stop_touch (bool mark, double when);
 
   protected:
-       /* a control can operate up to 2 different AutomationControls
-          in any given mode. both of them may be unset at any time.
-       */
        boost::shared_ptr<ARDOUR::AutomationControl> normal_ac;
-       boost::shared_ptr<ARDOUR::AutomationControl> modified_ac;
 
   private:
-       int _id;
+       int _id; /* possibly device-dependent ID */
        std::string _name;
        Group& _group;
        bool _in_use;
 };
 
-std::ostream & operator <<  (std::ostream & os, const Control & control);
-
 }
+}
+
+std::ostream & operator <<  (std::ostream & os, const ArdourSurface::Mackie::Control & control);
 
 #endif /* __mackie_controls_h__ */