2 Copyright (C) 2003 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 #ifndef __gtk_ardour_crossfade_view_h__
22 #define __gtk_ardour_crossfade_view_h__
26 #include <gtk-canvas.h>
27 #include <sigc++/signal_system.h>
28 #include <ardour/crossfade.h>
30 #include "time_axis_view_item.h"
32 class AudioTimeAxisView;
33 class AudioRegionView;
35 struct CrossfadeView : public TimeAxisViewItem
37 CrossfadeView (GtkCanvasGroup*,
40 double initial_samples_per_unit,
41 GdkColor& basic_color,
42 AudioRegionView& leftview,
43 AudioRegionView& rightview);
46 ARDOUR::Crossfade& crossfade; // ok, let 'em have it
47 AudioRegionView& left_view; // and these too
48 AudioRegionView& right_view;
50 std::string get_item_name();
51 void set_height (double);
53 bool valid() const { return _valid; }
54 bool visible() const { return _visible; }
55 void set_valid (bool yn);
57 static SigC::Signal1<void,CrossfadeView*> GoingAway;
59 AudioRegionView& upper_regionview () const;
66 void reset_width_dependent_items (double pixel_width);
74 GtkCanvasItem *overlap_rect;
75 GtkCanvasItem *fade_in;
76 GtkCanvasItem *fade_out;
77 GtkCanvasItem *active_button;
79 void crossfade_changed (ARDOUR::Change);
80 void active_changed ();
81 void redraw_curves ();
84 #endif /* __gtk_ardour_crossfade_view_h__ */