2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2003 Paul Davis
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __gtk_ardour_crossfade_view_h__
|
|
|
|
#define __gtk_ardour_crossfade_view_h__
|
|
|
|
|
|
|
|
#include <vector>
|
2009-12-19 15:26:31 -05:00
|
|
|
#include "pbd/signals.h"
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/crossfade.h"
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
#include "time_axis_view_item.h"
|
|
|
|
|
2006-07-31 23:23:35 -04:00
|
|
|
class RouteTimeAxisView;
|
2005-09-25 14:42:24 -04:00
|
|
|
class AudioRegionView;
|
|
|
|
|
2013-04-04 00:32:52 -04:00
|
|
|
namespace ArdourCanvas {
|
|
|
|
class PolyLine;
|
|
|
|
}
|
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
class CrossfadeView : public TimeAxisViewItem
|
2005-09-25 14:42:24 -04:00
|
|
|
{
|
2010-10-17 19:35:38 -04:00
|
|
|
public:
|
2014-06-22 11:41:05 -04:00
|
|
|
CrossfadeView (ArdourCanvas::Container*,
|
2010-10-17 19:35:38 -04:00
|
|
|
RouteTimeAxisView&,
|
|
|
|
boost::shared_ptr<ARDOUR::Crossfade>,
|
2013-04-12 11:31:50 -04:00
|
|
|
double initial_samples_per_pixel,
|
2010-10-17 19:35:38 -04:00
|
|
|
Gdk::Color& basic_color,
|
|
|
|
AudioRegionView& leftview,
|
|
|
|
AudioRegionView& rightview);
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
~CrossfadeView ();
|
|
|
|
|
|
|
|
boost::shared_ptr<ARDOUR::Crossfade> crossfade; // ok, let 'em have it
|
|
|
|
|
|
|
|
AudioRegionView& left_view; // and these too
|
|
|
|
AudioRegionView& right_view;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2011-12-29 17:14:15 -05:00
|
|
|
void set_heights (double, double);
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
bool valid() const { return _valid; }
|
|
|
|
bool visible() const { return _visible; }
|
|
|
|
void set_valid (bool yn);
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
static PBD::Signal1<void,CrossfadeView*> CatchDeletion;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
void fake_hide ();
|
|
|
|
void hide ();
|
|
|
|
void show ();
|
|
|
|
void horizontal_position_changed ();
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
protected:
|
|
|
|
void reset_width_dependent_items (double pixel_width);
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
private:
|
|
|
|
bool _valid;
|
|
|
|
bool _visible;
|
2011-06-01 13:00:29 -04:00
|
|
|
bool _all_in_view;
|
2011-12-29 17:14:15 -05:00
|
|
|
double _child_height;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2013-04-04 00:32:52 -04:00
|
|
|
ArdourCanvas::PolyLine *fade_in;
|
|
|
|
ArdourCanvas::PolyLine *fade_out;
|
2011-06-01 13:00:29 -04:00
|
|
|
|
2010-10-17 19:35:38 -04:00
|
|
|
void crossfade_changed (const PBD::PropertyChange&);
|
|
|
|
void crossfade_fades_changed ();
|
|
|
|
void active_changed ();
|
|
|
|
void redraw_curves ();
|
|
|
|
void color_handler ();
|
2005-09-25 14:42:24 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __gtk_ardour_crossfade_view_h__ */
|