Another not-quite-there-but-better commit.
[ardour.git] / gtk2_ardour / automation_line.h
index 76afff5097a43cf62ce7359ac4bd0d29de5637be..76653e7a5948347b8561074914037a191e9f41c6 100644 (file)
@@ -56,7 +56,7 @@ namespace Gnome {
 class ControlPoint 
 {
   public:
-        ControlPoint (AutomationLine& al);
+       ControlPoint (AutomationLine& al);
        ControlPoint (const ControlPoint&, bool dummy_arg_to_force_special_copy_constructor);
        virtual ~ControlPoint ();
 
@@ -98,7 +98,7 @@ class ControlPoint
 class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoingAway
 {
   public:
-        AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
+       AutomationLine (const string & name, TimeAxisView&, ArdourCanvas::Group&, boost::shared_ptr<ARDOUR::AutomationList>);
        virtual ~AutomationLine ();
 
        void queue_reset ();
@@ -127,13 +127,14 @@ 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; }
 
        void    show ();
        void    hide ();
-       void    set_height (guint32);
+       void    set_y_position_and_height (uint32_t, uint32_t);
        void    set_verbose_cursor_uses_gain_mapping (bool yn);
 
        TimeAxisView& trackview;
@@ -146,10 +147,10 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
        void hide_selection ();
 
        virtual string  get_verbose_cursor_string (float);
-       virtual void view_to_model_y (double&) = 0;
-       virtual void model_to_view_y (double&) = 0;
+       virtual void view_to_model_y (double&);
+       virtual void model_to_view_y (double&);
 
-       ARDOUR::AutomationList& the_list() const { return alist; }
+       boost::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; }
 
        void show_all_control_points ();
        void hide_all_but_selected_control_points ();
@@ -164,9 +165,10 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
   protected:
 
        string _name;
+       guint32 _y_position;
        guint32 _height;
        uint32_t _line_color;
-       ARDOUR::AutomationList& alist;
+       boost::shared_ptr<ARDOUR::AutomationList> alist;
 
        bool    _visible  : 1;
        bool    _vc_uses_gain_mapping : 1;