X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gtk2_ardour%2Flatency_gui.h;h=9844bfaf8f86037bd6494f54a36579ee278eff0b;hb=ccf58b8de23619db9983a45f696fd97e13a15cce;hp=35fad9e2965e0fda4e0c99a768e0742e490624ff;hpb=64524c0ba40b9f69f06a395f8763615700244fda;p=ardour.git diff --git a/gtk2_ardour/latency_gui.h b/gtk2_ardour/latency_gui.h index 35fad9e296..9844bfaf8f 100644 --- a/gtk2_ardour/latency_gui.h +++ b/gtk2_ardour/latency_gui.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 (new PBD::IgnorableControllable ())), + _latency_gui (g) {} + +private: + LatencyGUI* _latency_gui; + + std::string get_label (int&); +}; + class LatencyGUI : public Gtk::VBox { public: @@ -31,8 +46,6 @@ class LatencyGUI : public Gtk::VBox void refresh (); private: - std::string get_label (int&); - ARDOUR::Latent& _latent; nframes64_t initial_value; nframes64_t sample_rate; @@ -40,7 +53,7 @@ class LatencyGUI : public Gtk::VBox boost::shared_ptr ignored; Gtk::Adjustment adjustment; - Gtkmm2ext::BarController bc; + LatencyBarController bc; Gtk::HBox hbox1; Gtk::HBox hbox2; Gtk::HButtonBox hbbox; @@ -51,6 +64,8 @@ class LatencyGUI : public Gtk::VBox void change_latency_from_button (int dir); + friend class LatencyBarController; + static std::vector unit_strings; };