s/ParamID/Parameter/
[ardour.git] / libs / ardour / ardour / curve.h
index 7ba6b5fa6c4438f02ff9ac40793879233dabd2b2..1010e7ef18e6802d4ff49aa9838270a861141c7f 100644 (file)
@@ -15,7 +15,6 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_curve_h__
 
 namespace ARDOUR {
 
-struct CurvePoint : public ControlEvent 
-{
-    double coeff[4];
-
-    CurvePoint (double w, double v) 
-           : ControlEvent (w, v) {
-
-           coeff[0] = coeff[1] = coeff[2] = coeff[3] = 0.0;
-    }
-
-    ~CurvePoint() {}
-};
-
-class Curve : public AutomationList
+class Curve
 {
   public:
-       Curve (double min_yval, double max_yval, double defaultvalue, bool nostate = false);
+       Curve (const AutomationList& al);
        ~Curve ();
        Curve (const Curve& other);
-       Curve (const Curve& other, double start, double end);
+       //Curve (const Curve& other, double start, double end);
+       /*Curve (const XMLNode&, Parameter id);*/
 
        bool rt_safe_get_vector (double x0, double x1, float *arg, int32_t veclen);
        void get_vector (double x0, double x1, float *arg, int32_t veclen);
 
-       AutomationEventList::iterator closest_control_point_before (double xval);
-       AutomationEventList::iterator closest_control_point_after (double xval);
-
        void solve ();
 
-        static sigc::signal<void, Curve*> CurveCreated;
-               
-  protected:
-       ControlEvent* point_factory (double,double) const;
-       ControlEvent* point_factory (const ControlEvent&) const;
-
-       Change   restore_state (StateManager::State&);
-
   private:
-       AutomationList::iterator last_bound;
-
        double unlocked_eval (double where);
        double multipoint_eval (double x);
 
        void _get_vector (double x0, double x1, float *arg, int32_t veclen);
 
+       const AutomationList& _list;
+
+       void on_list_dirty() { _dirty = true; }
+       bool _dirty;
 };
 
 } // namespace ARDOUR