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"
31 #include "gui_thread.h"
35 using namespace ARDOUR;
39 AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView& rv)
40 : ArdourDialog ("audio region editor"),
44 name_label (_("NAME:")),
45 lock_button (_("lock")),
46 mute_button (_("mute")),
47 opaque_button (_("opaque")),
48 envelope_active_button(_("active")),
49 envelope_view_button(_("visible")),
50 raise_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT),
51 lower_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
52 layer_label (_("Layer")),
53 audition_button (_("play")),
55 start_clock ("AudioRegionEditorClock", true),
56 end_clock ("AudioRegionEditorClock", true),
57 length_clock ("AudioRegionEditorClock", true, true),
58 sync_offset_clock ("AudioRegionEditorClock", true, true),
59 envelope_loop_table (1, 3),
60 envelope_label (_("ENVELOPE")),
62 fade_in_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
63 fade_in_length_spinner (fade_in_length_adjustment, 10),
64 fade_out_table (4, 3),
65 fade_out_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
66 fade_out_length_spinner (fade_out_length_adjustment, 10)
69 start_clock.set_session (&_session);
70 end_clock.set_session (&_session);
71 length_clock.set_session (&_session);
73 name_entry.set_name ("AudioRegionEditorEntry");
74 name_label.set_name ("AudioRegionEditorLabel");
76 name_hbox.set_spacing (5);
77 name_hbox.pack_start (name_label, false, false);
78 name_hbox.pack_start (name_entry, false, false);
80 raise_button.add (raise_arrow);
81 lower_button.add (lower_arrow);
82 layer_frame.set_name ("BaseFrame");
83 layer_frame.set_shadow_type (Gtk::SHADOW_IN);
84 layer_frame.add (layer_value_label);
85 layer_label.set_name ("AudioRegionEditorLabel");
86 layer_value_label.set_name ("AudioRegionEditorLabel");
87 Gtkmm2ext::set_size_request_to_display_given_text (layer_value_label, "99", 5, 2);
89 layer_hbox.set_spacing (5);
90 layer_hbox.pack_start (layer_label, false, false);
91 layer_hbox.pack_start (layer_frame, false, false);
93 layer_hbox.pack_start (raise_button, false, false);
94 layer_hbox.pack_start (lower_button, false, false);
97 mute_button.set_name ("AudioRegionEditorToggleButton");
98 opaque_button.set_name ("AudioRegionEditorToggleButton");
99 lock_button.set_name ("AudioRegionEditorToggleButton");
100 envelope_active_button.set_name ("AudioRegionEditorToggleButton");
101 envelope_view_button.set_name ("AudioRegionEditorToggleButton");
102 fade_in_active_button.set_name ("AudioRegionEditorToggleButton");
103 fade_out_active_button.set_name ("AudioRegionEditorToggleButton");
104 audition_button.set_name ("AudioRegionEditorToggleButton");
106 ARDOUR_UI::instance()->tooltips().set_tip (mute_button, _("mute this region"));
107 ARDOUR_UI::instance()->tooltips().set_tip (opaque_button, _("regions underneath this one cannot be heard"));
108 ARDOUR_UI::instance()->tooltips().set_tip (lock_button, _("prevent any changes to this region"));
109 ARDOUR_UI::instance()->tooltips().set_tip (envelope_active_button, _("use the gain envelope during playback"));
110 ARDOUR_UI::instance()->tooltips().set_tip (envelope_view_button, _("show the gain envelope"));
111 ARDOUR_UI::instance()->tooltips().set_tip (fade_in_active_button, _("use fade in curve during playback"));
112 ARDOUR_UI::instance()->tooltips().set_tip (fade_out_active_button, _("use fade out curve during playback"));
113 ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
115 mute_button.unset_flags (Gtk::CAN_FOCUS);
116 opaque_button.unset_flags (Gtk::CAN_FOCUS);
117 lock_button.unset_flags (Gtk::CAN_FOCUS);
118 envelope_active_button.unset_flags (Gtk::CAN_FOCUS);
119 envelope_view_button.unset_flags (Gtk::CAN_FOCUS);
120 fade_in_active_button.unset_flags (Gtk::CAN_FOCUS);
121 fade_out_active_button.unset_flags (Gtk::CAN_FOCUS);
122 audition_button.unset_flags (Gtk::CAN_FOCUS);
124 mute_button.set_events (mute_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
125 opaque_button.set_events (opaque_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
126 lock_button.set_events (lock_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
127 envelope_active_button.set_events (envelope_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
128 envelope_view_button.set_events (envelope_view_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
129 fade_in_active_button.set_events (fade_in_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
130 fade_out_active_button.set_events (fade_out_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
131 audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
133 top_row_button_hbox.set_border_width (5);
134 top_row_button_hbox.set_spacing (5);
135 top_row_button_hbox.set_homogeneous (false);
136 top_row_button_hbox.pack_start (mute_button, false, false);
137 top_row_button_hbox.pack_start (opaque_button, false, false);
138 top_row_button_hbox.pack_start (lock_button, false, false);
139 top_row_button_hbox.pack_start (layer_hbox, false, false, 5);
140 top_row_button_hbox.pack_end (audition_button, false, false);
142 top_row_hbox.pack_start (name_hbox, true, true);
143 top_row_hbox.pack_end (top_row_button_hbox, true, true);
145 start_label.set_name ("AudioRegionEditorLabel");
146 start_label.set_text (_("START:"));
147 end_label.set_name ("AudioRegionEditorLabel");
148 end_label.set_text (_("END:"));
149 length_label.set_name ("AudioRegionEditorLabel");
150 length_label.set_text (_("LENGTH:"));
152 time_table.set_col_spacings (2);
153 time_table.set_row_spacings (5);
154 time_table.set_border_width (5);
156 start_alignment.set (1.0, 0.5);
157 end_alignment.set (1.0, 0.5);
158 length_alignment.set (1.0, 0.5);
160 start_alignment.add (start_label);
161 end_alignment.add (end_label);
162 length_alignment.add (length_label);
164 time_table.attach (start_alignment, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
165 time_table.attach (start_clock, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
167 time_table.attach (end_alignment, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
168 time_table.attach (end_clock, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
170 time_table.attach (length_alignment, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL);
171 time_table.attach (length_clock, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL);
173 envelope_label.set_name ("AudioRegionEditorLabel");
175 envelope_loop_table.set_border_width (5);
176 envelope_loop_table.set_row_spacings (2);
177 envelope_loop_table.attach (envelope_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
178 envelope_loop_table.attach (envelope_active_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
179 envelope_loop_table.attach (envelope_view_button, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
183 fade_in_table.set_border_width (5);
184 fade_in_table.set_homogeneous (false);
186 fade_in_label.set_name ("AudioRegionEditorLabel");
187 fade_in_active_button_label.set_name ("AudioRegionEditorSmallLabel");
188 fade_in_length_label.set_name ("AudioRegionEditorSmallLabel");
190 fade_in_label.set_text (_("FADE IN"));
191 fade_in_active_button_label.set_text (_("active"));
192 fade_in_length_label.set_text (_("msecs"));
194 fade_in_active_button.add (fade_in_active_button_label);
196 fade_in_length_spinner.set_name("GenericSpinner");
198 fade_in_length_spinner.set_digits (3);
200 // fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
202 Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
204 fade_in_label_align.add (fade_in_label);
205 fade_in_label_align.set (0.5);
208 fade_in_table.attach (fade_in_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
210 fade_in_table.attach (fade_in_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
211 fade_in_table.attach (fade_in_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
213 fade_in_table.attach (fade_in_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
217 fade_out_table.set_border_width (5);
218 fade_out_table.set_homogeneous (false);
220 fade_out_label.set_name ("AudioRegionEditorLabel");
221 fade_out_active_button_label.set_name ("AudioRegionEditorSmallLabel");
222 fade_out_length_label.set_name ("AudioRegionEditorSmallLabel");
224 fade_out_label.set_text (_("FADE OUT"));
225 fade_out_active_button_label.set_text (_("active"));
226 fade_out_length_label.set_text (_("msecs"));
228 fade_out_active_button.add (fade_out_active_button_label);
230 fade_out_length_spinner.set_name("GenericSpinner");
232 fade_out_length_spinner.set_digits (3);
234 fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
236 Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
238 fade_out_label_align.add (fade_out_label);
239 fade_out_label_align.set (0.5);
241 fade_out_table.attach (fade_out_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
243 fade_out_table.attach (fade_out_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
244 fade_out_table.attach (fade_out_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
246 fade_out_table.attach (fade_out_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
248 lower_hbox.pack_start (time_table, true, true);
249 lower_hbox.pack_start (sep1, false, false);
250 lower_hbox.pack_start (envelope_loop_table, true, true);
251 lower_hbox.pack_start (sep2, false, false);
252 lower_hbox.pack_start (fade_in_table, true, true);
253 lower_hbox.pack_start (fade_out_table, true, true);
255 get_vbox()->pack_start (top_row_hbox, true, true);
256 get_vbox()->pack_start (sep3, false, false);
257 get_vbox()->pack_start (lower_hbox, true, true);
259 set_name ("AudioRegionEditorWindow");
260 add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
262 signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (this)));
264 string title = _("ardour: region ");
265 title += _region.name();
271 bounds_changed (Change (StartChanged|LengthChanged|PositionChanged));
272 envelope_active_changed ();
280 XMLNode *node = _region.extra_xml ("GUI");
281 XMLProperty *prop = 0;
282 bool showing_envelope = false;
284 if (node && (prop = node->property ("envelope-visible")) != 0) {
285 if (prop->value() == "yes") {
286 showing_envelope = true;
290 if (showing_envelope) {
291 envelope_view_button.set_active (true);
293 envelope_view_button.set_active (false);
296 _region.StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
298 spin_arrow_grab = false;
300 connect_editor_events ();
303 AudioRegionEditor::~AudioRegionEditor ()
308 AudioRegionEditor::region_changed (Change what_changed)
310 if (what_changed & NameChanged) {
313 if (what_changed & BoundsChanged) {
314 bounds_changed (what_changed);
317 if (what_changed & Region::OpacityChanged) {
320 if (what_changed & Region::MuteChanged) {
323 if (what_changed & Region::LockChanged) {
326 if (what_changed & Region::LayerChanged) {
330 if (what_changed & AudioRegion::EnvelopeActiveChanged) {
331 envelope_active_changed ();
333 if (what_changed & AudioRegion::FadeInChanged) {
336 if (what_changed & AudioRegion::FadeOutChanged) {
339 if (what_changed & AudioRegion::FadeInActiveChanged) {
340 fade_in_active_changed ();
342 if (what_changed & AudioRegion::FadeOutActiveChanged) {
343 fade_out_active_changed ();
348 AudioRegionEditor::fade_in_realized ()
354 AudioRegionEditor::fade_out_realized ()
360 AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
362 switch (ev->button) {
366 if (ev->type == GDK_BUTTON_PRESS) { /* no double clicks here */
367 if (!spin_arrow_grab) {
368 // GTK2FIX probably nuke the region editor
369 // if ((ev->window == but->gobj()->panel)) {
370 // spin_arrow_grab = true;
383 AudioRegionEditor::breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
385 if (spin_arrow_grab) {
387 spin_arrow_grab = false;
393 AudioRegionEditor::start_editing_fade_in ()
399 AudioRegionEditor::stop_editing_fade_in ()
401 _region.thaw (_("fade in edit"));
405 AudioRegionEditor::start_editing_fade_out ()
411 AudioRegionEditor::stop_editing_fade_out ()
413 _region.thaw (_("fade out edit"));
417 AudioRegionEditor::connect_editor_events ()
419 name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
421 start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed));
422 end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed));
423 length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed));
425 fade_in_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner,
426 &AudioRegionEditor::start_editing_fade_in));
427 fade_in_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner,
428 &AudioRegionEditor::stop_editing_fade_in));
430 fade_out_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner,
431 &AudioRegionEditor::start_editing_fade_out));
432 fade_out_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner,
433 &AudioRegionEditor::stop_editing_fade_out));
435 fade_in_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed));
436 fade_out_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed));
438 fade_in_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled));
439 fade_out_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled));
441 envelope_active_button.signal_button_press_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press));
442 envelope_active_button.signal_button_release_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release));
443 audition_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled));
444 envelope_view_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled));
445 lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked));
446 mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked));
447 opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked));
448 raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked));
449 lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked));
450 _session.AuditionActive.connect (mem_fun(*this, &AudioRegionEditor::audition_state_changed));
454 AudioRegionEditor::start_clock_changed ()
456 _region.set_position (start_clock.current_time(), this);
460 AudioRegionEditor::end_clock_changed ()
462 _region.trim_end (end_clock.current_time(), this);
464 end_clock.set (_region.position() + _region.length(), true);
468 AudioRegionEditor::length_clock_changed ()
470 jack_nframes_t frames = length_clock.current_time();
471 _region.trim_end (_region.position() + frames, this);
473 length_clock.set (_region.length());
477 AudioRegionEditor::envelope_active_button_press(GdkEventButton *ev)
479 return stop_signal (envelope_active_button, "button_press_event");
483 AudioRegionEditor::envelope_active_button_release (GdkEventButton *ev)
485 _region.set_envelope_active (!_region.envelope_active());
486 return stop_signal (envelope_active_button, "button_release_event");
490 AudioRegionEditor::envelope_view_button_toggled ()
492 bool visible = envelope_view_button.get_active ();
494 _region_view.set_envelope_visible (visible);
498 AudioRegionEditor::audition_button_toggled ()
500 if (audition_button.get_active()) {
501 _session.audition_region (_region);
503 _session.cancel_audition ();
508 AudioRegionEditor::raise_button_clicked ()
514 AudioRegionEditor::lower_button_clicked ()
520 AudioRegionEditor::opaque_button_clicked ()
522 bool ractive = _region.opaque();
524 if (opaque_button.get_active() != ractive) {
525 _region.set_opaque (!ractive);
530 AudioRegionEditor::mute_button_clicked ()
532 bool ractive = _region.muted();
534 if (mute_button.get_active() != ractive) {
535 _region.set_muted (!ractive);
540 AudioRegionEditor::lock_button_clicked ()
542 bool ractive = _region.locked();
544 if (lock_button.get_active() != ractive) {
545 _region.set_locked (!ractive);
550 AudioRegionEditor::layer_changed ()
553 snprintf (buf, sizeof(buf), "%d", (int) _region.layer() + 1);
554 layer_value_label.set_text (buf);
558 AudioRegionEditor::name_changed ()
560 if (name_entry.get_text() != _region.name()) {
561 name_entry.set_text (_region.name());
566 AudioRegionEditor::lock_changed ()
570 if ((yn = _region.locked()) != lock_button.get_active()) {
571 lock_button.set_active (yn);
574 start_clock.set_sensitive (!yn);
575 end_clock.set_sensitive (!yn);
576 length_clock.set_sensitive (!yn);
580 AudioRegionEditor::envelope_active_changed ()
584 if ((yn = _region.envelope_active()) != envelope_active_button.get_active()) {
585 envelope_active_button.set_active (yn);
590 AudioRegionEditor::opacity_changed ()
593 if ((yn = _region.opaque()) != opaque_button.get_active()) {
594 opaque_button.set_active (yn);
599 AudioRegionEditor::mute_changed ()
602 if ((yn = _region.muted()) != mute_button.get_active()) {
603 mute_button.set_active (yn);
608 AudioRegionEditor::bounds_changed (Change what_changed)
610 if (what_changed & Change ((PositionChanged|LengthChanged))) {
611 start_clock.set (_region.position(), true);
612 end_clock.set (_region.position() + _region.length(), true);
613 length_clock.set (_region.length(), true);
618 AudioRegionEditor::activation ()
624 AudioRegionEditor::name_entry_changed ()
626 if (name_entry.get_text() != _region.name()) {
627 _region.set_name (name_entry.get_text());
632 AudioRegionEditor::fade_in_changed ()
634 float msecs = fade_in_length_adjustment.get_value();
635 jack_nframes_t sr = _session.frame_rate();
636 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
637 jack_nframes_t frames;
640 if (adj_frames != (frames = (jack_nframes_t) _region.fade_in().back()->when)) {
641 fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
644 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
645 fade_in_active_button.set_active (x);
650 AudioRegionEditor::fade_out_changed ()
652 float msecs = fade_out_length_adjustment.get_value();
653 jack_nframes_t sr = _session.frame_rate();
654 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
655 jack_nframes_t frames;
657 if (adj_frames != (frames = (jack_nframes_t) _region.fade_out().back()->when)) {
658 fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
661 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
662 fade_out_active_button.set_active (x);
667 AudioRegionEditor::fade_in_length_adjustment_changed ()
669 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
670 fade_length = max (fade_length, (jack_nframes_t) 64);
671 fade_length = min (fade_length, _region.length());
673 _region.set_fade_in_length (fade_length);
674 /* region is frozen, no worries */
679 AudioRegionEditor::fade_out_length_adjustment_changed ()
681 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
682 fade_length = max (fade_length, (jack_nframes_t) 64);
683 fade_length = min (fade_length, _region.length());
685 _region.set_fade_out_length (fade_length);
686 /* region is frozen, no worries */
691 AudioRegionEditor::fade_in_active_toggled ()
693 _region.set_fade_in_active (fade_in_active_button.get_active());
697 AudioRegionEditor::fade_out_active_toggled ()
699 _region.set_fade_out_active (fade_out_active_button.get_active());
703 AudioRegionEditor::fade_out_active_changed ()
707 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
708 fade_out_active_button.set_active (x);
713 AudioRegionEditor::fade_in_active_changed ()
717 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
718 fade_in_active_button.set_active (x);
723 AudioRegionEditor::audition_state_changed (bool yn)
725 ENSURE_GUI_THREAD (bind (mem_fun(*this, &AudioRegionEditor::audition_state_changed), yn));
728 audition_button.set_active (false);