1 #ifndef __gtk2_ardour_latency_gui_h__
2 #define __gtk2_ardour_latency_gui_h__
7 #include <gtkmm/dialog.h>
9 #include <gtkmm/button.h>
10 #include <gtkmm/adjustment.h>
12 #include <gtkmm2ext/barcontroller.h>
13 #include "pbd/controllable.h"
15 #include "ardour/types.h"
17 #include "ardour_dialog.h"
25 class LatencyBarController
: public Gtkmm2ext::BarController
28 LatencyBarController (Gtk::Adjustment
& adj
, LatencyGUI
* g
)
29 : BarController (adj
, boost::shared_ptr
<PBD::IgnorableControllable
> (new PBD::IgnorableControllable ())),
33 LatencyGUI
* _latency_gui
;
35 std::string
get_label (double&);
38 class LatencyGUI
: public Gtk::VBox
41 LatencyGUI (ARDOUR::Latent
&, framepos_t sample_rate
, framepos_t period_size
);
49 ARDOUR::Latent
& _latent
;
50 framepos_t initial_value
;
51 framepos_t sample_rate
;
52 framepos_t period_size
;
53 boost::shared_ptr
<PBD::IgnorableControllable
> ignored
;
55 Gtk::Adjustment adjustment
;
56 LatencyBarController bc
;
59 Gtk::HButtonBox hbbox
;
60 Gtk::Button minus_button
;
61 Gtk::Button plus_button
;
62 Gtk::Button reset_button
;
63 Gtk::ComboBoxText units_combo
;
65 void change_latency_from_button (int dir
);
67 friend class LatencyBarController
;
69 static std::vector
<std::string
> unit_strings
;
72 class LatencyDialog
: public ArdourDialog
75 LatencyDialog (const std::string
& title
, ARDOUR::Latent
&, framepos_t sample_rate
, framepos_t period_size
);
82 #endif /* __gtk2_ardour_latency_gui_h__ */