Make sure that tests are rebuilt even when only their headers change.
[ardour.git] / gtk2_ardour / automation_controller.h
index 8a244113c4056d5e65becd37fba700f565a9f76d..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,26 +34,29 @@ 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(
                        boost::shared_ptr<ARDOUR::Automatable> parent,
-                       boost::shared_ptr<ARDOUR::AutomationList> al,
+                       const Evoral::Parameter& param,
                        boost::shared_ptr<ARDOUR::AutomationControl> ac);
 
        ~AutomationController();
-       
+
        boost::shared_ptr<ARDOUR::AutomationControl> controllable() { return _controllable; }
 
        Gtk::Adjustment* adjustment() { return _adjustment; }
-       
-       void update_label(char* label, int label_len);
+
        void display_effective_value();
        void value_adjusted();
 
+       void stop_updating ();
+
 private:
-       AutomationController(boost::shared_ptr<ARDOUR::AutomationControl> ac, Gtk::Adjustment* adj);
+       AutomationController (boost::shared_ptr<ARDOUR::AutomationControl> ac, Gtk::Adjustment* adj);
+       std::string get_label (int&);
+
        void start_touch();
        void end_touch();
 
@@ -62,6 +67,7 @@ private:
        boost::shared_ptr<ARDOUR::AutomationControl> _controllable;
        Gtk::Adjustment*                             _adjustment;
        sigc::connection                             _screen_update_connection;
+       PBD::ScopedConnection                        _changed_connection;
 };