fix a few things related to fit-to-tracks and toggle-visual-state (from 2.0)
[ardour.git] / gtk2_ardour / automation_line.h
index 9e35903671a0cc3248ca8319c8ffa0de23dbc173..1123a7b9a428f439d783660e680a07c49b7f755d 100644 (file)
@@ -33,7 +33,7 @@
 #include <pbd/undo.h>
 #include <pbd/statefuldestructible.h> 
 
-#include <ardour/automation_event.h>
+#include <ardour/automation_list.h>
 
 
 using std::vector;
@@ -85,7 +85,6 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
        string  name() const { return _name; }
        bool    visible() const { return _visible; }
        guint32 height() const { return _height; }
-       guint32 y_position() const { return _y_position; }
 
        void     set_line_color (uint32_t);
        uint32_t get_line_color() const { return _line_color; }
@@ -94,7 +93,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
 
        void    show ();
        void    hide ();
-       void    set_y_position_and_height (double, double);
+       void    set_height (guint32);
        void    set_verbose_cursor_uses_gain_mapping (bool yn);
 
        TimeAxisView& trackview;
@@ -110,6 +109,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
        virtual void view_to_model_y (double&);
        virtual void model_to_view_y (double&);
 
+       void set_list(boost::shared_ptr<ARDOUR::AutomationList> list);
        boost::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; }
 
        void show_all_control_points ();
@@ -128,7 +128,6 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
   protected:
 
        string _name;
-       guint32 _y_position;
        guint32 _height;
        uint32_t _line_color;
        boost::shared_ptr<ARDOUR::AutomationList> alist;
@@ -143,8 +142,8 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
 
        ArdourCanvas::Group&  _parent_group;
        ArdourCanvas::Group*   group;
-       ArdourCanvas::Line*   line; /* line */
-       ArdourCanvas::Points  line_points; /* coordinates for canvas line */
+       ArdourCanvas::Line*    line; /* line */
+       ArdourCanvas::Points   line_points; /* coordinates for canvas line */
        vector<ControlPoint*>  control_points; /* visible control points */
 
        struct ALPoint {
@@ -165,10 +164,11 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
        virtual void change_model (ARDOUR::AutomationList::iterator, double x, double y);
        virtual void change_model_range (ARDOUR::AutomationList::iterator,ARDOUR::AutomationList::iterator, double delta, float ydelta);
 
-       void reset_callback (const ARDOUR::AutomationList&);
+       void reset_callback (const Evoral::ControlList&);
        void list_changed ();
 
        virtual bool event_handler (GdkEvent*);
+       virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract);
        
   private:
        uint32_t drags;