#include <gtkmm/button.h>
#include <gtkmm/radiobutton.h>
+#include "canvas/canvas.h"
+
#include "evoral/Curve.hpp"
+#include "ardour/session_handle.h"
+
#include "ardour_dialog.h"
-#include "canvas.h"
namespace ARDOUR
{
class Crossfade;
}
+namespace ArdourCanvas {
+ class Rectangle;
+ class Line;
+ class Polygon;
+ class WaveView;
+}
+
class CrossfadeEditor : public ArdourDialog
{
public:
- CrossfadeEditor (ARDOUR::Session&, boost::shared_ptr<ARDOUR::Crossfade>, double miny, double maxy);
+ CrossfadeEditor (ARDOUR::Session*, boost::shared_ptr<ARDOUR::Crossfade>, double miny, double maxy);
~CrossfadeEditor ();
void apply ();
private:
boost::shared_ptr<ARDOUR::Crossfade> xfade;
- ARDOUR::Session& session;
Gtk::VBox vpacker;
struct Point {
~Point();
- ArdourCanvas::SimpleRect* box;
- ArdourCanvas::Line* curve;
+ ArdourCanvas::Rectangle* box;
+ ArdourCanvas::PolyLine* curve;
double x;
double y;
}
};
- ArdourCanvas::SimpleRect* toplevel;
- ArdourCanvas::Canvas* canvas;
+ ArdourCanvas::Rectangle* toplevel;
+ ArdourCanvas::GtkCanvas* canvas;
struct Half {
- ArdourCanvas::Line* line;
+ ArdourCanvas::PolyLine* line;
ArdourCanvas::Polygon* shading;
std::list<Point*> points;
ARDOUR::AutomationList normative_curve; /* 0 - 1.0, linear */
void set (const ARDOUR::AutomationList& alist, WhichFade);
- sigc::connection peaks_ready_connection;
+ PBD::ScopedConnection* _peaks_ready_connection;
+ PBD::ScopedConnection state_connection;
void make_waves (boost::shared_ptr<ARDOUR::AudioRegion>, WhichFade);
- void peaks_ready (boost::shared_ptr<ARDOUR::AudioRegion> r, WhichFade);
+ void peaks_ready (boost::weak_ptr<ARDOUR::AudioRegion> r, WhichFade);
void _apply_to (boost::shared_ptr<ARDOUR::Crossfade> xf);
void setup (boost::shared_ptr<ARDOUR::Crossfade>);
void audition_right_dry ();
void audition_right ();
- void xfade_changed (ARDOUR::Change);
+ void xfade_changed (const PBD::PropertyChange&);
void dump ();
};