2 Copyright (C) 2001 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <ardour/audioregion.h>
22 #include <ardour/utils.h>
23 #include <gtkmm2ext/utils.h>
24 #include <gtkmm2ext/stop_signal.h>
27 #include "region_editor.h"
28 #include "regionview.h"
29 #include "ardour_ui.h"
34 using namespace ARDOUR;
38 AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView& rv)
39 : ArdourDialog ("audio region editor"),
43 name_label (_("NAME:")),
44 lock_button (_("lock")),
45 mute_button (_("mute")),
46 opaque_button (_("opaque")),
47 raise_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT),
48 lower_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
49 layer_label (_("Layer")),
50 audition_label (_("play")),
52 start_clock ("AudioRegionEditorClock", true),
53 end_clock ("AudioRegionEditorClock", true),
54 length_clock ("AudioRegionEditorClock", true, true),
55 sync_offset_clock ("AudioRegionEditorClock", true, true),
56 envelope_loop_table (1, 3),
57 envelope_label (_("ENVELOPE")),
59 fade_in_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
60 fade_in_length_spinner (fade_in_length_adjustment, 10),
61 fade_out_table (4, 3),
62 fade_out_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
63 fade_out_length_spinner (fade_out_length_adjustment, 10)
66 start_clock.set_session (&_session);
67 end_clock.set_session (&_session);
68 length_clock.set_session (&_session);
70 name_entry.set_name ("AudioRegionEditorEntry");
71 name_label.set_name ("AudioRegionEditorLabel");
73 name_hbox.set_spacing (5);
74 name_hbox.pack_start (name_label, false, false);
75 name_hbox.pack_start (name_entry, false, false);
77 raise_button.add (raise_arrow);
78 lower_button.add (lower_arrow);
79 layer_frame.set_name ("BaseFrame");
80 layer_frame.set_shadow_type (Gtk::SHADOW_IN);
81 layer_frame.add (layer_value_label);
82 layer_label.set_name ("AudioRegionEditorLabel");
83 layer_value_label.set_name ("AudioRegionEditorLabel");
84 Gtkmm2ext::set_size_request_to_display_given_text (layer_value_label, "99", 5, 2);
86 layer_hbox.set_spacing (5);
87 layer_hbox.pack_start (layer_label, false, false);
88 layer_hbox.pack_start (layer_frame, false, false);
90 layer_hbox.pack_start (raise_button, false, false);
91 layer_hbox.pack_start (lower_button, false, false);
94 audition_button.add (audition_label);
96 mute_button.set_name ("AudioRegionEditorToggleButton");
97 opaque_button.set_name ("AudioRegionEditorToggleButton");
98 lock_button.set_name ("AudioRegionEditorToggleButton");
99 envelope_active_button.set_name ("AudioRegionEditorToggleButton");
100 envelope_view_button.set_name ("AudioRegionEditorToggleButton");
101 fade_in_active_button.set_name ("AudioRegionEditorToggleButton");
102 fade_out_active_button.set_name ("AudioRegionEditorToggleButton");
103 audition_button.set_name ("AudioRegionEditorToggleButton");
105 ARDOUR_UI::instance()->tooltips().set_tip (mute_button, _("mute this region"));
106 ARDOUR_UI::instance()->tooltips().set_tip (opaque_button, _("regions underneath this one cannot be heard"));
107 ARDOUR_UI::instance()->tooltips().set_tip (lock_button, _("prevent any changes to this region"));
108 ARDOUR_UI::instance()->tooltips().set_tip (envelope_active_button, _("use the gain envelope during playback"));
109 ARDOUR_UI::instance()->tooltips().set_tip (envelope_view_button, _("show the gain envelope"));
110 ARDOUR_UI::instance()->tooltips().set_tip (fade_in_active_button, _("use fade in curve during playback"));
111 ARDOUR_UI::instance()->tooltips().set_tip (fade_out_active_button, _("use fade out curve during playback"));
112 ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
114 mute_button.unset_flags (Gtk::CAN_FOCUS);
115 opaque_button.unset_flags (Gtk::CAN_FOCUS);
116 lock_button.unset_flags (Gtk::CAN_FOCUS);
117 envelope_active_button.unset_flags (Gtk::CAN_FOCUS);
118 envelope_view_button.unset_flags (Gtk::CAN_FOCUS);
119 fade_in_active_button.unset_flags (Gtk::CAN_FOCUS);
120 fade_out_active_button.unset_flags (Gtk::CAN_FOCUS);
121 audition_button.unset_flags (Gtk::CAN_FOCUS);
123 mute_button.set_events (mute_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
124 opaque_button.set_events (opaque_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
125 lock_button.set_events (lock_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
126 envelope_active_button.set_events (envelope_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
127 envelope_view_button.set_events (envelope_view_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
128 fade_in_active_button.set_events (fade_in_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
129 fade_out_active_button.set_events (fade_out_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
130 audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
132 top_row_button_hbox.set_border_width (5);
133 top_row_button_hbox.set_spacing (5);
134 top_row_button_hbox.set_homogeneous (false);
135 top_row_button_hbox.pack_start (mute_button, false, false);
136 top_row_button_hbox.pack_start (opaque_button, false, false);
137 top_row_button_hbox.pack_start (lock_button, false, false);
138 top_row_button_hbox.pack_start (layer_hbox, false, false, 5);
139 top_row_button_hbox.pack_end (audition_button, false, false);
141 top_row_hbox.pack_start (name_hbox, true, true);
142 top_row_hbox.pack_end (top_row_button_hbox, true, true);
144 start_label.set_name ("AudioRegionEditorLabel");
145 start_label.set_text (_("START:"));
146 end_label.set_name ("AudioRegionEditorLabel");
147 end_label.set_text (_("END:"));
148 length_label.set_name ("AudioRegionEditorLabel");
149 length_label.set_text (_("LENGTH:"));
151 time_table.set_col_spacings (2);
152 time_table.set_row_spacings (5);
153 time_table.set_border_width (5);
155 start_alignment.set (1.0, 0.5);
156 end_alignment.set (1.0, 0.5);
157 length_alignment.set (1.0, 0.5);
159 start_alignment.add (start_label);
160 end_alignment.add (end_label);
161 length_alignment.add (length_label);
163 time_table.attach (start_alignment, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
164 time_table.attach (start_clock, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
166 time_table.attach (end_alignment, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
167 time_table.attach (end_clock, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
169 time_table.attach (length_alignment, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL);
170 time_table.attach (length_clock, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL);
172 envelope_label.set_name ("AudioRegionEditorLabel");
174 envelope_active_button_label.set_text (_("active"));
175 envelope_active_button.add (envelope_active_button_label);
176 envelope_view_button_label.set_text (_("visible"));
177 envelope_view_button.add (envelope_view_button_label);
179 envelope_loop_table.set_border_width (5);
180 envelope_loop_table.set_row_spacings (2);
181 envelope_loop_table.attach (envelope_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
182 envelope_loop_table.attach (envelope_active_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
183 envelope_loop_table.attach (envelope_view_button, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
187 fade_in_table.set_border_width (5);
188 fade_in_table.set_homogeneous (false);
190 fade_in_label.set_name ("AudioRegionEditorLabel");
191 fade_in_active_button_label.set_name ("AudioRegionEditorSmallLabel");
192 fade_in_length_label.set_name ("AudioRegionEditorSmallLabel");
194 fade_in_label.set_text (_("FADE IN"));
195 fade_in_active_button_label.set_text (_("active"));
196 fade_in_length_label.set_text (_("msecs"));
198 fade_in_active_button.add (fade_in_active_button_label);
200 fade_in_length_spinner.set_name("GenericSpinner");
202 fade_in_length_spinner.set_digits (3);
204 // fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
206 Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
208 fade_in_label_align.add (fade_in_label);
209 fade_in_label_align.set (0.5);
212 fade_in_table.attach (fade_in_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
214 fade_in_table.attach (fade_in_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
215 fade_in_table.attach (fade_in_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
217 fade_in_table.attach (fade_in_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
221 fade_out_table.set_border_width (5);
222 fade_out_table.set_homogeneous (false);
224 fade_out_label.set_name ("AudioRegionEditorLabel");
225 fade_out_active_button_label.set_name ("AudioRegionEditorSmallLabel");
226 fade_out_length_label.set_name ("AudioRegionEditorSmallLabel");
228 fade_out_label.set_text (_("FADE OUT"));
229 fade_out_active_button_label.set_text (_("active"));
230 fade_out_length_label.set_text (_("msecs"));
232 fade_out_active_button.add (fade_out_active_button_label);
234 fade_out_length_spinner.set_name("GenericSpinner");
236 fade_out_length_spinner.set_digits (3);
238 fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
240 Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
242 fade_out_label_align.add (fade_out_label);
243 fade_out_label_align.set (0.5);
245 fade_out_table.attach (fade_out_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
247 fade_out_table.attach (fade_out_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
248 fade_out_table.attach (fade_out_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
250 fade_out_table.attach (fade_out_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
252 lower_hbox.pack_start (time_table, true, true);
253 lower_hbox.pack_start (sep1, false, false);
254 lower_hbox.pack_start (envelope_loop_table, true, true);
255 lower_hbox.pack_start (sep2, false, false);
256 lower_hbox.pack_start (fade_in_table, true, true);
257 lower_hbox.pack_start (fade_out_table, true, true);
259 upper_vbox.pack_start (top_row_hbox, true, true);
260 upper_vbox.pack_start (sep3, false, false);
261 upper_vbox.pack_start (lower_hbox, true, true);
264 set_name ("AudioRegionEditorWindow");
265 add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
267 signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (this)));
269 string title = _("ardour: region ");
270 title += _region.name();
274 bounds_changed (Change (StartChanged|LengthChanged|PositionChanged));
275 envelope_active_changed ();
283 XMLNode *node = _region.extra_xml ("GUI");
284 XMLProperty *prop = 0;
285 bool showing_envelope = false;
287 if (node && (prop = node->property ("envelope-visible")) != 0) {
288 if (prop->value() == "yes") {
289 showing_envelope = true;
293 if (showing_envelope) {
294 envelope_view_button.set_active (true);
296 envelope_view_button.set_active (false);
299 _region.StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
301 spin_arrow_grab = false;
303 connect_editor_events ();
306 AudioRegionEditor::~AudioRegionEditor ()
311 AudioRegionEditor::region_changed (Change what_changed)
313 if (what_changed & NameChanged) {
316 if (what_changed & BoundsChanged) {
317 bounds_changed (what_changed);
320 if (what_changed & Region::OpacityChanged) {
323 if (what_changed & Region::MuteChanged) {
326 if (what_changed & Region::LockChanged) {
329 if (what_changed & Region::LayerChanged) {
333 if (what_changed & AudioRegion::EnvelopeActiveChanged) {
334 envelope_active_changed ();
336 if (what_changed & AudioRegion::FadeInChanged) {
339 if (what_changed & AudioRegion::FadeOutChanged) {
342 if (what_changed & AudioRegion::FadeInActiveChanged) {
343 fade_in_active_changed ();
345 if (what_changed & AudioRegion::FadeOutActiveChanged) {
346 fade_out_active_changed ();
351 AudioRegionEditor::fade_in_realized ()
357 AudioRegionEditor::fade_out_realized ()
363 AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
365 switch (ev->button) {
369 if (ev->type == GDK_BUTTON_PRESS) { /* no double clicks here */
370 if (!spin_arrow_grab) {
371 // GTK2FIX probably nuke the region editor
372 // if ((ev->window == but->gobj()->panel)) {
373 // spin_arrow_grab = true;
386 AudioRegionEditor::breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
388 if (spin_arrow_grab) {
390 spin_arrow_grab = false;
396 AudioRegionEditor::start_editing_fade_in ()
402 AudioRegionEditor::stop_editing_fade_in ()
404 _region.thaw (_("fade in edit"));
408 AudioRegionEditor::start_editing_fade_out ()
414 AudioRegionEditor::stop_editing_fade_out ()
416 _region.thaw (_("fade out edit"));
420 AudioRegionEditor::connect_editor_events ()
422 name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
424 start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed));
425 end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed));
426 length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed));
428 fade_in_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner,
429 &AudioRegionEditor::start_editing_fade_in));
430 fade_in_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner,
431 &AudioRegionEditor::stop_editing_fade_in));
433 fade_out_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner,
434 &AudioRegionEditor::start_editing_fade_out));
435 fade_out_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner,
436 &AudioRegionEditor::stop_editing_fade_out));
438 fade_in_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed));
439 fade_out_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed));
441 fade_in_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled));
442 fade_out_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled));
444 envelope_active_button.signal_button_press_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press));
445 envelope_active_button.signal_button_release_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release));
446 audition_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled));
447 envelope_view_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled));
448 lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked));
449 mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked));
450 opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked));
451 raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked));
452 lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked));
456 AudioRegionEditor::start_clock_changed ()
458 _region.set_position (start_clock.current_time(), this);
462 AudioRegionEditor::end_clock_changed ()
464 _region.trim_end (end_clock.current_time(), this);
466 end_clock.set (_region.position() + _region.length(), true);
470 AudioRegionEditor::length_clock_changed ()
472 jack_nframes_t frames = length_clock.current_time();
473 _region.trim_end (_region.position() + frames, this);
475 length_clock.set (_region.length());
479 AudioRegionEditor::envelope_active_button_press(GdkEventButton *ev)
481 return stop_signal (envelope_active_button, "button_press_event");
485 AudioRegionEditor::envelope_active_button_release (GdkEventButton *ev)
487 _region.set_envelope_active (!_region.envelope_active());
488 return stop_signal (envelope_active_button, "button_release_event");
492 AudioRegionEditor::envelope_view_button_toggled ()
494 bool visible = envelope_view_button.get_active ();
496 _region_view.set_envelope_visible (visible);
500 AudioRegionEditor::audition_button_toggled ()
502 if (audition_button.get_active()) {
503 _session.audition_region (_region);
505 _session.cancel_audition ();
510 AudioRegionEditor::raise_button_clicked ()
516 AudioRegionEditor::lower_button_clicked ()
522 AudioRegionEditor::opaque_button_clicked ()
524 bool ractive = _region.opaque();
526 if (opaque_button.get_active() != ractive) {
527 _region.set_opaque (!ractive);
532 AudioRegionEditor::mute_button_clicked ()
534 bool ractive = _region.muted();
536 if (mute_button.get_active() != ractive) {
537 _region.set_muted (!ractive);
542 AudioRegionEditor::lock_button_clicked ()
544 bool ractive = _region.locked();
546 if (lock_button.get_active() != ractive) {
547 _region.set_locked (!ractive);
552 AudioRegionEditor::layer_changed ()
555 snprintf (buf, sizeof(buf), "%d", (int) _region.layer() + 1);
556 layer_value_label.set_text (buf);
560 AudioRegionEditor::name_changed ()
562 if (name_entry.get_text() != _region.name()) {
563 name_entry.set_text (_region.name());
568 AudioRegionEditor::lock_changed ()
572 if ((yn = _region.locked()) != lock_button.get_active()) {
573 lock_button.set_active (yn);
576 start_clock.set_sensitive (!yn);
577 end_clock.set_sensitive (!yn);
578 length_clock.set_sensitive (!yn);
582 AudioRegionEditor::envelope_active_changed ()
586 if ((yn = _region.envelope_active()) != envelope_active_button.get_active()) {
587 envelope_active_button.set_active (yn);
592 AudioRegionEditor::opacity_changed ()
595 if ((yn = _region.opaque()) != opaque_button.get_active()) {
596 opaque_button.set_active (yn);
601 AudioRegionEditor::mute_changed ()
604 if ((yn = _region.muted()) != mute_button.get_active()) {
605 mute_button.set_active (yn);
610 AudioRegionEditor::bounds_changed (Change what_changed)
612 if (what_changed & Change ((PositionChanged|LengthChanged))) {
613 start_clock.set (_region.position(), true);
614 end_clock.set (_region.position() + _region.length(), true);
615 length_clock.set (_region.length(), true);
620 AudioRegionEditor::activation ()
626 AudioRegionEditor::name_entry_changed ()
628 if (name_entry.get_text() != _region.name()) {
629 _region.set_name (name_entry.get_text());
634 AudioRegionEditor::fade_in_changed ()
636 float msecs = fade_in_length_adjustment.get_value();
637 jack_nframes_t sr = _session.frame_rate();
638 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
639 jack_nframes_t frames;
642 if (adj_frames != (frames = (jack_nframes_t) _region.fade_in().back()->when)) {
643 fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
646 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
647 fade_in_active_button.set_active (x);
652 AudioRegionEditor::fade_out_changed ()
654 float msecs = fade_out_length_adjustment.get_value();
655 jack_nframes_t sr = _session.frame_rate();
656 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
657 jack_nframes_t frames;
659 if (adj_frames != (frames = (jack_nframes_t) _region.fade_out().back()->when)) {
660 fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
663 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
664 fade_out_active_button.set_active (x);
669 AudioRegionEditor::fade_in_length_adjustment_changed ()
671 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
672 fade_length = max (fade_length, (jack_nframes_t) 64);
673 fade_length = min (fade_length, _region.length());
675 _region.set_fade_in_length (fade_length);
676 /* region is frozen, no worries */
681 AudioRegionEditor::fade_out_length_adjustment_changed ()
683 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
684 fade_length = max (fade_length, (jack_nframes_t) 64);
685 fade_length = min (fade_length, _region.length());
687 _region.set_fade_out_length (fade_length);
688 /* region is frozen, no worries */
693 AudioRegionEditor::fade_in_active_toggled ()
695 _region.set_fade_in_active (fade_in_active_button.get_active());
699 AudioRegionEditor::fade_out_active_toggled ()
701 _region.set_fade_out_active (fade_out_active_button.get_active());
705 AudioRegionEditor::fade_out_active_changed ()
709 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
710 fade_out_active_button.set_active (x);
715 AudioRegionEditor::fade_in_active_changed ()
719 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
720 fade_in_active_button.set_active (x);