ardour
crossfade_view.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2003 Paul Davis
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #ifndef __gtk_ardour_crossfade_view_h__
21 #define __gtk_ardour_crossfade_view_h__
22 
23 #include <vector>
24 #include "pbd/signals.h"
25 #include "ardour/crossfade.h"
26 
27 #include "time_axis_view_item.h"
28 
29 class RouteTimeAxisView;
30 class AudioRegionView;
31 
32 namespace ArdourCanvas {
33  class PolyLine;
34 }
35 
37 {
38 public:
39  CrossfadeView (ArdourCanvas::Container*,
42  double initial_samples_per_pixel,
43  Gdk::Color& basic_color,
44  AudioRegionView& leftview,
45  AudioRegionView& rightview);
46 
47  ~CrossfadeView ();
48 
50 
51  AudioRegionView& left_view; // and these too
53 
54  void set_heights (double, double);
55 
56  bool valid() const { return _valid; }
57  bool visible() const { return _visible; }
58  void set_valid (bool yn);
59 
60  static PBD::Signal1<void,CrossfadeView*> CatchDeletion;
61 
62  void fake_hide ();
63  void hide ();
64  void show ();
66 
67 protected:
69 
70 private:
71  bool _valid;
72  bool _visible;
74  double _child_height;
75 
76  ArdourCanvas::PolyLine *fade_in;
77  ArdourCanvas::PolyLine *fade_out;
78 
81  void active_changed ();
82  void redraw_curves ();
83  void color_handler ();
84 };
85 
86 #endif /* __gtk_ardour_crossfade_view_h__ */
AudioRegionView & left_view
double _child_height
boost::shared_ptr< ARDOUR::Crossfade > crossfade
void horizontal_position_changed()
void crossfade_changed(const PBD::PropertyChange &)
void set_heights(double, double)
void color_handler()
ArdourCanvas::PolyLine * fade_out
void set_valid(bool yn)
void redraw_curves()
void fake_hide()
void reset_width_dependent_items(double pixel_width)
CrossfadeView(ArdourCanvas::Container *, RouteTimeAxisView &, boost::shared_ptr< ARDOUR::Crossfade >, double initial_samples_per_pixel, Gdk::Color &basic_color, AudioRegionView &leftview, AudioRegionView &rightview)
void crossfade_fades_changed()
AudioRegionView & right_view
ArdourCanvas::PolyLine * fade_in
bool visible() const
LIBGTKMM2EXT_API int pixel_width(const std::string &str, Pango::FontDescription &font)
bool valid() const
void active_changed()
static PBD::Signal1< void, CrossfadeView * > CatchDeletion