diff options
author | Robin Gareus <robin@gareus.org> | 2017-07-24 01:58:25 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-07-24 01:59:22 +0200 |
commit | 4ff6ed0f2287b66e0e15b89d26d1c013dc98eae0 (patch) | |
tree | 6ce956d44dae9b78b78c7e6196fb307745e9f2d8 /gtk2_ardour | |
parent | fde0e293a30ed4e689208b456a4431b7bb278eb4 (diff) |
Add touch to trim-control
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 20 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 1b0c82975c..343ddf99b6 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -268,6 +268,8 @@ MixerStrip::init () trim_control.set_tooltip_prefix (_("Trim: ")); trim_control.set_name ("trim knob"); trim_control.set_no_show_all (true); + trim_control.StartGesture.connect(sigc::mem_fun(*this, &MixerStrip::trim_start_touch)); + trim_control.StopGesture.connect(sigc::mem_fun(*this, &MixerStrip::trim_end_touch)); input_button_box.pack_start (trim_control, false, false); global_vpacker.set_border_width (1); @@ -498,6 +500,24 @@ MixerStrip::update_trim_control () } void +MixerStrip::trim_start_touch () +{ + assert (_route && _session); + if (route()->trim() && route()->trim()->active() && route()->n_inputs().n_audio() > 0) { + route()->trim()->gain_control ()->start_touch (_session->transport_frame()); + } +} + +void +MixerStrip::trim_end_touch () +{ + assert (_route && _session); + if (route()->trim() && route()->trim()->active() && route()->n_inputs().n_audio() > 0) { + route()->trim()->gain_control ()->stop_touch (_session->transport_frame()); + } +} + +void MixerStrip::set_route (boost::shared_ptr<Route> rt) { //the rec/monitor stuff only shows up for tracks. diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 531c0daf5c..d9979d0989 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -216,6 +216,9 @@ private: ArdourWidgets::ArdourButton _comment_button; ArdourWidgets::ArdourKnob trim_control; + void trim_start_touch (); + void trim_end_touch (); + void setup_comment_button (); ArdourWidgets::ArdourButton group_button; |