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;
40 AudioRegionEditor::AudioRegionEditor (Session&s, AudioRegion& r, AudioRegionView& rv)
41 : ArdourDialog ("audio region editor"),
45 name_label (_("NAME:")),
46 lock_button (_("lock")),
47 mute_button (_("mute")),
48 opaque_button (_("opaque")),
49 envelope_active_button(_("active")),
50 envelope_view_button(_("visible")),
51 raise_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT),
52 lower_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
53 layer_label (_("Layer")),
54 audition_button (_("play")),
56 start_clock ("AudioRegionEditorClock", true),
57 end_clock ("AudioRegionEditorClock", true),
58 length_clock ("AudioRegionEditorClock", true, true),
59 sync_offset_clock ("AudioRegionEditorClock", true, true),
60 envelope_loop_table (1, 3),
61 envelope_label (_("ENVELOPE")),
63 fade_in_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
64 fade_in_length_spinner (fade_in_length_adjustment, 10),
65 fade_out_table (4, 3),
66 fade_out_length_adjustment (5.0, 0.0, 10000, 0.05, 1),
67 fade_out_length_spinner (fade_out_length_adjustment, 10)
70 start_clock.set_session (&_session);
71 end_clock.set_session (&_session);
72 length_clock.set_session (&_session);
74 name_entry.set_name ("AudioRegionEditorEntry");
75 name_label.set_name ("AudioRegionEditorLabel");
77 name_hbox.set_spacing (5);
78 name_hbox.pack_start (name_label, false, false);
79 name_hbox.pack_start (name_entry, false, false);
81 raise_button.add (raise_arrow);
82 lower_button.add (lower_arrow);
83 layer_frame.set_name ("BaseFrame");
84 layer_frame.set_shadow_type (Gtk::SHADOW_IN);
85 layer_frame.add (layer_value_label);
86 layer_label.set_name ("AudioRegionEditorLabel");
87 layer_value_label.set_name ("AudioRegionEditorLabel");
88 Gtkmm2ext::set_size_request_to_display_given_text (layer_value_label, "99", 5, 2);
90 layer_hbox.set_spacing (5);
91 layer_hbox.pack_start (layer_label, false, false);
92 layer_hbox.pack_start (layer_frame, false, false);
94 layer_hbox.pack_start (raise_button, false, false);
95 layer_hbox.pack_start (lower_button, false, false);
98 mute_button.set_name ("AudioRegionEditorToggleButton");
99 opaque_button.set_name ("AudioRegionEditorToggleButton");
100 lock_button.set_name ("AudioRegionEditorToggleButton");
101 envelope_active_button.set_name ("AudioRegionEditorToggleButton");
102 envelope_view_button.set_name ("AudioRegionEditorToggleButton");
103 fade_in_active_button.set_name ("AudioRegionEditorToggleButton");
104 fade_out_active_button.set_name ("AudioRegionEditorToggleButton");
105 audition_button.set_name ("AudioRegionEditorToggleButton");
107 ARDOUR_UI::instance()->tooltips().set_tip (mute_button, _("mute this region"));
108 ARDOUR_UI::instance()->tooltips().set_tip (opaque_button, _("regions underneath this one cannot be heard"));
109 ARDOUR_UI::instance()->tooltips().set_tip (lock_button, _("prevent any changes to this region"));
110 ARDOUR_UI::instance()->tooltips().set_tip (envelope_active_button, _("use the gain envelope during playback"));
111 ARDOUR_UI::instance()->tooltips().set_tip (envelope_view_button, _("show the gain envelope"));
112 ARDOUR_UI::instance()->tooltips().set_tip (fade_in_active_button, _("use fade in curve during playback"));
113 ARDOUR_UI::instance()->tooltips().set_tip (fade_out_active_button, _("use fade out curve during playback"));
114 ARDOUR_UI::instance()->tooltips().set_tip (audition_button, _("audition this region"));
116 mute_button.unset_flags (Gtk::CAN_FOCUS);
117 opaque_button.unset_flags (Gtk::CAN_FOCUS);
118 lock_button.unset_flags (Gtk::CAN_FOCUS);
119 envelope_active_button.unset_flags (Gtk::CAN_FOCUS);
120 envelope_view_button.unset_flags (Gtk::CAN_FOCUS);
121 fade_in_active_button.unset_flags (Gtk::CAN_FOCUS);
122 fade_out_active_button.unset_flags (Gtk::CAN_FOCUS);
123 audition_button.unset_flags (Gtk::CAN_FOCUS);
125 mute_button.set_events (mute_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
126 opaque_button.set_events (opaque_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
127 lock_button.set_events (lock_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
128 envelope_active_button.set_events (envelope_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
129 envelope_view_button.set_events (envelope_view_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
130 fade_in_active_button.set_events (fade_in_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
131 fade_out_active_button.set_events (fade_out_active_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
132 audition_button.set_events (audition_button.get_events() & ~(Gdk::ENTER_NOTIFY_MASK|Gdk::LEAVE_NOTIFY_MASK));
134 top_row_button_hbox.set_border_width (5);
135 top_row_button_hbox.set_spacing (5);
136 top_row_button_hbox.set_homogeneous (false);
137 top_row_button_hbox.pack_start (mute_button, false, false);
138 top_row_button_hbox.pack_start (opaque_button, false, false);
139 top_row_button_hbox.pack_start (lock_button, false, false);
140 top_row_button_hbox.pack_start (layer_hbox, false, false, 5);
141 top_row_button_hbox.pack_end (audition_button, false, false);
143 top_row_hbox.pack_start (name_hbox, true, true);
144 top_row_hbox.pack_end (top_row_button_hbox, true, true);
146 start_label.set_name ("AudioRegionEditorLabel");
147 start_label.set_text (_("START:"));
148 end_label.set_name ("AudioRegionEditorLabel");
149 end_label.set_text (_("END:"));
150 length_label.set_name ("AudioRegionEditorLabel");
151 length_label.set_text (_("LENGTH:"));
153 time_table.set_col_spacings (2);
154 time_table.set_row_spacings (5);
155 time_table.set_border_width (5);
157 start_alignment.set (1.0, 0.5);
158 end_alignment.set (1.0, 0.5);
159 length_alignment.set (1.0, 0.5);
161 start_alignment.add (start_label);
162 end_alignment.add (end_label);
163 length_alignment.add (length_label);
165 time_table.attach (start_alignment, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
166 time_table.attach (start_clock, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL);
168 time_table.attach (end_alignment, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL);
169 time_table.attach (end_clock, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL);
171 time_table.attach (length_alignment, 0, 1, 2, 3, Gtk::FILL, Gtk::FILL);
172 time_table.attach (length_clock, 1, 2, 2, 3, Gtk::FILL, Gtk::FILL);
174 envelope_label.set_name ("AudioRegionEditorLabel");
176 envelope_loop_table.set_border_width (5);
177 envelope_loop_table.set_row_spacings (2);
178 envelope_loop_table.attach (envelope_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL);
179 envelope_loop_table.attach (envelope_active_button, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
180 envelope_loop_table.attach (envelope_view_button, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
184 fade_in_table.set_border_width (5);
185 fade_in_table.set_homogeneous (false);
187 fade_in_label.set_name ("AudioRegionEditorLabel");
188 fade_in_active_button_label.set_name ("AudioRegionEditorSmallLabel");
189 fade_in_length_label.set_name ("AudioRegionEditorSmallLabel");
191 fade_in_label.set_text (_("FADE IN"));
192 fade_in_active_button_label.set_text (_("active"));
193 fade_in_length_label.set_text (_("msecs"));
195 fade_in_active_button.add (fade_in_active_button_label);
197 fade_in_length_spinner.set_name("GenericSpinner");
199 fade_in_length_spinner.set_digits (3);
201 // fade_in_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
203 Gtkmm2ext::set_size_request_to_display_given_text (fade_in_length_spinner, "500g", 20, -1);
205 fade_in_label_align.add (fade_in_label);
206 fade_in_label_align.set (0.5);
209 fade_in_table.attach (fade_in_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
211 fade_in_table.attach (fade_in_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
212 fade_in_table.attach (fade_in_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
214 fade_in_table.attach (fade_in_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
218 fade_out_table.set_border_width (5);
219 fade_out_table.set_homogeneous (false);
221 fade_out_label.set_name ("AudioRegionEditorLabel");
222 fade_out_active_button_label.set_name ("AudioRegionEditorSmallLabel");
223 fade_out_length_label.set_name ("AudioRegionEditorSmallLabel");
225 fade_out_label.set_text (_("FADE OUT"));
226 fade_out_active_button_label.set_text (_("active"));
227 fade_out_length_label.set_text (_("msecs"));
229 fade_out_active_button.add (fade_out_active_button_label);
231 fade_out_length_spinner.set_name("GenericSpinner");
233 fade_out_length_spinner.set_digits (3);
235 fade_out_length_spinner.signal_activate().connect (mem_fun(*this, &AudioRegionEditor::activation));
237 Gtkmm2ext::set_size_request_to_display_given_text (fade_out_length_spinner, "500g", 20, -1);
239 fade_out_label_align.add (fade_out_label);
240 fade_out_label_align.set (0.5);
242 fade_out_table.attach (fade_out_label_align, 0, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
244 fade_out_table.attach (fade_out_length_label, 0, 1, 1, 2, Gtk::EXPAND, Gtk::FILL);
245 fade_out_table.attach (fade_out_length_spinner, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
247 fade_out_table.attach (fade_out_active_button, 0, 2, 3, 5, Gtk::FILL|Gtk::EXPAND, Gtk::FILL);
249 lower_hbox.pack_start (time_table, true, true);
250 lower_hbox.pack_start (sep1, false, false);
251 lower_hbox.pack_start (envelope_loop_table, true, true);
252 lower_hbox.pack_start (sep2, false, false);
253 lower_hbox.pack_start (fade_in_table, true, true);
254 lower_hbox.pack_start (fade_out_table, true, true);
256 get_vbox()->pack_start (top_row_hbox, true, true);
257 get_vbox()->pack_start (sep3, false, false);
258 get_vbox()->pack_start (lower_hbox, true, true);
260 set_name ("AudioRegionEditorWindow");
261 add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
263 signal_delete_event().connect (bind (sigc::ptr_fun (just_hide_it), static_cast<Window *> (this)));
265 string title = _("ardour: region ");
266 title += _region.name();
272 bounds_changed (Change (StartChanged|LengthChanged|PositionChanged));
273 envelope_active_changed ();
281 XMLNode *node = _region.extra_xml ("GUI");
282 XMLProperty *prop = 0;
283 bool showing_envelope = false;
285 if (node && (prop = node->property ("envelope-visible")) != 0) {
286 if (prop->value() == "yes") {
287 showing_envelope = true;
291 if (showing_envelope) {
292 envelope_view_button.set_active (true);
294 envelope_view_button.set_active (false);
297 _region.StateChanged.connect (mem_fun(*this, &AudioRegionEditor::region_changed));
299 spin_arrow_grab = false;
301 connect_editor_events ();
304 AudioRegionEditor::~AudioRegionEditor ()
309 AudioRegionEditor::region_changed (Change what_changed)
311 if (what_changed & NameChanged) {
314 if (what_changed & BoundsChanged) {
315 bounds_changed (what_changed);
318 if (what_changed & Region::OpacityChanged) {
321 if (what_changed & Region::MuteChanged) {
324 if (what_changed & Region::LockChanged) {
327 if (what_changed & Region::LayerChanged) {
331 if (what_changed & AudioRegion::EnvelopeActiveChanged) {
332 envelope_active_changed ();
334 if (what_changed & AudioRegion::FadeInChanged) {
337 if (what_changed & AudioRegion::FadeOutChanged) {
340 if (what_changed & AudioRegion::FadeInActiveChanged) {
341 fade_in_active_changed ();
343 if (what_changed & AudioRegion::FadeOutActiveChanged) {
344 fade_out_active_changed ();
349 AudioRegionEditor::fade_in_realized ()
355 AudioRegionEditor::fade_out_realized ()
361 AudioRegionEditor::bpressed (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
363 switch (ev->button) {
367 if (ev->type == GDK_BUTTON_PRESS) { /* no double clicks here */
368 if (!spin_arrow_grab) {
369 // GTK2FIX probably nuke the region editor
370 // if ((ev->window == but->gobj()->panel)) {
371 // spin_arrow_grab = true;
384 AudioRegionEditor::breleased (GdkEventButton* ev, Gtk::SpinButton* but, void (AudioRegionEditor::*pmf)())
386 if (spin_arrow_grab) {
388 spin_arrow_grab = false;
394 AudioRegionEditor::start_editing_fade_in ()
400 AudioRegionEditor::stop_editing_fade_in ()
402 _region.thaw (_("fade in edit"));
406 AudioRegionEditor::start_editing_fade_out ()
412 AudioRegionEditor::stop_editing_fade_out ()
414 _region.thaw (_("fade out edit"));
418 AudioRegionEditor::connect_editor_events ()
420 name_entry.signal_changed().connect (mem_fun(*this, &AudioRegionEditor::name_entry_changed));
422 start_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::start_clock_changed));
423 end_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::end_clock_changed));
424 length_clock.ValueChanged.connect (mem_fun(*this, &AudioRegionEditor::length_clock_changed));
426 fade_in_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_in_length_spinner,
427 &AudioRegionEditor::start_editing_fade_in));
428 fade_in_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_in_length_spinner,
429 &AudioRegionEditor::stop_editing_fade_in));
431 fade_out_length_spinner.signal_button_press_event().connect (bind (mem_fun(*this, &AudioRegionEditor::bpressed), &fade_out_length_spinner,
432 &AudioRegionEditor::start_editing_fade_out));
433 fade_out_length_spinner.signal_button_release_event().connect (bind (mem_fun (*this, &AudioRegionEditor::breleased), &fade_out_length_spinner,
434 &AudioRegionEditor::stop_editing_fade_out));
436 fade_in_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_in_length_adjustment_changed));
437 fade_out_length_adjustment.signal_value_changed().connect (mem_fun(*this, &AudioRegionEditor::fade_out_length_adjustment_changed));
439 fade_in_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_in_active_toggled));
440 fade_out_active_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::fade_out_active_toggled));
442 envelope_active_button.signal_button_press_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_press));
443 envelope_active_button.signal_button_release_event().connect (mem_fun(*this, &AudioRegionEditor::envelope_active_button_release));
444 audition_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::audition_button_toggled));
445 envelope_view_button.signal_toggled().connect (mem_fun(*this, &AudioRegionEditor::envelope_view_button_toggled));
446 lock_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lock_button_clicked));
447 mute_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::mute_button_clicked));
448 opaque_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::opaque_button_clicked));
449 raise_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::raise_button_clicked));
450 lower_button.signal_clicked().connect (mem_fun(*this, &AudioRegionEditor::lower_button_clicked));
451 _session.AuditionActive.connect (mem_fun(*this, &AudioRegionEditor::audition_state_changed));
455 AudioRegionEditor::start_clock_changed ()
457 _region.set_position (start_clock.current_time(), this);
461 AudioRegionEditor::end_clock_changed ()
463 _region.trim_end (end_clock.current_time(), this);
465 end_clock.set (_region.position() + _region.length(), true);
469 AudioRegionEditor::length_clock_changed ()
471 jack_nframes_t frames = length_clock.current_time();
472 _region.trim_end (_region.position() + frames, this);
474 length_clock.set (_region.length());
478 AudioRegionEditor::envelope_active_button_press(GdkEventButton *ev)
480 return stop_signal (envelope_active_button, "button_press_event");
484 AudioRegionEditor::envelope_active_button_release (GdkEventButton *ev)
486 _region.set_envelope_active (!_region.envelope_active());
487 return stop_signal (envelope_active_button, "button_release_event");
491 AudioRegionEditor::envelope_view_button_toggled ()
493 bool visible = envelope_view_button.get_active ();
495 _region_view.set_envelope_visible (visible);
499 AudioRegionEditor::audition_button_toggled ()
501 if (audition_button.get_active()) {
502 _session.audition_region (_region);
504 _session.cancel_audition ();
509 AudioRegionEditor::raise_button_clicked ()
515 AudioRegionEditor::lower_button_clicked ()
521 AudioRegionEditor::opaque_button_clicked ()
523 bool ractive = _region.opaque();
525 if (opaque_button.get_active() != ractive) {
526 _region.set_opaque (!ractive);
531 AudioRegionEditor::mute_button_clicked ()
533 bool ractive = _region.muted();
535 if (mute_button.get_active() != ractive) {
536 _region.set_muted (!ractive);
541 AudioRegionEditor::lock_button_clicked ()
543 bool ractive = _region.locked();
545 if (lock_button.get_active() != ractive) {
546 _region.set_locked (!ractive);
551 AudioRegionEditor::layer_changed ()
554 snprintf (buf, sizeof(buf), "%d", (int) _region.layer() + 1);
555 layer_value_label.set_text (buf);
559 AudioRegionEditor::name_changed ()
561 if (name_entry.get_text() != _region.name()) {
562 name_entry.set_text (_region.name());
567 AudioRegionEditor::lock_changed ()
571 if ((yn = _region.locked()) != lock_button.get_active()) {
572 lock_button.set_active (yn);
575 start_clock.set_sensitive (!yn);
576 end_clock.set_sensitive (!yn);
577 length_clock.set_sensitive (!yn);
581 AudioRegionEditor::envelope_active_changed ()
585 if ((yn = _region.envelope_active()) != envelope_active_button.get_active()) {
586 envelope_active_button.set_active (yn);
591 AudioRegionEditor::opacity_changed ()
594 if ((yn = _region.opaque()) != opaque_button.get_active()) {
595 opaque_button.set_active (yn);
600 AudioRegionEditor::mute_changed ()
603 if ((yn = _region.muted()) != mute_button.get_active()) {
604 mute_button.set_active (yn);
609 AudioRegionEditor::bounds_changed (Change what_changed)
611 if (what_changed & Change ((PositionChanged|LengthChanged))) {
612 start_clock.set (_region.position(), true);
613 end_clock.set (_region.position() + _region.length(), true);
614 length_clock.set (_region.length(), true);
619 AudioRegionEditor::activation ()
625 AudioRegionEditor::name_entry_changed ()
627 if (name_entry.get_text() != _region.name()) {
628 _region.set_name (name_entry.get_text());
633 AudioRegionEditor::fade_in_changed ()
635 float msecs = fade_in_length_adjustment.get_value();
636 jack_nframes_t sr = _session.frame_rate();
637 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
638 jack_nframes_t frames;
641 if (adj_frames != (frames = (jack_nframes_t) _region.fade_in().back()->when)) {
642 fade_in_length_adjustment.set_value ((frames * 1000.0f) / sr);
645 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
646 fade_in_active_button.set_active (x);
651 AudioRegionEditor::fade_out_changed ()
653 float msecs = fade_out_length_adjustment.get_value();
654 jack_nframes_t sr = _session.frame_rate();
655 jack_nframes_t adj_frames = (jack_nframes_t) floor (msecs * (sr/1000.0f));
656 jack_nframes_t frames;
658 if (adj_frames != (frames = (jack_nframes_t) _region.fade_out().back()->when)) {
659 fade_out_length_adjustment.set_value ((frames * 1000.0f) / sr);
662 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
663 fade_out_active_button.set_active (x);
668 AudioRegionEditor::fade_in_length_adjustment_changed ()
670 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_in_length_adjustment.get_value() * _session.frame_rate() * 0.001);
671 fade_length = max (fade_length, (jack_nframes_t) 64);
672 fade_length = min (fade_length, _region.length());
674 _region.set_fade_in_length (fade_length);
675 /* region is frozen, no worries */
680 AudioRegionEditor::fade_out_length_adjustment_changed ()
682 jack_nframes_t fade_length = (jack_nframes_t) floor (fade_out_length_adjustment.get_value() * _session.frame_rate() * 0.001);
683 fade_length = max (fade_length, (jack_nframes_t) 64);
684 fade_length = min (fade_length, _region.length());
686 _region.set_fade_out_length (fade_length);
687 /* region is frozen, no worries */
692 AudioRegionEditor::fade_in_active_toggled ()
694 _region.set_fade_in_active (fade_in_active_button.get_active());
698 AudioRegionEditor::fade_out_active_toggled ()
700 _region.set_fade_out_active (fade_out_active_button.get_active());
704 AudioRegionEditor::fade_out_active_changed ()
708 if ((x = _region.fade_out_active()) != fade_out_active_button.get_active()) {
709 fade_out_active_button.set_active (x);
714 AudioRegionEditor::fade_in_active_changed ()
718 if ((x = _region.fade_in_active()) != fade_in_active_button.get_active()) {
719 fade_in_active_button.set_active (x);
724 AudioRegionEditor::audition_state_changed (bool yn)
726 ENSURE_GUI_THREAD (bind (mem_fun(*this, &AudioRegionEditor::audition_state_changed), yn));
729 audition_button.set_active (false);