Start/end touch for generic-UI knob and proc-box inline ctrls
This commit is contained in:
parent
183351f333
commit
25df9f1ba5
|
@ -98,6 +98,8 @@ AutomationController::AutomationController(boost::shared_ptr<AutomationControl>
|
||||||
knob->set_controllable (ac);
|
knob->set_controllable (ac);
|
||||||
knob->set_name("processor control knob");
|
knob->set_name("processor control knob");
|
||||||
_widget = knob;
|
_widget = knob;
|
||||||
|
knob->StartGesture.connect(sigc::mem_fun(*this, &AutomationController::start_touch));
|
||||||
|
knob->StopGesture.connect(sigc::mem_fun(*this, &AutomationController::end_touch));
|
||||||
} else {
|
} else {
|
||||||
AutomationBarController* bar = manage(new AutomationBarController(ac, adj));
|
AutomationBarController* bar = manage(new AutomationBarController(ac, adj));
|
||||||
|
|
||||||
|
|
|
@ -851,6 +851,9 @@ ProcessorEntry::Control::Control (boost::shared_ptr<AutomationControl> c, string
|
||||||
_adjustment.set_page_increment (largestep);
|
_adjustment.set_page_increment (largestep);
|
||||||
_slider.set_default_value (normal);
|
_slider.set_default_value (normal);
|
||||||
|
|
||||||
|
_slider.StartGesture.connect(sigc::mem_fun(*this, &Control::start_touch));
|
||||||
|
_slider.StopGesture.connect(sigc::mem_fun(*this, &Control::end_touch));
|
||||||
|
|
||||||
_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &Control::slider_adjusted));
|
_adjustment.signal_value_changed().connect (sigc::mem_fun (*this, &Control::slider_adjusted));
|
||||||
c->Changed.connect (_connections, invalidator (*this), boost::bind (&Control::control_changed, this), gui_context ());
|
c->Changed.connect (_connections, invalidator (*this), boost::bind (&Control::control_changed, this), gui_context ());
|
||||||
if (c->alist ()) {
|
if (c->alist ()) {
|
||||||
|
@ -901,6 +904,26 @@ ProcessorEntry::Control::slider_adjusted ()
|
||||||
set_tooltip ();
|
set_tooltip ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ProcessorEntry::Control::start_touch ()
|
||||||
|
{
|
||||||
|
boost::shared_ptr<AutomationControl> c = _control.lock ();
|
||||||
|
if (!c) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
c->start_touch (c->session().transport_frame());
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ProcessorEntry::Control::end_touch ()
|
||||||
|
{
|
||||||
|
boost::shared_ptr<AutomationControl> c = _control.lock ();
|
||||||
|
if (!c) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
c->stop_touch (true, c->session().transport_frame());
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ProcessorEntry::Control::button_clicked ()
|
ProcessorEntry::Control::button_clicked ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -223,6 +223,9 @@ private:
|
||||||
std::string state_id () const;
|
std::string state_id () const;
|
||||||
void set_tooltip ();
|
void set_tooltip ();
|
||||||
|
|
||||||
|
void start_touch ();
|
||||||
|
void end_touch ();
|
||||||
|
|
||||||
boost::weak_ptr<ARDOUR::AutomationControl> _control;
|
boost::weak_ptr<ARDOUR::AutomationControl> _control;
|
||||||
/* things for a slider */
|
/* things for a slider */
|
||||||
Gtk::Adjustment _adjustment;
|
Gtk::Adjustment _adjustment;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user