Allow region-based automation axes to report whether they
[ardour.git] / gtk2_ardour / automation_time_axis.h
index f6239314abdfde6381f93c50a47ed17fcc048883..9d4802f6fca3133f982aab443b75937822007e54 100644 (file)
@@ -54,7 +54,7 @@ class AutomationController;
 
 class AutomationTimeAxisView : public TimeAxisView {
   public:
-       AutomationTimeAxisView (ARDOUR::Session&,
+       AutomationTimeAxisView (ARDOUR::Session*,
                                boost::shared_ptr<ARDOUR::Route>,
                                boost::shared_ptr<ARDOUR::Automatable>,
                                boost::shared_ptr<ARDOUR::AutomationControl>,
@@ -69,6 +69,7 @@ class AutomationTimeAxisView : public TimeAxisView {
 
        virtual void set_height (uint32_t);
        void set_samples_per_unit (double);
+       bool set_visibility (bool yn);
        std::string name() const { return _name; }
 
        void add_automation_event (ArdourCanvas::Item *item, GdkEvent *event, nframes_t, double);
@@ -90,7 +91,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        bool paste (nframes_t, float times, Selection&, size_t nth);
        void reset_objects (PointSelection&);
 
-       int  set_state (const XMLNode&, int version = 3000);
+       int  set_state (const XMLNode&, int version);
        guint32 show_at (double y, int& nth, Gtk::VBox *parent);
        void hide ();
 
@@ -100,6 +101,12 @@ class AutomationTimeAxisView : public TimeAxisView {
        boost::shared_ptr<ARDOUR::AutomationControl> control()    { return _control; }
        boost::shared_ptr<AutomationController>      controller() { return _controller; }
 
+       ArdourCanvas::Item* base_item () const {
+               return _base_rect;
+       }
+
+       bool has_automation () const;
+
   protected:
        boost::shared_ptr<ARDOUR::Route> _route; ///< Parent route
        boost::shared_ptr<ARDOUR::AutomationControl> _control; ///< Control
@@ -151,7 +158,7 @@ class AutomationTimeAxisView : public TimeAxisView {
        void set_interpolation (ARDOUR::AutomationList::InterpolationStyle);
        void interpolation_changed ();
 
-       sigc::connection automation_connection;
+       PBD::ScopedConnection automation_connection;
 
        void update_extra_xml_shown (bool editor_shown);