2 * Copyright (C) 2005-2014 Paul Davis <paul@linuxaudiosystems.com>
3 * Copyright (C) 2005 Nick Mainsbridge <mainsbridge@gmail.com>
4 * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
5 * Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
6 * Copyright (C) 2007-2011 Carl Hetherington <carl@carlh.net>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __gtk_ardour_crossfade_view_h__
24 #define __gtk_ardour_crossfade_view_h__
27 #include "pbd/signals.h"
28 #include "ardour/crossfade.h"
30 #include "time_axis_view_item.h"
32 class RouteTimeAxisView;
33 class AudioRegionView;
35 namespace ArdourCanvas {
39 class CrossfadeView : public TimeAxisViewItem
42 CrossfadeView (ArdourCanvas::Container*,
44 boost::shared_ptr<ARDOUR::Crossfade>,
45 double initial_samples_per_pixel,
46 Gdk::Color& basic_color,
47 AudioRegionView& leftview,
48 AudioRegionView& rightview);
52 boost::shared_ptr<ARDOUR::Crossfade> crossfade; // ok, let 'em have it
54 AudioRegionView& left_view; // and these too
55 AudioRegionView& right_view;
57 void set_heights (double, double);
59 bool valid() const { return _valid; }
60 bool visible() const { return _visible; }
61 void set_valid (bool yn);
63 static PBD::Signal1<void,CrossfadeView*> CatchDeletion;
68 void horizontal_position_changed ();
71 void reset_width_dependent_items (double pixel_width);
79 ArdourCanvas::PolyLine *fade_in;
80 ArdourCanvas::PolyLine *fade_out;
82 void crossfade_changed (const PBD::PropertyChange&);
83 void crossfade_fades_changed ();
84 void active_changed ();
85 void redraw_curves ();
86 void color_handler ();
89 #endif /* __gtk_ardour_crossfade_view_h__ */