summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_controller.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-11-29 14:49:03 +0100
committerRobin Gareus <robin@gareus.org>2014-11-29 14:49:03 +0100
commit48bb90eb88202c683f3bb78f7ddf11da6114c1ab (patch)
tree4425f49558f5edd3227c2e4bbecf2b7038eee68b /gtk2_ardour/automation_controller.cc
parent58663db3743dbb5feddd9fc4221e7a328ef3b4ed (diff)
show values on faders (fixes bug in 55c6165)
Diffstat (limited to 'gtk2_ardour/automation_controller.cc')
-rw-r--r--gtk2_ardour/automation_controller.cc32
1 files changed, 23 insertions, 9 deletions
diff --git a/gtk2_ardour/automation_controller.cc b/gtk2_ardour/automation_controller.cc
index ff8b1932a2..a8051f0eb4 100644
--- a/gtk2_ardour/automation_controller.cc
+++ b/gtk2_ardour/automation_controller.cc
@@ -40,6 +40,27 @@
using namespace ARDOUR;
using namespace Gtk;
+AutomationBarController::AutomationBarController (
+ boost::shared_ptr<Automatable> printer,
+ boost::shared_ptr<AutomationControl> ac,
+ Adjustment* adj)
+ : Gtkmm2ext::BarController(*adj, ac)
+ , _printer(printer)
+ , _controllable(ac)
+{
+}
+
+std::string
+AutomationBarController::get_label (double& xpos)
+{
+ xpos = 0.5;
+ return _printer->value_as_string (_controllable);
+}
+
+AutomationBarController::~AutomationBarController()
+{
+}
+
AutomationController::AutomationController(boost::shared_ptr<Automatable> printer,
boost::shared_ptr<AutomationControl> ac,
Adjustment* adj)
@@ -67,7 +88,7 @@ AutomationController::AutomationController(boost::shared_ptr<Automatable>
_widget = but;
} else {
- Gtkmm2ext::BarController* bar = manage(new Gtkmm2ext::BarController(*adj, ac));
+ AutomationBarController* bar = manage(new AutomationBarController(_printer, ac, adj));
bar->set_name(X_("ProcessorControlSlider"));
bar->StartGesture.connect(
@@ -124,13 +145,6 @@ AutomationController::create(boost::shared_ptr<Automatable> printer,
return boost::shared_ptr<AutomationController>(new AutomationController(printer, ac, adjustment));
}
-std::string
-AutomationController::get_label (double& xpos)
-{
- xpos = 0.5;
- return _printer->value_as_string (_controllable);
-}
-
void
AutomationController::display_effective_value()
{
@@ -314,7 +328,7 @@ AutomationController::stop_updating ()
void
AutomationController::disable_vertical_scroll ()
{
- Gtkmm2ext::BarController* bar = dynamic_cast<Gtkmm2ext::BarController*>(_widget);
+ AutomationBarController* bar = dynamic_cast<AutomationBarController*>(_widget);
if (bar) {
bar->set_tweaks (
Gtkmm2ext::PixFader::Tweaks(bar->tweaks() |