Fix restore of track visibility from state files (#3245)
[ardour.git] / gtk2_ardour / automation_controller.h
index 6217aa10d201b201f81f959a51e213c3dfa00bec..a2168700e27edbc26ad46f9947150f4cc527d9da 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2007 Paul Davis 
+    Copyright (C) 2007 Paul Davis
     Author: Dave Robillard
 
     This program is free software; you can redistribute it and/or modify
@@ -23,7 +23,9 @@
 
 #include <boost/shared_ptr.hpp>
 #include <gtkmm.h>
-#include <gtkmm2ext/barcontroller.h>
+
+#include "gtkmm2ext/barcontroller.h"
+#include "pbd/signals.h"
 
 namespace ARDOUR {
        class Session;
@@ -32,7 +34,7 @@ namespace ARDOUR {
        class Automatable;
 }
 
-
+/** A BarController which displays the value and allows control of an AutomationControl */
 class AutomationController : public Gtkmm2ext::BarController {
 public:
        static boost::shared_ptr<AutomationController> create(
@@ -41,18 +43,20 @@ public:
                        boost::shared_ptr<ARDOUR::AutomationControl> ac);
 
        ~AutomationController();
-       
+
        boost::shared_ptr<ARDOUR::AutomationControl> controllable() { return _controllable; }
 
        Gtk::Adjustment* adjustment() { return _adjustment; }
-       
+
        void display_effective_value();
        void value_adjusted();
 
+       void stop_updating ();
+
 private:
        AutomationController (boost::shared_ptr<ARDOUR::AutomationControl> ac, Gtk::Adjustment* adj);
        std::string get_label (int&);
-       
+
        void start_touch();
        void end_touch();
 
@@ -63,6 +67,7 @@ private:
        boost::shared_ptr<ARDOUR::AutomationControl> _controllable;
        Gtk::Adjustment*                             _adjustment;
        sigc::connection                             _screen_update_connection;
+       PBD::ScopedConnection                        _changed_connection;
 };