Relent a bit and make adding a route to a group which already contains that group...
[ardour.git] / gtk2_ardour / latency_gui.h
index f352f698d7b6961406538f613b52248f110513ce..9844bfaf8f86037bd6494f54a36579ee278eff0b 100644 (file)
@@ -10,9 +10,9 @@
 #include <gtkmm/adjustment.h>
 
 #include <gtkmm2ext/barcontroller.h>
-#include <pbd/controllable.h>
+#include "pbd/controllable.h"
 
-#include <ardour/types.h>
+#include "ardour/types.h"
 
 #include "ardour_dialog.h"
 
@@ -20,6 +20,21 @@ namespace ARDOUR {
        class Latent;
 }
 
+class LatencyGUI;
+
+class LatencyBarController : public Gtkmm2ext::BarController
+{
+public:
+       LatencyBarController (Gtk::Adjustment& adj, LatencyGUI* g)
+               : BarController (adj, boost::shared_ptr<PBD::IgnorableControllable> (new PBD::IgnorableControllable ())),
+                 _latency_gui (g) {}
+
+private:
+       LatencyGUI* _latency_gui;
+
+       std::string get_label (int&);
+};
+
 class LatencyGUI : public Gtk::VBox
 {
   public:
@@ -38,7 +53,7 @@ class LatencyGUI : public Gtk::VBox
        boost::shared_ptr<PBD::IgnorableControllable> ignored;
 
        Gtk::Adjustment adjustment;
-       Gtkmm2ext::BarController bc;
+       LatencyBarController bc;
        Gtk::HBox hbox1;
        Gtk::HBox hbox2;
        Gtk::HButtonBox hbbox;
@@ -48,7 +63,8 @@ class LatencyGUI : public Gtk::VBox
        Gtk::ComboBoxText units_combo;
 
        void change_latency_from_button (int dir);
-       void latency_printer (char* buf, unsigned int bufsize);
+
+       friend class LatencyBarController;
 
        static std::vector<std::string> unit_strings;
 };