#include "ardour/io.h"
#include "ardour/dB.h"
#include <gtkmm2ext/utils.h>
-#include <gtkmm2ext/stop_signal.h>
#include <gtkmm2ext/barcontroller.h>
#include "midi++/manager.h"
#include "pbd/fastlog.h"
boost::shared_ptr<AutomationControl> ac = _panner->pan_control (asz);
if (asz) {
- bc->StartGesture.connect (sigc::mem_fun (*ac, &AutomationControl::start_touch));
- bc->StopGesture.connect (sigc::mem_fun (*ac, &AutomationControl::stop_touch));
+ bc->StartGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::start_touch),
+ boost::weak_ptr<AutomationControl> (ac)));
+ bc->StopGesture.connect (sigc::bind (sigc::mem_fun (*this, &PannerUI::stop_touch),
+ boost::weak_ptr<AutomationControl>(ac)));
}
char buf[64];
}
}
+void
+PannerUI::start_touch (boost::weak_ptr<AutomationControl> wac)
+{
+ boost::shared_ptr<AutomationControl> ac = wac.lock();
+ if (!ac) {
+ return;
+ }
+ ac->start_touch (ac->session().transport_frame());
+}
+
+void
+PannerUI::stop_touch (boost::weak_ptr<AutomationControl> wac)
+{
+ boost::shared_ptr<AutomationControl> ac = wac.lock();
+ if (!ac) {
+ return;
+ }
+ ac->stop_touch (false, ac->session().transport_frame());
+}
+
bool
PannerUI::pan_button_event (GdkEventButton* ev, uint32_t which)
{