From 92f3bc5c4486bd9d26979baf60c742c95faea62e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 22 Jun 2009 02:00:25 +0000 Subject: Some small fixes to the latency GUI. git-svn-id: svn://localhost/ardour2/branches/3.0@5243 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/latency_gui.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'gtk2_ardour/latency_gui.h') diff --git a/gtk2_ardour/latency_gui.h b/gtk2_ardour/latency_gui.h index 35fad9e296..9d36103ed7 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; }; -- cgit v1.2.3