Gnome::Canvas -> ArdourCanvas and some other small fixes

git-svn-id: svn://localhost/trunk/ardour2@107 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Nick Mainsbridge 2005-11-23 17:21:12 +00:00
parent fb45ffea71
commit 54a8032106
47 changed files with 300 additions and 296 deletions

View file

@ -32,7 +32,7 @@
using namespace std; using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, Gnome::Canvas::Group& parent, Curve& c) AutomationGainLine::AutomationGainLine (string name, Session& s, TimeAxisView& tv, ArdourCanvas::Group& parent, Curve& c)
: AutomationLine (name, tv, parent, c), : AutomationLine (name, tv, parent, c),
session (s) session (s)

View file

@ -217,7 +217,7 @@ ControlPoint::move_to (double x, double y, ShapeType shape)
/*****/ /*****/
AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Group& parent, AutomationList& al) AutomationLine::AutomationLine (string name, TimeAxisView& tv, ArdourCanvas::Group& parent, AutomationList& al)
: trackview (tv), : trackview (tv),
_name (name), _name (name),
alist (al), alist (al),
@ -231,11 +231,11 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Gr
terminal_points_can_slide = true; terminal_points_can_slide = true;
_height = 0; _height = 0;
group = new Gnome::Canvas::Group (parent); group = new ArdourCanvas::Group (parent);
group->set_property ("x", 0.0); group->set_property ("x", 0.0);
group->set_property ("y", 0.0); group->set_property ("y", 0.0);
line = new Gnome::Canvas::Line (*group); line = new ArdourCanvas::Line (*group);
line->set_property ("width_pixels", (guint)1); line->set_property ("width_pixels", (guint)1);
line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler)); line->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler));

View file

@ -27,9 +27,10 @@
#include <sys/types.h> #include <sys/types.h>
#include <gtkmm.h> #include <gtkmm.h>
#include <libgnomecanvasmm/libgnomecanvasmm.h> #include <libgnomecanvasmm/line.h>
#include <sigc++/signal.h> #include <sigc++/signal.h>
#include "canvas.h"
#include "simplerect.h"
#include <pbd/undo.h> #include <pbd/undo.h>
#include <ardour/automation_event.h> #include <ardour/automation_event.h>
@ -77,7 +78,7 @@ class ControlPoint
void set_size (double); void set_size (double);
void set_visible (bool); void set_visible (bool);
Gnome::Canvas::SimpleRect* item; ArdourCanvas::SimpleRect* item;
AutomationLine& line; AutomationLine& line;
uint32_t view_index; uint32_t view_index;
ARDOUR::AutomationList::iterator model; ARDOUR::AutomationList::iterator model;
@ -97,7 +98,7 @@ class ControlPoint
class AutomationLine : public sigc::trackable class AutomationLine : public sigc::trackable
{ {
public: public:
AutomationLine (string name, TimeAxisView&, Gnome::Canvas::Group&, ARDOUR::AutomationList&); AutomationLine (string name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&);
virtual ~AutomationLine (); virtual ~AutomationLine ();
void queue_reset (); void queue_reset ();
@ -137,9 +138,9 @@ class AutomationLine : public sigc::trackable
TimeAxisView& trackview; TimeAxisView& trackview;
Gnome::Canvas::Group& canvas_group() const { return *group; } ArdourCanvas::Group& canvas_group() const { return *group; }
Gnome::Canvas::Item& parent_group() const { return _parent_group; } ArdourCanvas::Item& parent_group() const { return _parent_group; }
Gnome::Canvas::Item& grab_item() const { return *line; } ArdourCanvas::Item& grab_item() const { return *line; }
void show_selection(); void show_selection();
void hide_selection (); void hide_selection ();
@ -171,10 +172,10 @@ class AutomationLine : public sigc::trackable
bool no_draw : 1; bool no_draw : 1;
bool points_visible : 1; bool points_visible : 1;
Gnome::Canvas::Group& _parent_group; ArdourCanvas::Group& _parent_group;
Gnome::Canvas::Group* group; ArdourCanvas::Group* group;
Gnome::Canvas::Line* line; /* line */ ArdourCanvas::Line* line; /* line */
Gnome::Canvas::Points line_points; /* coordinates for canvas line */ ArdourCanvas::Points line_points; /* coordinates for canvas line */
vector<ControlPoint*> control_points; /* visible control points */ vector<ControlPoint*> control_points; /* visible control points */
struct ALPoint { struct ALPoint {

View file

@ -32,7 +32,7 @@
using namespace ARDOUR; using namespace ARDOUR;
AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, Gnome::Canvas::Group& parent, Curve& c) AutomationPanLine::AutomationPanLine (string name, Session& s, TimeAxisView& tv, ArdourCanvas::Group& parent, Curve& c)
: AutomationLine (name, tv, parent, c), : AutomationLine (name, tv, parent, c),
session (s) session (s)

View file

@ -16,7 +16,7 @@ class TimeAxisView;
class AutomationPanLine : public AutomationLine class AutomationPanLine : public AutomationLine
{ {
public: public:
AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, Gnome::Canvas::Group& parent, ARDOUR::Curve&); AutomationPanLine (string name, ARDOUR::Session&, TimeAxisView&, ArdourCanvas::Group& parent, ARDOUR::Curve&);
void view_to_model_y (double&); void view_to_model_y (double&);
void model_to_view_y (double&); void model_to_view_y (double&);

View file

@ -660,8 +660,8 @@ CrossfadeEditor::redraw ()
fade[current].normative_curve.get_vector (0, 1.0, vec, npoints); fade[current].normative_curve.get_vector (0, 1.0, vec, npoints);
Gnome::Canvas::Points pts; ArdourCanvas::Points pts;
Gnome::Canvas::Points spts; ArdourCanvas::Points spts;
while (pts.size() < npoints) { while (pts.size() < npoints) {
pts.push_back (Gnome::Art::Point (0,0)); pts.push_back (Gnome::Art::Point (0,0));
@ -729,7 +729,7 @@ CrossfadeEditor::redraw ()
fade[current].line->property_points() = pts; fade[current].line->property_points() = pts;
fade[current].shading->property_points() = spts; fade[current].shading->property_points() = spts;
for (vector<Gnome::Canvas::WaveView*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) { for (vector<ArdourCanvas::WaveView*>::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) {
(*i)->property_gain_src() = &fade[current].gain_curve; (*i)->property_gain_src() = &fade[current].gain_curve;
} }
} }

View file

@ -40,7 +40,7 @@ using namespace Canvas;
sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway; sigc::signal<void,CrossfadeView*> CrossfadeView::GoingAway;
CrossfadeView::CrossfadeView (Gnome::Canvas::Group *parent, CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent,
AudioTimeAxisView &tv, AudioTimeAxisView &tv,
Crossfade& xf, Crossfade& xf,
double spu, double spu,

View file

@ -34,7 +34,7 @@ class AudioRegionView;
struct CrossfadeView : public TimeAxisViewItem struct CrossfadeView : public TimeAxisViewItem
{ {
CrossfadeView (Gnome::Canvas::Group*, CrossfadeView (ArdourCanvas::Group*,
AudioTimeAxisView&, AudioTimeAxisView&,
ARDOUR::Crossfade&, ARDOUR::Crossfade&,
double initial_samples_per_unit, double initial_samples_per_unit,
@ -71,10 +71,10 @@ struct CrossfadeView : public TimeAxisViewItem
double spu; double spu;
Gnome::Canvas::Item *overlap_rect; ArdourCanvas::Item *overlap_rect;
Gnome::Canvas::Line *fade_in; ArdourCanvas::Line *fade_in;
Gnome::Canvas::Line *fade_out; ArdourCanvas::Line *fade_out;
Gnome::Canvas::Item *active_button; ArdourCanvas::Item *active_button;
void crossfade_changed (ARDOUR::Change); void crossfade_changed (ARDOUR::Change);
void active_changed (); void active_changed ();

View file

@ -798,7 +798,7 @@ Editor::left_track_canvas (GdkEventCrossing *ev)
void void
Editor::initialize_canvas () Editor::initialize_canvas ()
{ {
Gnome::Canvas::init (); ArdourCanvas::init ();
/* adjust sensitivity for "picking" items */ /* adjust sensitivity for "picking" items */
@ -825,7 +825,7 @@ Editor::initialize_canvas ()
Pango::FontDescription font = get_font_for_style (N_("VerboseCanvasCursor")); Pango::FontDescription font = get_font_for_style (N_("VerboseCanvasCursor"));
verbose_canvas_cursor = new Gnome::Canvas::Text (*track_canvas.root()); verbose_canvas_cursor = new ArdourCanvas::Text (*track_canvas.root());
verbose_canvas_cursor->set_property ("font_desc", font); verbose_canvas_cursor->set_property ("font_desc", font);
verbose_canvas_cursor->set_property ("anchor", GTK_ANCHOR_NW); verbose_canvas_cursor->set_property ("anchor", GTK_ANCHOR_NW);
verbose_canvas_cursor->set_property ("fill_color_rgba", color_map[cVerboseCanvasCursor]); verbose_canvas_cursor->set_property ("fill_color_rgba", color_map[cVerboseCanvasCursor]);
@ -834,45 +834,45 @@ Editor::initialize_canvas ()
/* a group to hold time (measure) lines */ /* a group to hold time (measure) lines */
time_line_group = new Gnome::Canvas::Group (*track_canvas.root(), 0.0, 0.0); time_line_group = new ArdourCanvas::Group (*track_canvas.root(), 0.0, 0.0);
cursor_group = new Gnome::Canvas::Group (*track_canvas.root(), 0.0, 0.0); cursor_group = new ArdourCanvas::Group (*track_canvas.root(), 0.0, 0.0);
time_canvas.set_name ("EditorTimeCanvas"); time_canvas.set_name ("EditorTimeCanvas");
time_canvas.add_events (Gdk::POINTER_MOTION_HINT_MASK); time_canvas.add_events (Gdk::POINTER_MOTION_HINT_MASK);
meter_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, 0.0); meter_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0);
tempo_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, 0.0); tempo_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0);
marker_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, timebar_height * 2.0); marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 2.0);
range_marker_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, timebar_height * 3.0); range_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 3.0);
transport_marker_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, timebar_height * 4.0); transport_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 4.0);
tempo_bar = new Gnome::Canvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); tempo_bar = new ArdourCanvas::SimpleRect (*tempo_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
tempo_bar->set_property ("fill_color_rgba", color_map[cTempoBar]); tempo_bar->set_property ("fill_color_rgba", color_map[cTempoBar]);
tempo_bar->set_property ("outline_pixels", 0); tempo_bar->set_property ("outline_pixels", 0);
meter_bar = new Gnome::Canvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); meter_bar = new ArdourCanvas::SimpleRect (*meter_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
meter_bar->set_property ("fill_color_rgba", color_map[cMeterBar]); meter_bar->set_property ("fill_color_rgba", color_map[cMeterBar]);
meter_bar->set_property ("outline_pixels",0); meter_bar->set_property ("outline_pixels",0);
marker_bar = new Gnome::Canvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); marker_bar = new ArdourCanvas::SimpleRect (*marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
marker_bar->set_property ("fill_color_rgba", color_map[cMarkerBar]); marker_bar->set_property ("fill_color_rgba", color_map[cMarkerBar]);
marker_bar->set_property ("outline_pixels", 0); marker_bar->set_property ("outline_pixels", 0);
range_marker_bar = new Gnome::Canvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); range_marker_bar = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
range_marker_bar->set_property ("fill_color_rgba", color_map[cRangeMarkerBar]); range_marker_bar->set_property ("fill_color_rgba", color_map[cRangeMarkerBar]);
range_marker_bar->set_property ("outline_pixels", 0); range_marker_bar->set_property ("outline_pixels", 0);
transport_marker_bar = new Gnome::Canvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); transport_marker_bar = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
transport_marker_bar->set_property ("fill_color_rgba", color_map[cTransportMarkerBar]); transport_marker_bar->set_property ("fill_color_rgba", color_map[cTransportMarkerBar]);
transport_marker_bar->set_property ("outline_pixels", 0); transport_marker_bar->set_property ("outline_pixels", 0);
range_bar_drag_rect = new Gnome::Canvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); range_bar_drag_rect = new ArdourCanvas::SimpleRect (*range_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
range_bar_drag_rect->set_property ("fill_color_rgba", color_map[cRangeDragBarRectFill]); range_bar_drag_rect->set_property ("fill_color_rgba", color_map[cRangeDragBarRectFill]);
range_bar_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragBarRect]); range_bar_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragBarRect]);
range_bar_drag_rect->set_property ("outline_pixels", 0); range_bar_drag_rect->set_property ("outline_pixels", 0);
range_bar_drag_rect->hide (); range_bar_drag_rect->hide ();
transport_bar_drag_rect = new Gnome::Canvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height); transport_bar_drag_rect = new ArdourCanvas::SimpleRect (*transport_marker_group, 0.0, 0.0, max_canvas_coordinate, timebar_height);
transport_bar_drag_rect ->set_property ("fill_color_rgba", color_map[cTransportDragRectFill]); transport_bar_drag_rect ->set_property ("fill_color_rgba", color_map[cTransportDragRectFill]);
transport_bar_drag_rect->set_property ("outline_color_rgba", color_map[cTransportDragRect]); transport_bar_drag_rect->set_property ("outline_color_rgba", color_map[cTransportDragRect]);
transport_bar_drag_rect->set_property ("outline_pixels", 0); transport_bar_drag_rect->set_property ("outline_pixels", 0);
@ -881,24 +881,24 @@ Editor::initialize_canvas ()
marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0)); marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0));
marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0)); marker_drag_line_points->push_back(Gnome::Art::Point(0.0, 0.0));
marker_drag_line = new Gnome::Canvas::Line (*track_canvas.root()); marker_drag_line = new ArdourCanvas::Line (*track_canvas.root());
marker_drag_line->set_property ("width_pixels", 1); marker_drag_line->set_property ("width_pixels", 1);
marker_drag_line->set_property("fill_color_rgba", color_map[cMarkerDragLine]); marker_drag_line->set_property("fill_color_rgba", color_map[cMarkerDragLine]);
marker_drag_line->set_property("points", marker_drag_line_points->gobj()); marker_drag_line->set_property("points", marker_drag_line_points->gobj());
marker_drag_line->hide(); marker_drag_line->hide();
range_marker_drag_rect = new Gnome::Canvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0); range_marker_drag_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
range_marker_drag_rect->set_property ("fill_color_rgba", color_map[cRangeDragRectFill]); range_marker_drag_rect->set_property ("fill_color_rgba", color_map[cRangeDragRectFill]);
range_marker_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragRect]); range_marker_drag_rect->set_property ("outline_color_rgba", color_map[cRangeDragRect]);
range_marker_drag_rect->hide (); range_marker_drag_rect->hide ();
transport_loop_range_rect = new Gnome::Canvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0); transport_loop_range_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
transport_loop_range_rect->set_property ("fill_color_rgba", color_map[cTransportLoopRectFill]); transport_loop_range_rect->set_property ("fill_color_rgba", color_map[cTransportLoopRectFill]);
transport_loop_range_rect->set_property ("outline_color_rgba", color_map[cTransportLoopRect]); transport_loop_range_rect->set_property ("outline_color_rgba", color_map[cTransportLoopRect]);
transport_loop_range_rect->set_property ("outline_pixels", 1); transport_loop_range_rect->set_property ("outline_pixels", 1);
transport_loop_range_rect->hide(); transport_loop_range_rect->hide();
transport_punch_range_rect = new Gnome::Canvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0); transport_punch_range_rect = new ArdourCanvas::SimpleRect (*time_line_group, 0.0, 0.0, 0.0, 0.0);
transport_punch_range_rect->set_property ("fill_color_rgba", color_map[cTransportPunchRectFill]); transport_punch_range_rect->set_property ("fill_color_rgba", color_map[cTransportPunchRectFill]);
transport_punch_range_rect->set_property ("outline_color_rgba", color_map[cTransportPunchRect]); transport_punch_range_rect->set_property ("outline_color_rgba", color_map[cTransportPunchRect]);
transport_punch_range_rect->set_property ("outline_pixels", 0); transport_punch_range_rect->set_property ("outline_pixels", 0);
@ -906,7 +906,7 @@ Editor::initialize_canvas ()
transport_loop_range_rect->lower_to_bottom (); // loop on the bottom transport_loop_range_rect->lower_to_bottom (); // loop on the bottom
transport_punchin_line = new Gnome::Canvas::Line (*time_line_group); transport_punchin_line = new ArdourCanvas::Line (*time_line_group);
transport_punchin_line->set_property ("x1", 0.0); transport_punchin_line->set_property ("x1", 0.0);
transport_punchin_line->set_property ("y1", 0.0); transport_punchin_line->set_property ("y1", 0.0);
transport_punchin_line->set_property ("x2", 0.0); transport_punchin_line->set_property ("x2", 0.0);
@ -916,7 +916,7 @@ Editor::initialize_canvas ()
transport_punchin_line->set_property ("outline_pixels", 1); transport_punchin_line->set_property ("outline_pixels", 1);
transport_punchin_line->hide (); transport_punchin_line->hide ();
transport_punchout_line = new Gnome::Canvas::Line (*time_line_group); transport_punchout_line = new ArdourCanvas::Line (*time_line_group);
transport_punchout_line->set_property ("x1", 0.0); transport_punchout_line->set_property ("x1", 0.0);
transport_punchout_line->set_property ("y1", 0.0); transport_punchout_line->set_property ("y1", 0.0);
transport_punchout_line->set_property ("x2", 0.0); transport_punchout_line->set_property ("x2", 0.0);
@ -926,7 +926,7 @@ Editor::initialize_canvas ()
transport_punchout_line->hide(); transport_punchout_line->hide();
// used to show zoom mode active zooming // used to show zoom mode active zooming
zoom_rect = new Gnome::Canvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0); zoom_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
zoom_rect->set_property ("fill_color_rgba", color_map[cZoomRectFill]); zoom_rect->set_property ("fill_color_rgba", color_map[cZoomRectFill]);
zoom_rect->set_property ("outline_color_rgba", color_map[cZoomRect]); zoom_rect->set_property ("outline_color_rgba", color_map[cZoomRect]);
zoom_rect->set_property ("outline_pixels", 1); zoom_rect->set_property ("outline_pixels", 1);
@ -935,7 +935,7 @@ Editor::initialize_canvas ()
zoom_rect->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_zoom_rect_event), (ArdourCanvas::Item*) 0)); zoom_rect->signal_event().connect (bind (mem_fun (*this, &Editor::canvas_zoom_rect_event), (ArdourCanvas::Item*) 0));
// used as rubberband rect // used as rubberband rect
rubberband_rect = new Gnome::Canvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0); rubberband_rect = new ArdourCanvas::SimpleRect (*track_canvas.root(), 0.0, 0.0, 0.0, 0.0);
rubberband_rect->set_property ("outline_color_rgba", color_map[cRubberBandRect]); rubberband_rect->set_property ("outline_color_rgba", color_map[cRubberBandRect]);
rubberband_rect->set_property ("fill_color_rgba", (guint32) color_map[cRubberBandRectFill]); rubberband_rect->set_property ("fill_color_rgba", (guint32) color_map[cRubberBandRectFill]);
rubberband_rect->set_property ("outline_pixels", 1); rubberband_rect->set_property ("outline_pixels", 1);
@ -952,29 +952,29 @@ Editor::initialize_canvas ()
tempo_line_points.push_back(Gnome::Art::Point(0, timebar_height)); tempo_line_points.push_back(Gnome::Art::Point(0, timebar_height));
tempo_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height)); tempo_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
tempo_line = new Gnome::Canvas::Line (*tempo_group, tempo_line_points); tempo_line = new ArdourCanvas::Line (*tempo_group, tempo_line_points);
tempo_line->set_property ("width_pixels", 0); tempo_line->set_property ("width_pixels", 0);
tempo_line->set_property ("fill_color", Gdk::Color ("#000000")); tempo_line->set_property ("fill_color", Gdk::Color ("#000000"));
meter_line_points.push_back(Gnome::Art::Point (0, timebar_height)); meter_line_points.push_back(Gnome::Art::Point (0, timebar_height));
meter_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height)); meter_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
meter_line = new Gnome::Canvas::Line (*meter_group, meter_line_points); meter_line = new ArdourCanvas::Line (*meter_group, meter_line_points);
meter_line->set_property ("width_pixels", 0); meter_line->set_property ("width_pixels", 0);
meter_line->set_property ("fill_color", Gdk::Color ("#000000")); meter_line->set_property ("fill_color", Gdk::Color ("#000000"));
marker_line_points.push_back(Gnome::Art::Point (0, timebar_height)); marker_line_points.push_back(Gnome::Art::Point (0, timebar_height));
marker_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height)); marker_line_points.push_back(Gnome::Art::Point(max_canvas_coordinate, timebar_height));
marker_line = new Gnome::Canvas::Line (*marker_group, marker_line_points); marker_line = new ArdourCanvas::Line (*marker_group, marker_line_points);
marker_line->set_property ("width_pixels", 0); marker_line->set_property ("width_pixels", 0);
marker_line->set_property ("fill_color", Gdk::Color ("#000000")); marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
range_marker_line = new Gnome::Canvas::Line (*range_marker_group, marker_line_points); range_marker_line = new ArdourCanvas::Line (*range_marker_group, marker_line_points);
range_marker_line->set_property ("width_pixels", 0); range_marker_line->set_property ("width_pixels", 0);
range_marker_line->set_property ("fill_color", Gdk::Color ("#000000")); range_marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
transport_marker_line = new Gnome::Canvas::Line (*transport_marker_group, marker_line_points); transport_marker_line = new ArdourCanvas::Line (*transport_marker_group, marker_line_points);
transport_marker_line->set_property ("width_pixels", 0); transport_marker_line->set_property ("width_pixels", 0);
transport_marker_line->set_property ("fill_color", Gdk::Color ("#000000")); transport_marker_line->set_property ("fill_color", Gdk::Color ("#000000"));
@ -1257,7 +1257,7 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc)
strcpy (txt, _(txt1)); strcpy (txt, _(txt1));
strcat (txt, _(txt2)); strcat (txt, _(txt2));
first_action_message = new Gnome::Canvas::Text (*track_canvas.root()); first_action_message = new ArdourCanvas::Text (*track_canvas.root());
first_action_message->set_property ("font_desc", font); first_action_message->set_property ("font_desc", font);
first_action_message->set_property ("fill_color_rgba", color_map[cFirstActionMessage]); first_action_message->set_property ("fill_color_rgba", color_map[cFirstActionMessage]);
first_action_message->set_property ("x", (gdouble) (canvas_width - pixel_width) / 2.0); first_action_message->set_property ("x", (gdouble) (canvas_width - pixel_width) / 2.0);
@ -1767,7 +1767,7 @@ Editor::build_cursors ()
} }
void void
Editor::popup_fade_context_menu (int button, int32_t time, Gnome::Canvas::Item* item, ItemType item_type) Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* item, ItemType item_type)
{ {
using namespace Menu_Helpers; using namespace Menu_Helpers;
AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview")); AudioRegionView* arv = static_cast<AudioRegionView*> (gtk_object_get_data (GTK_OBJECT(item), "regionview"));

View file

@ -4,7 +4,7 @@
#include "editor.h" #include "editor.h"
#include "editing.h" #include "editing.h"
#include "actions.h" #include "actions.h"
#include "ardour_ui.h"
#include "i18n.h" #include "i18n.h"
using namespace Gtk; using namespace Gtk;

View file

@ -119,7 +119,7 @@ Editor::add_imageframe_marker_time_axis(std::string track_name, TimeAxisView* ma
} }
void void
Editor::popup_imageframe_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_item) Editor::popup_imageframe_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_item)
{ {
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ; ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
@ -136,7 +136,7 @@ Editor::popup_imageframe_edit_menu(int button, int32_t time, Gnome::Canvas::Item
} }
void void
Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, Gnome::Canvas::Item* ifv, bool with_item) Editor::popup_marker_time_axis_edit_menu(int button, int32_t time, ArdourCanvas::Item* ifv, bool with_item)
{ {
MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ; MarkerTimeAxis* mta = dynamic_cast<MarkerTimeAxis*>(clicked_trackview) ;
@ -420,7 +420,7 @@ Editor::canvas_markerview_end_handle_event (GdkEvent* event, ArdourCanvas::Item*
/* <CMT Additions file="editor_mouse.cc"> */ /* <CMT Additions file="editor_mouse.cc"> */
void void
Editor::start_imageframe_grab(Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_imageframe_grab(ArdourCanvas::Item* item, GdkEvent* event)
{ {
ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ; ImageFrameView* ifv = ((ImageFrameTimeAxis*)clicked_trackview)->get_view()->get_selected_imageframe_view() ;
drag_info.copy = false ; drag_info.copy = false ;
@ -453,7 +453,7 @@ Editor::start_imageframe_grab(Gnome::Canvas::Item* item, GdkEvent* event)
void void
Editor::start_markerview_grab(Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_markerview_grab(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ; MarkerView* mv = ((MarkerTimeAxis*)clicked_trackview)->get_view()->get_selected_time_axis_item() ;
drag_info.copy = false ; drag_info.copy = false ;
@ -486,7 +486,7 @@ Editor::start_markerview_grab(Gnome::Canvas::Item* item, GdkEvent* event)
void void
Editor::markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
{ {
double cx, cy ; double cx, cy ;
@ -533,7 +533,7 @@ Editor::markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event)
} }
void void
Editor::imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event)
{ {
double cx, cy ; double cx, cy ;
@ -572,7 +572,7 @@ Editor::imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event)
} }
void void
Editor::timeaxis_item_drag_finished_callback(Gnome::Canvas::Item*, GdkEvent* event) Editor::timeaxis_item_drag_finished_callback(ArdourCanvas::Item*, GdkEvent* event)
{ {
jack_nframes_t where ; jack_nframes_t where ;
TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ; TimeAxisViewItem* tavi = reinterpret_cast<TimeAxisViewItem*>(drag_info.data) ;
@ -610,7 +610,7 @@ Editor::timeaxis_item_drag_finished_callback(Gnome::Canvas::Item*, GdkEvent* eve
void void
Editor::imageframe_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
{ {
// get the selected item from the parent time axis // get the selected item from the parent time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ; ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
@ -640,7 +640,7 @@ Editor::imageframe_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::imageframe_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
{ {
// get the selected item from the parent time axis // get the selected item from the parent time axis
ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ; ImageFrameTimeAxis* ifta = dynamic_cast<ImageFrameTimeAxis*>(clicked_trackview) ;
@ -672,7 +672,7 @@ Editor::imageframe_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::imageframe_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{ {
ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ; ImageFrameView* ifv = reinterpret_cast<ImageFrameView*> (drag_info.data) ;
@ -743,7 +743,7 @@ Editor::imageframe_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent*
} }
void void
Editor::imageframe_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event)
{ {
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ; ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
@ -763,7 +763,7 @@ Editor::imageframe_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* ev
} }
void void
Editor::imageframe_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{ {
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ; ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
@ -822,7 +822,7 @@ Editor::imageframe_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* e
void void
Editor::imageframe_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* event) Editor::imageframe_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* event)
{ {
ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ; ImageFrameView* ifv = reinterpret_cast<ImageFrameView *> (drag_info.data) ;
@ -844,7 +844,7 @@ Editor::imageframe_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* eve
void void
Editor::markerview_item_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_item_start_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ; MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
@ -869,7 +869,7 @@ Editor::markerview_item_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* eve
} }
void void
Editor::markerview_item_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_item_end_handle_op(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ; MarkerView* mv = reinterpret_cast<MarkerTimeAxis*>(clicked_trackview)->get_view()->get_selected_time_axis_item() ;
if (mv == 0) if (mv == 0)
@ -894,7 +894,7 @@ Editor::markerview_item_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event
void void
Editor::markerview_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_start_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ; MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
@ -968,7 +968,7 @@ Editor::markerview_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent*
} }
void void
Editor::markerview_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_start_handle_end_trim(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ; MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
@ -988,7 +988,7 @@ Editor::markerview_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* ev
} }
void void
Editor::markerview_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_end_handle_trim_motion(ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ; MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;
@ -1064,7 +1064,7 @@ Editor::markerview_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* e
void void
Editor::markerview_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* event) Editor::markerview_end_handle_end_trim (ArdourCanvas::Item* item, GdkEvent* event)
{ {
MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ; MarkerView* mv = reinterpret_cast<MarkerView*> (drag_info.data) ;

View file

@ -30,6 +30,7 @@
#include "editor.h" #include "editor.h"
#include "marker.h" #include "marker.h"
#include "selection.h" #include "selection.h"
#include "simplerect.h"
#include "editing.h" #include "editing.h"
#include "gui_thread.h" #include "gui_thread.h"
@ -293,7 +294,7 @@ Editor::mouse_add_new_marker (jack_nframes_t where)
} }
void void
Editor::remove_marker (Gnome::Canvas::Item& item, GdkEvent* event) Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event)
{ {
Marker* marker; Marker* marker;
bool is_start; bool is_start;
@ -356,7 +357,7 @@ Editor::location_gone (Location *location)
} }
void void
Editor::tm_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) Editor::tm_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{ {
if (tm_marker_menu == 0) { if (tm_marker_menu == 0) {
build_tm_marker_menu (); build_tm_marker_menu ();
@ -369,7 +370,7 @@ Editor::tm_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
void void
Editor::marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{ {
Marker * marker; Marker * marker;
if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) { if ((marker = reinterpret_cast<Marker *> (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) {
@ -412,7 +413,7 @@ Editor::marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item)
void void
Editor::new_transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) Editor::new_transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{ {
if (new_transport_marker_menu == 0) { if (new_transport_marker_menu == 0) {
build_new_transport_marker_menu (); build_new_transport_marker_menu ();
@ -423,7 +424,7 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::It
} }
void void
Editor::transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) Editor::transport_marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item)
{ {
if (transport_marker_menu == 0) { if (transport_marker_menu == 0) {
build_transport_marker_menu (); build_transport_marker_menu ();

View file

@ -161,7 +161,7 @@ Editor::update_current_screen ()
if (_follow_playhead) { if (_follow_playhead) {
playhead_cursor->canvas_item->show(); playhead_cursor->canvas_item.show();
if (frame != last_update_frame) { if (frame != last_update_frame) {
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) { if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
@ -184,7 +184,7 @@ Editor::update_current_screen ()
if (frame != last_update_frame) { if (frame != last_update_frame) {
if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) { if (frame < leftmost_frame || frame > leftmost_frame + current_page_frames()) {
playhead_cursor->canvas_item->hide(); playhead_cursor->canvas_item.hide();
} else { } else {
playhead_cursor->set_position (frame); playhead_cursor->set_position (frame);
} }

View file

@ -283,7 +283,7 @@ Editor::step_mouse_mode (bool next)
} }
bool bool
Editor::button_press_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type) Editor::button_press_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
jack_nframes_t where = event_frame (event, 0, 0); jack_nframes_t where = event_frame (event, 0, 0);
@ -781,7 +781,7 @@ Editor::button_press_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemTy
} }
bool bool
Editor::button_release_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type) Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
jack_nframes_t where = event_frame (event, 0, 0); jack_nframes_t where = event_frame (event, 0, 0);
@ -1116,7 +1116,7 @@ Editor::maybe_autoscroll (GdkEvent* event)
} }
bool bool
Editor::enter_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type) Editor::enter_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
ControlPoint* cp; ControlPoint* cp;
Marker * marker; Marker * marker;
@ -1314,7 +1314,7 @@ Editor::enter_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item
} }
bool bool
Editor::leave_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type) Editor::leave_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
AutomationLine* al; AutomationLine* al;
ControlPoint* cp; ControlPoint* cp;
@ -1437,7 +1437,7 @@ Editor::left_automation_track ()
} }
bool bool
Editor::motion_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item_type) Editor::motion_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemType item_type)
{ {
gint x, y; gint x, y;
@ -1606,7 +1606,7 @@ Editor::start_grab (GdkEvent* event, Gdk::Cursor *cursor)
} }
bool bool
Editor::end_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
bool did_drag = false; bool did_drag = false;
@ -1675,7 +1675,7 @@ Editor::set_playhead_cursor (GdkEvent* event)
} }
void void
Editor::start_fade_in_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_fade_in_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::fade_in_drag_motion_callback; drag_info.motion_callback = &Editor::fade_in_drag_motion_callback;
@ -1694,7 +1694,7 @@ Editor::start_fade_in_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::fade_in_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::fade_in_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data); AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
jack_nframes_t pos; jack_nframes_t pos;
@ -1727,7 +1727,7 @@ Editor::fade_in_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event
} }
void void
Editor::fade_in_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::fade_in_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) return; if (drag_info.first_move) return;
@ -1765,7 +1765,7 @@ Editor::fade_in_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* eve
} }
void void
Editor::start_fade_out_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_fade_out_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::fade_out_drag_motion_callback; drag_info.motion_callback = &Editor::fade_out_drag_motion_callback;
@ -1784,7 +1784,7 @@ Editor::start_fade_out_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::fade_out_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::fade_out_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data); AudioRegionView* arv = static_cast<AudioRegionView*>(drag_info.data);
jack_nframes_t pos; jack_nframes_t pos;
@ -1819,7 +1819,7 @@ Editor::fade_out_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* even
} }
void void
Editor::fade_out_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::fade_out_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) return; if (drag_info.first_move) return;
@ -1858,7 +1858,7 @@ Editor::fade_out_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* ev
} }
void void
Editor::start_cursor_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_cursor_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::cursor_drag_motion_callback; drag_info.motion_callback = &Editor::cursor_drag_motion_callback;
@ -1885,7 +1885,7 @@ Editor::start_cursor_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::cursor_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::cursor_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Cursor* cursor = (Cursor *) drag_info.data; Cursor* cursor = (Cursor *) drag_info.data;
jack_nframes_t adjusted_frame; jack_nframes_t adjusted_frame;
@ -1918,7 +1918,7 @@ Editor::cursor_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::cursor_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::cursor_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) return; if (drag_info.first_move) return;
@ -1952,7 +1952,7 @@ Editor::update_marker_drag_item (Location *location)
} }
void void
Editor::start_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Marker* marker; Marker* marker;
@ -1991,7 +1991,7 @@ Editor::start_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t f_delta; jack_nframes_t f_delta;
Marker* marker = (Marker *) drag_info.data; Marker* marker = (Marker *) drag_info.data;
@ -2070,7 +2070,7 @@ Editor::marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::marker_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) { if (drag_info.first_move) {
marker_drag_motion_callback (item, event); marker_drag_motion_callback (item, event);
@ -2089,7 +2089,7 @@ Editor::marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* even
} }
void void
Editor::start_meter_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_meter_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Marker* marker; Marker* marker;
MeterMarker* meter_marker; MeterMarker* meter_marker;
@ -2120,7 +2120,7 @@ Editor::start_meter_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::meter_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::meter_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
MeterMarker* marker = (MeterMarker *) drag_info.data; MeterMarker* marker = (MeterMarker *) drag_info.data;
jack_nframes_t adjusted_frame; jack_nframes_t adjusted_frame;
@ -2148,7 +2148,7 @@ Editor::meter_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent*
} }
void void
Editor::meter_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::meter_marker_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) return; if (drag_info.first_move) return;
@ -2168,7 +2168,7 @@ Editor::meter_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent
} }
void void
Editor::start_tempo_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_tempo_marker_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Marker* marker; Marker* marker;
TempoMarker* tempo_marker; TempoMarker* tempo_marker;
@ -2201,7 +2201,7 @@ Editor::start_tempo_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::tempo_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::tempo_marker_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
TempoMarker* marker = (TempoMarker *) drag_info.data; TempoMarker* marker = (TempoMarker *) drag_info.data;
jack_nframes_t adjusted_frame; jack_nframes_t adjusted_frame;
@ -2230,7 +2230,7 @@ Editor::tempo_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent*
} }
void void
Editor::tempo_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::tempo_marker_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (drag_info.first_move) return; if (drag_info.first_move) return;
@ -2250,7 +2250,7 @@ Editor::tempo_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent
} }
void void
Editor::remove_gain_control_point (Gnome::Canvas::Item*item, GdkEvent* event) Editor::remove_gain_control_point (ArdourCanvas::Item*item, GdkEvent* event)
{ {
ControlPoint* control_point; ControlPoint* control_point;
@ -2269,7 +2269,7 @@ Editor::remove_gain_control_point (Gnome::Canvas::Item*item, GdkEvent* event)
} }
void void
Editor::remove_control_point (Gnome::Canvas::Item*item, GdkEvent* event) Editor::remove_control_point (ArdourCanvas::Item*item, GdkEvent* event)
{ {
ControlPoint* control_point; ControlPoint* control_point;
@ -2282,7 +2282,7 @@ Editor::remove_control_point (Gnome::Canvas::Item*item, GdkEvent* event)
} }
void void
Editor::start_control_point_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_control_point_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
ControlPoint* control_point; ControlPoint* control_point;
@ -2308,7 +2308,7 @@ Editor::start_control_point_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::control_point_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::control_point_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data); ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
@ -2360,7 +2360,7 @@ Editor::control_point_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent*
} }
void void
Editor::control_point_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::control_point_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data); ControlPoint* cp = reinterpret_cast<ControlPoint *> (drag_info.data);
control_point_drag_motion_callback (item, event); control_point_drag_motion_callback (item, event);
@ -2368,7 +2368,7 @@ Editor::control_point_drag_finished_callback (Gnome::Canvas::Item* item, GdkEven
} }
void void
Editor::start_line_grab_from_regionview (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_line_grab_from_regionview (ArdourCanvas::Item* item, GdkEvent* event)
{ {
switch (mouse_mode) { switch (mouse_mode) {
case MouseGain: case MouseGain:
@ -2380,7 +2380,7 @@ Editor::start_line_grab_from_regionview (Gnome::Canvas::Item* item, GdkEvent* ev
} }
void void
Editor::start_line_grab_from_line (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_line_grab_from_line (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AutomationLine* al; AutomationLine* al;
@ -2431,7 +2431,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event)
} }
void void
Editor::line_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::line_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data); AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
double cx = drag_info.current_pointer_x; double cx = drag_info.current_pointer_x;
@ -2456,7 +2456,7 @@ Editor::line_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::line_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::line_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data); AutomationLine* line = reinterpret_cast<AutomationLine *> (drag_info.data);
line_drag_motion_callback (item, event); line_drag_motion_callback (item, event);
@ -2464,7 +2464,7 @@ Editor::line_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::start_region_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_region_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (selection->audio_regions.empty() || clicked_regionview == 0) { if (selection->audio_regions.empty() || clicked_regionview == 0) {
return; return;
@ -2498,7 +2498,7 @@ Editor::start_region_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::start_region_copy_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_region_copy_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (selection->audio_regions.empty() || clicked_regionview == 0) { if (selection->audio_regions.empty() || clicked_regionview == 0) {
return; return;
@ -2580,7 +2580,7 @@ Editor::start_region_copy_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::start_region_brush_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_region_brush_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (selection->audio_regions.empty() || clicked_regionview == 0) { if (selection->audio_regions.empty() || clicked_regionview == 0) {
return; return;
@ -2613,7 +2613,7 @@ Editor::start_region_brush_grab (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::region_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::region_drag_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
double x_delta; double x_delta;
double y_delta = 0; double y_delta = 0;
@ -3048,7 +3048,7 @@ Editor::region_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::region_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t where; jack_nframes_t where;
AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data); AudioRegionView* rv = reinterpret_cast<AudioRegionView *> (drag_info.data);
@ -3389,7 +3389,7 @@ Editor::collect_new_region_view (AudioRegionView* rv)
} }
void void
Editor::start_selection_grab (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_selection_grab (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (clicked_regionview == 0) { if (clicked_regionview == 0) {
return; return;
@ -3468,7 +3468,7 @@ Editor::cancel_selection ()
} }
void void
Editor::start_selection_op (Gnome::Canvas::Item* item, GdkEvent* event, SelectionOp op) Editor::start_selection_op (ArdourCanvas::Item* item, GdkEvent* event, SelectionOp op)
{ {
jack_nframes_t start = 0; jack_nframes_t start = 0;
jack_nframes_t end = 0; jack_nframes_t end = 0;
@ -3523,7 +3523,7 @@ Editor::start_selection_op (Gnome::Canvas::Item* item, GdkEvent* event, Selectio
} }
void void
Editor::drag_selection (Gnome::Canvas::Item* item, GdkEvent* event) Editor::drag_selection (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t start = 0; jack_nframes_t start = 0;
jack_nframes_t end = 0; jack_nframes_t end = 0;
@ -3653,7 +3653,7 @@ Editor::drag_selection (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::end_selection_op (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_selection_op (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (!drag_info.first_move) { if (!drag_info.first_move) {
drag_selection (item, event); drag_selection (item, event);
@ -3678,7 +3678,7 @@ Editor::end_selection_op (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::start_trim (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event)
{ {
double speed = 1.0; double speed = 1.0;
TimeAxisView* tvp = clicked_trackview; TimeAxisView* tvp = clicked_trackview;
@ -3728,7 +3728,7 @@ Editor::start_trim (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::trim_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
AudioRegionView* rv = clicked_regionview; AudioRegionView* rv = clicked_regionview;
jack_nframes_t frame_delta = 0; jack_nframes_t frame_delta = 0;
@ -3954,7 +3954,7 @@ Editor::single_end_trim (AudioRegionView& rv, jack_nframes_t frame_delta, bool l
} }
void void
Editor::trim_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) Editor::trim_finished_callback (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (!drag_info.first_move) { if (!drag_info.first_move) {
trim_motion_callback (item, event); trim_motion_callback (item, event);
@ -4066,7 +4066,7 @@ Editor::thaw_region_after_trim (AudioRegionView& rv)
} }
void void
Editor::hide_marker (Gnome::Canvas::Item* item, GdkEvent* event) Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Marker* marker; Marker* marker;
bool is_start; bool is_start;
@ -4082,7 +4082,7 @@ Editor::hide_marker (Gnome::Canvas::Item* item, GdkEvent* event)
void void
Editor::start_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event, RangeMarkerOp op) Editor::start_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event, RangeMarkerOp op)
{ {
if (session == 0) { if (session == 0) {
@ -4117,11 +4117,11 @@ Editor::start_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event, Ra
} }
void void
Editor::drag_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event) Editor::drag_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t start = 0; jack_nframes_t start = 0;
jack_nframes_t end = 0; jack_nframes_t end = 0;
Gnome::Canvas::Item* crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect; ArdourCanvas::Item* crect = (range_marker_op == CreateRangeMarker) ? range_bar_drag_rect: transport_bar_drag_rect;
if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) { if (!Keyboard::modifier_state_contains (event->button.state, Keyboard::snap_modifier())) {
snap_to (drag_info.current_pointer_frame); snap_to (drag_info.current_pointer_frame);
@ -4190,7 +4190,7 @@ Editor::drag_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::end_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_range_markerbar_op (ArdourCanvas::Item* item, GdkEvent* event)
{ {
Location * newloc = 0; Location * newloc = 0;
@ -4233,7 +4233,7 @@ Editor::end_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event)
void void
Editor::start_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::drag_mouse_zoom; drag_info.motion_callback = &Editor::drag_mouse_zoom;
@ -4245,7 +4245,7 @@ Editor::start_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::drag_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event) Editor::drag_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t start; jack_nframes_t start;
jack_nframes_t end; jack_nframes_t end;
@ -4286,7 +4286,7 @@ Editor::drag_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::end_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_mouse_zoom (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (!drag_info.first_move) { if (!drag_info.first_move) {
drag_mouse_zoom (item, event); drag_mouse_zoom (item, event);
@ -4321,7 +4321,7 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end)
} }
void void
Editor::start_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::drag_rubberband_select; drag_info.motion_callback = &Editor::drag_rubberband_select;
@ -4333,7 +4333,7 @@ Editor::start_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::drag_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) Editor::drag_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
{ {
jack_nframes_t start; jack_nframes_t start;
jack_nframes_t end; jack_nframes_t end;
@ -4397,7 +4397,7 @@ Editor::drag_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::end_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_rubberband_select (ArdourCanvas::Item* item, GdkEvent* event)
{ {
if (!drag_info.first_move) { if (!drag_info.first_move) {
@ -4440,7 +4440,7 @@ Editor::end_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event)
gint gint
Editor::mouse_rename_region (Gnome::Canvas::Item* item, GdkEvent* event) Editor::mouse_rename_region (ArdourCanvas::Item* item, GdkEvent* event)
{ {
using namespace Gtkmm2ext; using namespace Gtkmm2ext;
@ -4463,7 +4463,7 @@ Editor::mouse_rename_region (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::start_time_fx (Gnome::Canvas::Item* item, GdkEvent* event) Editor::start_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
{ {
drag_info.item = item; drag_info.item = item;
drag_info.motion_callback = &Editor::time_fx_motion; drag_info.motion_callback = &Editor::time_fx_motion;
@ -4475,7 +4475,7 @@ Editor::start_time_fx (Gnome::Canvas::Item* item, GdkEvent* event)
} }
void void
Editor::time_fx_motion (Gnome::Canvas::Item *item, GdkEvent* event) Editor::time_fx_motion (ArdourCanvas::Item *item, GdkEvent* event)
{ {
AudioRegionView* rv = clicked_regionview; AudioRegionView* rv = clicked_regionview;
@ -4498,7 +4498,7 @@ Editor::time_fx_motion (Gnome::Canvas::Item *item, GdkEvent* event)
} }
void void
Editor::end_time_fx (Gnome::Canvas::Item* item, GdkEvent* event) Editor::end_time_fx (ArdourCanvas::Item* item, GdkEvent* event)
{ {
clicked_regionview->get_time_axis_view().hide_timestretch (); clicked_regionview->get_time_axis_view().hide_timestretch ();

View file

@ -54,7 +54,7 @@ Editor::handle_new_route (Route& route)
return; return;
} }
tv = new AudioTimeAxisView (*this, *session, route, &track_canvas); tv = new AudioTimeAxisView (*this, *session, route, track_canvas);
track_views.push_back (tv); track_views.push_back (tv);

View file

@ -126,13 +126,13 @@ Editor::hide_measures ()
used_measure_lines.clear (); used_measure_lines.clear ();
} }
Gnome::Canvas::Line * ArdourCanvas::Line *
Editor::get_time_line () Editor::get_time_line ()
{ {
Gnome::Canvas::Line *line; ArdourCanvas::Line *line;
if (free_measure_lines.empty()) { if (free_measure_lines.empty()) {
line = new Gnome::Canvas::Line (*time_line_group); line = new ArdourCanvas::Line (*time_line_group);
// cerr << "measure line @ " << line << endl; // cerr << "measure line @ " << line << endl;
used_measure_lines.push_back (line); used_measure_lines.push_back (line);
} else { } else {
@ -153,7 +153,7 @@ Editor::draw_measures ()
TempoMap::BBTPointList::iterator i; TempoMap::BBTPointList::iterator i;
TempoMap::BBTPointList *all_bbt_points; TempoMap::BBTPointList *all_bbt_points;
Gnome::Canvas::Line *line; ArdourCanvas::Line *line;
gdouble xpos, last_xpos; gdouble xpos, last_xpos;
uint32_t cnt; uint32_t cnt;
uint32_t color; uint32_t color;
@ -324,7 +324,7 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame)
} }
void void
Editor::remove_tempo_marker (Gnome::Canvas::Item* item) Editor::remove_tempo_marker (ArdourCanvas::Item* item)
{ {
Marker* marker; Marker* marker;
TempoMarker* tempo_marker; TempoMarker* tempo_marker;
@ -411,7 +411,7 @@ Editor::edit_tempo_section (TempoSection* section)
} }
void void
Editor::edit_tempo_marker (Gnome::Canvas::Item *item) Editor::edit_tempo_marker (ArdourCanvas::Item *item)
{ {
Marker* marker; Marker* marker;
TempoMarker* tempo_marker; TempoMarker* tempo_marker;
@ -430,7 +430,7 @@ Editor::edit_tempo_marker (Gnome::Canvas::Item *item)
} }
void void
Editor::edit_meter_marker (Gnome::Canvas::Item *item) Editor::edit_meter_marker (ArdourCanvas::Item *item)
{ {
Marker* marker; Marker* marker;
MeterMarker* meter_marker; MeterMarker* meter_marker;
@ -461,7 +461,7 @@ Editor::real_remove_tempo_marker (TempoSection *section)
} }
void void
Editor::remove_meter_marker (Gnome::Canvas::Item* item) Editor::remove_meter_marker (ArdourCanvas::Item* item)
{ {
Marker* marker; Marker* marker;
MeterMarker* meter_marker; MeterMarker* meter_marker;

View file

@ -149,7 +149,8 @@ Editor::run_timestretch (AudioRegionSelection& regions, float fraction)
current_timestretch->signal_delete_event().connect (mem_fun (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress)); current_timestretch->signal_delete_event().connect (mem_fun (current_timestretch, &TimeStretchDialog::delete_timestretch_in_progress));
if (pthread_create_and_store ("timestretch", &thread, 0, timestretch_thread, current_timestretch)) { if (pthread_create_and_store ("timestretch", &thread, 0, timestretch_thread, current_timestretch)) {
current_timestretch->close (); // GTK2FIX
//current_timestretch->close ();
error << _("timestretch cannot be started - thread creation error") << endmsg; error << _("timestretch cannot be started - thread creation error") << endmsg;
return -1; return -1;
} }

View file

@ -60,7 +60,7 @@ static const gchar *sample_rates[] = {
0 0
}; };
static const gchar *src_qualities[] = { static const gchar *src_quality[] = {
N_("best"), N_("best"),
N_("fastest"), N_("fastest"),
N_("linear"), N_("linear"),
@ -1265,7 +1265,6 @@ ExportDialog::initiate_browse ()
file_selector->get_cancel_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), -1)); file_selector->get_cancel_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), -1));
file_selector->get_ok_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), 1)); file_selector->get_ok_button()->signal_clicked().connect (bind (mem_fun(*this, &ExportDialog::finish_browse), 1));
file_selector->signal_unmap_event().connect (bind (mem_fun(*this, &ExportDialog::change_focus_policy), false));
} }
file_selector->show_all (); file_selector->show_all ();
} }

View file

@ -30,7 +30,7 @@
using namespace ARDOUR; using namespace ARDOUR;
using namespace Gtk; using namespace Gtk;
GainAutomationTimeAxisView::GainAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, Canvas& canvas, std::string n, ARDOUR::Curve& c) GainAutomationTimeAxisView::GainAutomationTimeAxisView (Session& s, Route& r, PublicEditor& e, TimeAxisView& parent, ArdourCanvas::Canvas& canvas, std::string n, ARDOUR::Curve& c)
: AxisView (s), : AxisView (s),
AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("gain"), ""), AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("gain"), ""),
@ -44,7 +44,7 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView ()
} }
void void
GainAutomationTimeAxisView::add_automation_event (Gnome::Canvas::Item* item, GdkEvent* event, jack_nframes_t when, double y) GainAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
{ {
double x = 0; double x = 0;

View file

@ -15,11 +15,11 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos)
// "x", initial_pos, // "x", initial_pos,
// "y", 0.0, // "y", 0.0,
// NULL); // NULL);
group = new Gnome::Canvas::Group (*trackview.canvas_display); group = new ArdourCanvas::Group (*trackview.canvas_display);
group->set_property ("x", initial_pos); group->set_property ("x", initial_pos);
group->set_property ("y", 0.0); group->set_property ("y", 0.0);
base_rect = new Gnome::Canvas::SimpleRect (*group); base_rect = new ArdourCanvas::SimpleRect (*group);
base_rect->set_property ("x1", (double) 0.0); base_rect->set_property ("x1", (double) 0.0);
base_rect->set_property ("y1", (double) 0.0); base_rect->set_property ("y1", (double) 0.0);
base_rect->set_property ("y2", (double) trackview.height); base_rect->set_property ("y2", (double) trackview.height);

View file

@ -655,7 +655,7 @@
<widget class="GtkRadioButton" id="ConnectToMasterTrack"> <widget class="GtkRadioButton" id="ConnectToMasterTrack">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Connect to Master Track</property> <property name="label" translatable="yes">Connect to Master Bus</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
@ -674,7 +674,7 @@
<widget class="GtkRadioButton" id="ConnectToControlTrack"> <widget class="GtkRadioButton" id="ConnectToControlTrack">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Connect to Control Track</property> <property name="label" translatable="yes">Connect to Control Bus</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property> <property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>

View file

@ -57,9 +57,9 @@ namespace
namespace Glib namespace Glib
{ {
Gnome::Canvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy) ArdourCanvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy)
{ {
return dynamic_cast<Gnome::Canvas::ImageFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy)); return dynamic_cast<ArdourCanvas::ImageFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
} }
} /* namespace Glib */ } /* namespace Glib */

View file

@ -133,12 +133,12 @@ public:
namespace Glib namespace Glib
{ {
/** @relates Gnome::Canvas::ImageFrame /** @relates ArdourCanvas::ImageFrame
* @param object The C instance * @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref. * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance. * @result A C++ instance that wraps this C instance.
*/ */
Gnome::Canvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy = false); ArdourCanvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy = false);
} }
#endif /* _LIBGNOMECANVASMM_IMAGEFRAME_H */ #endif /* _LIBGNOMECANVASMM_IMAGEFRAME_H */

View file

@ -56,7 +56,7 @@ using namespace Gtk ;
* @param sess the current session * @param sess the current session
* @param canvas the parent canvas item * @param canvas the parent canvas item
*/ */
ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, ARDOUR::Session& sess, Canvas& canvas) ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, ARDOUR::Session& sess, ArdourCanvas::Canvas& canvas)
: AxisView(sess), : AxisView(sess),
VisualTimeAxis(track_id, ed, sess, canvas) VisualTimeAxis(track_id, ed, sess, canvas)
{ {
@ -64,7 +64,7 @@ ImageFrameTimeAxis::ImageFrameTimeAxis(std::string track_id, PublicEditor& ed, A
//GTK2FIX -- how to get the group? is the canvas display really a group? //GTK2FIX -- how to get the group? is the canvas display really a group?
//selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ; //selection_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_display), gnome_canvas_group_get_type (), NULL) ;
selection_group = new Gnome::Canvas::Group (GNOME_CANVAS_GROUP(canvas_display)); selection_group = new ArdourCanvas::Group (*canvas_display);
selection_group->hide(); selection_group->hide();
// intialize our data items // intialize our data items

View file

@ -203,7 +203,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(std::string frame_id, jack_nframes_
if(get_named_imageframe_item(frame_id) == 0) if(get_named_imageframe_item(frame_id) == 0)
{ {
ifv = new ImageFrameView(frame_id, ifv = new ImageFrameView(frame_id,
_view_helper.canvas_item(), _view_helper.canvas_item()->property_parent(),
&(_view_helper.trackview()), &(_view_helper.trackview()),
this, this,
_view_helper.trackview().editor.get_current_zoom(), _view_helper.trackview().editor.get_current_zoom(),

View file

@ -55,7 +55,7 @@ sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
* @param num_channels the number of color channels within rgb_data * @param num_channels the number of color channels within rgb_data
*/ */
ImageFrameView::ImageFrameView(std::string item_id, ImageFrameView::ImageFrameView(std::string item_id,
Gnome::Canvas::Group *parent, ArdourCanvas::Group *parent,
ImageFrameTimeAxis* tv, ImageFrameTimeAxis* tv,
ImageFrameTimeAxisGroup* item_group, ImageFrameTimeAxisGroup* item_group,
double spu, double spu,
@ -66,7 +66,7 @@ ImageFrameView::ImageFrameView(std::string item_id,
uint32_t width, uint32_t width,
uint32_t height, uint32_t height,
uint32_t num_channels) uint32_t num_channels)
: TimeAxisViewItem(item_id, parent, *tv, spu, basic_color, start, duration, : TimeAxisViewItem(item_id, *parent, *tv, spu, basic_color, start, duration,
TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText| TimeAxisViewItem::Visibility (TimeAxisViewItem::ShowNameText|
TimeAxisViewItem::ShowNameHighlight| TimeAxisViewItem::ShowNameHighlight|
TimeAxisViewItem::ShowFrame| TimeAxisViewItem::ShowFrame|

View file

@ -60,7 +60,7 @@ class ImageFrameView : public TimeAxisViewItem
* @param num_channels the number of color channels within rgb_data * @param num_channels the number of color channels within rgb_data
*/ */
ImageFrameView(std::string item_id, ImageFrameView(std::string item_id,
Gnome::Canvas::Group *parent, ArdourCanvas::Group *parent,
ImageFrameTimeAxis *tv, ImageFrameTimeAxis *tv,
ImageFrameTimeAxisGroup* group, ImageFrameTimeAxisGroup* group,
double spu, double spu,

View file

@ -27,8 +27,8 @@
#include "i18n.h" #include "i18n.h"
Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, const string& annotation, Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
Type type, gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame) Type type, gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame)
: editor (ed), _type(type) : editor (ed), _type(type)
{ {
@ -122,14 +122,12 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
switch (type) { switch (type) {
case Mark: case Mark:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (6.0, 0.0)); points->push_back (Gnome::Art::Point (6.0, 0.0));
points->push_back (Gnome::Art::Point (6.0, 5.0)); points->push_back (Gnome::Art::Point (6.0, 5.0));
points->push_back (Gnome::Art::Point (3.0, 10.0)); points->push_back (Gnome::Art::Point (3.0, 10.0));
points->push_back (Gnome::Art::Point (0.0, 5.0)); points->push_back (Gnome::Art::Point (0.0, 5.0));
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
@ -140,10 +138,9 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
case Tempo: case Tempo:
case Meter: case Meter:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (3.0, 0.0)); points->push_back (Gnome::Art::Point (3.0, 0.0));
points->push_back (Gnome::Art::Point (6.0, 5.0)); points->push_back (Gnome::Art::Point (6.0, 5.0));
points->push_back (Gnome::Art::Point (6.0, 10.0)); points->push_back (Gnome::Art::Point (6.0, 10.0));
points->push_back (Gnome::Art::Point (0.0, 10.0)); points->push_back (Gnome::Art::Point (0.0, 10.0));
points->push_back (Gnome::Art::Point (0.0, 5.0)); points->push_back (Gnome::Art::Point (0.0, 5.0));
@ -154,7 +151,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case Start: case Start:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (5.0, 0.0)); points->push_back (Gnome::Art::Point (5.0, 0.0));
points->push_back (Gnome::Art::Point (10.0, 5.0)); points->push_back (Gnome::Art::Point (10.0, 5.0));
@ -167,7 +164,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case End: case End:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (5.0, 0.0)); points->push_back (Gnome::Art::Point (5.0, 0.0));
points->push_back (Gnome::Art::Point (10.0, 0.0)); points->push_back (Gnome::Art::Point (10.0, 0.0));
points->push_back (Gnome::Art::Point (10.0, 10.0)); points->push_back (Gnome::Art::Point (10.0, 10.0));
@ -180,7 +177,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case LoopStart: case LoopStart:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (4.0, 0.0)); points->push_back (Gnome::Art::Point (4.0, 0.0));
points->push_back (Gnome::Art::Point (4.0, 8.0)); points->push_back (Gnome::Art::Point (4.0, 8.0));
@ -194,7 +191,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case LoopEnd: case LoopEnd:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (8.0, 0.0)); points->push_back (Gnome::Art::Point (8.0, 0.0));
points->push_back (Gnome::Art::Point (8.0, 11.0)); points->push_back (Gnome::Art::Point (8.0, 11.0));
points->push_back (Gnome::Art::Point (0.0, 11.0)); points->push_back (Gnome::Art::Point (0.0, 11.0));
@ -208,7 +205,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case PunchIn: case PunchIn:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (8.0, 0.0)); points->push_back (Gnome::Art::Point (8.0, 0.0));
points->push_back (Gnome::Art::Point (4.0, 4.0)); points->push_back (Gnome::Art::Point (4.0, 4.0));
@ -221,7 +218,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
break; break;
case PunchOut: case PunchOut:
points = new Gnome::Canvas::Points (); points = new ArdourCanvas::Points ();
points->push_back (Gnome::Art::Point (0.0, 0.0)); points->push_back (Gnome::Art::Point (0.0, 0.0));
points->push_back (Gnome::Art::Point (8.0, 0.0)); points->push_back (Gnome::Art::Point (8.0, 0.0));
points->push_back (Gnome::Art::Point (8.0, 11.0)); points->push_back (Gnome::Art::Point (8.0, 11.0));
@ -246,14 +243,14 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co
group->set_property ("x", unit_position); group->set_property ("x", unit_position);
group->set_property ("y", 1.0); group->set_property ("y", 1.0);
// cerr << "set mark al points, nc = " << points->num_points << endl; // cerr << "set mark al points, nc = " << points->num_points << endl;
mark = new Gnome::Canvas::Polygon (*group); mark = new ArdourCanvas::Polygon (*group);
mark->set_property ("points", points); mark->set_property ("points", points);
mark->set_property ("fill_color_rgba", rgba); mark->set_property ("fill_color_rgba", rgba);
mark->set_property ("outline_color", Gdk::Color ("black")); mark->set_property ("outline_color", Gdk::Color ("black"));
Pango::FontDescription font = get_font_for_style (N_("MarkerText")); Pango::FontDescription font = get_font_for_style (N_("MarkerText"));
text = new Gnome::Canvas::Text (*group); text = new ArdourCanvas::Text (*group);
text->set_property ("text", annotation.c_str()); text->set_property ("text", annotation.c_str());
text->set_property ("x", label_offset); text->set_property ("x", label_offset);
text->set_property ("y", 0.0); text->set_property ("y", 0.0);
@ -314,9 +311,9 @@ Marker::set_color_rgba (uint32_t color)
/***********************************************************************/ /***********************************************************************/
TempoMarker::TempoMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
ARDOUR::TempoSection& temp, ARDOUR::TempoSection& temp,
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)) gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer))
: Marker (editor, parent, rgba, text, Tempo, callback, 0), : Marker (editor, parent, rgba, text, Tempo, callback, 0),
_tempo (temp) _tempo (temp)
{ {
@ -330,9 +327,9 @@ TempoMarker::~TempoMarker ()
/***********************************************************************/ /***********************************************************************/
MeterMarker::MeterMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
ARDOUR::MeterSection& m, ARDOUR::MeterSection& m,
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)) gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer))
: Marker (editor, parent, rgba, text, Meter, callback, 0), : Marker (editor, parent, rgba, text, Meter, callback, 0),
_meter (m) _meter (m)
{ {

View file

@ -24,10 +24,13 @@
#include <string> #include <string>
#include <glib.h> #include <glib.h>
#include <ardour/ardour.h> #include <ardour/ardour.h>
#include <libgnomecanvasmm/libgnomecanvasmm.h> #include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/text.h>
#include <libgnomecanvasmm/polygon.h> #include <libgnomecanvasmm/polygon.h>
#include <sigc++/signal.h> #include <sigc++/signal.h>
#include "canvas.h"
namespace ARDOUR { namespace ARDOUR {
class TempoSection; class TempoSection;
class MeterSection; class MeterSection;
@ -50,8 +53,8 @@ class Marker : public sigc::trackable
PunchOut PunchOut
}; };
Marker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, Type, Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0); gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
virtual ~Marker (); virtual ~Marker ();
void set_position (jack_nframes_t); void set_position (jack_nframes_t);
@ -66,10 +69,10 @@ class Marker : public sigc::trackable
protected: protected:
PublicEditor& editor; PublicEditor& editor;
Gnome::Canvas::Group *group; ArdourCanvas::Group *group;
Gnome::Canvas::Item *mark; ArdourCanvas::Item *mark;
Gnome::Canvas::Text *text; ArdourCanvas::Text *text;
Gnome::Canvas::Points *points; ArdourCanvas::Points *points;
double unit_position; double unit_position;
jack_nframes_t frame_position; jack_nframes_t frame_position;
@ -82,8 +85,8 @@ class Marker : public sigc::trackable
class TempoMarker : public Marker class TempoMarker : public Marker
{ {
public: public:
TempoMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&, TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)); gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer));
~TempoMarker (); ~TempoMarker ();
ARDOUR::TempoSection& tempo() const { return _tempo; } ARDOUR::TempoSection& tempo() const { return _tempo; }
@ -95,8 +98,8 @@ class TempoMarker : public Marker
class MeterMarker : public Marker class MeterMarker : public Marker
{ {
public: public:
MeterMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&, MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)); gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer));
~MeterMarker (); ~MeterMarker ();
ARDOUR::MeterSection& meter() const { return _meter; } ARDOUR::MeterSection& meter() const { return _meter; }

View file

@ -54,9 +54,9 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
//GTK2FIX -- how to get the group? is the canvas display really a group? //GTK2FIX -- how to get the group? is the canvas display really a group?
//canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0); //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), gnome_canvas_group_get_type (), 0);
canvas_group = new Gnome::Canvas::Group (*_trackview.canvas_display); canvas_group = new ArdourCanvas::Group (*_trackview.canvas_display);
canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group); canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
canvas_rect->set_property ("x1", 0.0); canvas_rect->set_property ("x1", 0.0);
canvas_rect->set_property ("y1", 0.0); canvas_rect->set_property ("y1", 0.0);
canvas_rect->set_property ("x2", 1000000.0); canvas_rect->set_property ("x2", 1000000.0);
@ -64,7 +64,7 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv)
canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]); canvas_rect->set_property ("outline_color_rgba", color_map[cMarkerTrackOutline]);
canvas_rect->set_property ("fill_color_rgba", stream_base_color); canvas_rect->set_property ("fill_color_rgba", stream_base_color);
canvas_rect->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview)); canvas_rect->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_time_axis_view_event), canvas_rect, &_trackview));
_samples_per_unit = _trackview.editor.get_current_zoom() ; _samples_per_unit = _trackview.editor.get_current_zoom() ;

View file

@ -25,10 +25,10 @@
#include <gtkmm.h> #include <gtkmm.h>
#include <libgnomecanvasmm/group.h> #include <libgnomecanvasmm/group.h>
#include <libgnomecanvasmm/canvas.h>
#include <ardour/location.h> #include <ardour/location.h>
#include "simplerect.h" #include "simplerect.h"
#include "canvas.h"
class PublicEditor; class PublicEditor;
class MarkerTimeAxis; class MarkerTimeAxis;
@ -75,7 +75,7 @@ class MarkerTimeAxisView : public sigc::trackable
/** /**
* *
*/ */
Gnome::Canvas::Item *canvas_item() { return canvas_group; } ArdourCanvas::Item *canvas_item() { return canvas_group; }
//---------------------------------------------------------------------------------------// //---------------------------------------------------------------------------------------//
@ -226,8 +226,8 @@ class MarkerTimeAxisView : public sigc::trackable
/* the TimeAxisView that this object is acting as the view helper for */ /* the TimeAxisView that this object is acting as the view helper for */
MarkerTimeAxis& _trackview ; MarkerTimeAxis& _trackview ;
Gnome::Canvas::Group *canvas_group ; ArdourCanvas::Group *canvas_group ;
Gnome::Canvas::SimpleRect *canvas_rect ; /* frame around the whole thing */ ArdourCanvas::SimpleRect *canvas_rect ; /* frame around the whole thing */
/** the current samples per unit */ /** the current samples per unit */
double _samples_per_unit; double _samples_per_unit;

View file

@ -47,7 +47,7 @@ sigc::signal<void,MarkerView*> MarkerView::GoingAway;
* @param start the start time of this item * @param start the start time of this item
* @param duration the duration of this item * @param duration the duration of this item
*/ */
MarkerView::MarkerView(Gnome::Canvas::Group *parent, MarkerView::MarkerView(ArdourCanvas::Group *parent,
TimeAxisView* tv, TimeAxisView* tv,
ImageFrameView* marked, ImageFrameView* marked,
double spu, double spu,
@ -56,7 +56,7 @@ MarkerView::MarkerView(Gnome::Canvas::Group *parent,
std::string mark_id, std::string mark_id,
jack_nframes_t start, jack_nframes_t start,
jack_nframes_t duration) jack_nframes_t duration)
: TimeAxisViewItem(mark_id, parent,*tv,spu,basic_color,start,duration) : TimeAxisViewItem(mark_id, *parent,*tv,spu,basic_color,start,duration)
{ {
mark_type_text = mark_type ; mark_type_text = mark_type ;
marked_item = marked ; marked_item = marked ;

View file

@ -23,9 +23,10 @@
#include <string> #include <string>
#include <gtkmm.h> #include <gtkmm.h>
#include <libgnomecanvas/libgnomecanvas.h>
#include "time_axis_view_item.h" #include "time_axis_view_item.h"
#include "canvas.h"
class MarkerTimeAxisView ; class MarkerTimeAxisView ;
class ImageFrameView ; class ImageFrameView ;
@ -54,7 +55,7 @@ class MarkerView : public TimeAxisViewItem
* @param start the start time of this item * @param start the start time of this item
* @param duration the duration of this item * @param duration the duration of this item
*/ */
MarkerView(Gnome::Canvas::Group *parent, MarkerView(ArdourCanvas::Group *parent,
TimeAxisView *tv, TimeAxisView *tv,
ImageFrameView* marked, ImageFrameView* marked,
double spu, double spu,

View file

@ -45,7 +45,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView ()
} }
void void
PanAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y) PanAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
{ {
if (lines.empty()) { if (lines.empty()) {
/* no data, possibly caused by no outputs/inputs */ /* no data, possibly caused by no outputs/inputs */

View file

@ -746,7 +746,7 @@ PluginUI::control_port_toggled (ControlUI* cui)
} }
} }
bool void
PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui) PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
{ {
if (!cui->ignore_change) { if (!cui->ignore_change) {
@ -755,7 +755,6 @@ PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui)
insert.set_parameter (cui->port_index, mapping[value]); insert.set_parameter (cui->port_index, mapping[value]);
} }
return FALSE;
} }
void void
@ -868,8 +867,8 @@ PlugUIBase::PlugUIBase (PluginInsert& pi)
bypass_button.signal_toggled().connect (mem_fun(*this, &PlugUIBase::bypass_toggled)); bypass_button.signal_toggled().connect (mem_fun(*this, &PlugUIBase::bypass_toggled));
} }
gint void
PlugUIBase::setting_selected(GdkEventAny* ignored) PlugUIBase::setting_selected()
{ {
if (combo.get_active_text().length() > 0) { if (combo.get_active_text().length() > 0) {
if (!plugin.load_preset(combo.get_active_text())) { if (!plugin.load_preset(combo.get_active_text())) {
@ -877,7 +876,6 @@ PlugUIBase::setting_selected(GdkEventAny* ignored)
} }
} }
return FALSE;
} }
void void

View file

@ -34,15 +34,17 @@ using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s, RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s,
TimeAxisView& tv, Gnome::Canvas::Group& parent,
TimeAxisView& tv, ArdourCanvas::Group& parent,
AutomationList& l) AutomationList& l)
: AutomationLine (name, tv, parent, l) : AutomationLine (name, tv, parent, l),
session (s), session (s),
_redirect (rd), _redirect (rd),
_port (port) _port (port)
{ {
set_verbose_cursor_uses_gain_mapping (false); set_verbose_cursor_uses_gain_mapping (false);
PluginInsert *pi; PluginInsert *pi;
Plugin::ParameterDescriptor desc; Plugin::ParameterDescriptor desc;

View file

@ -71,7 +71,7 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView ()
} }
void void
RedirectAutomationTimeAxisView::add_automation_event (GnomeCanvasItem* item, GdkEvent* event, jack_nframes_t when, double y) RedirectAutomationTimeAxisView::add_automation_event (ArdourCanvas::Item* item, GdkEvent* event, jack_nframes_t when, double y)
{ {
double x = 0; double x = 0;

View file

@ -17,11 +17,11 @@
using namespace std; using namespace std;
using namespace ARDOUR; using namespace ARDOUR;
AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, Gnome::Canvas::Item& parent, AudioRegionGainLine::AudioRegionGainLine (string name, Session& s, AudioRegionView& r, ArdourCanvas::Group& parent,
Curve& c, Curve& c,
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer), bool (*point_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer),
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer)) bool (*line_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer))
: AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback), : AutomationLine (name, r.get_time_axis_view(), parent, c),
session (s), session (s),
rv (r) rv (r)
{ {

View file

@ -17,10 +17,10 @@ class AudioRegionView;
class AudioRegionGainLine : public AutomationLine class AudioRegionGainLine : public AutomationLine
{ {
public: public:
AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, Gnome::Canvas::Item& parent, AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, ArdourCanvas::Group& parent,
ARDOUR::Curve&, ARDOUR::Curve&,
gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer), bool (*point_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer),
gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer)); bool (*line_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer));
void view_to_model_y (double&); void view_to_model_y (double&);
void model_to_view_y (double&); void model_to_view_y (double&);

View file

@ -56,7 +56,7 @@ static const int32_t sync_mark_width = 9;
sigc::signal<void,AudioRegionView*> AudioRegionView::AudioRegionViewGoingAway; sigc::signal<void,AudioRegionView*> AudioRegionView::AudioRegionViewGoingAway;
AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisView &tv, AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView &tv,
AudioRegion& r, AudioRegion& r,
double spu, double spu,
double amplitude_above_axis, double amplitude_above_axis,
@ -70,7 +70,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
region (r) region (r)
{ {
Gnome::Canvas::Points shape; ArdourCanvas::Points shape;
XMLNode *node; XMLNode *node;
editor = 0; editor = 0;
@ -101,7 +101,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this); gtk_object_set_data (GTK_OBJECT(name_highlight), "regionview", this);
gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this); gtk_object_set_data (GTK_OBJECT(name_text), "regionview", this);
// shape = new Gnome::Canvas::Points (); // shape = new ArdourCanvas::Points ();
/* an equilateral triangle */ /* an equilateral triangle */
@ -110,16 +110,16 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
shape.push_back (Gnome::Art::Point (0, sync_mark_width - 1)); shape.push_back (Gnome::Art::Point (0, sync_mark_width - 1));
shape.push_back (Gnome::Art::Point (-((sync_mark_width-1)/2), 1)); shape.push_back (Gnome::Art::Point (-((sync_mark_width-1)/2), 1));
sync_mark = new Gnome::Canvas::Polygon (*group); sync_mark = new ArdourCanvas::Polygon (*group);
sync_mark->property_points().set_value(shape); sync_mark->property_points().set_value(shape);
sync_mark->set_property ("fill_color_rgba", fill_color); sync_mark->set_property ("fill_color_rgba", fill_color);
sync_mark->hide(); sync_mark->hide();
fade_in_shape = new Gnome::Canvas::Polygon (*group); fade_in_shape = new ArdourCanvas::Polygon (*group);
fade_in_shape->set_property ("fill_color_rgba", fade_color); fade_in_shape->set_property ("fill_color_rgba", fade_color);
fade_in_shape->set_data ("regionview", this); fade_in_shape->set_data ("regionview", this);
fade_out_shape = new Gnome::Canvas::Polygon (*group); fade_out_shape = new ArdourCanvas::Polygon (*group);
fade_out_shape->set_property ("fill_color_rgba", fade_color); fade_out_shape->set_property ("fill_color_rgba", fade_color);
fade_out_shape->set_data ("regionview", this); fade_out_shape->set_data ("regionview", this);
@ -130,7 +130,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
UINT_TO_RGBA(fill_color,&r,&g,&b,&a); UINT_TO_RGBA(fill_color,&r,&g,&b,&a);
fade_in_handle = new Gnome::Canvas::SimpleRect (*group); fade_in_handle = new ArdourCanvas::SimpleRect (*group);
fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0)); fade_in_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
fade_in_handle->set_property ("outline_pixels", 0); fade_in_handle->set_property ("outline_pixels", 0);
fade_in_handle->set_property ("y1", 2.0); fade_in_handle->set_property ("y1", 2.0);
@ -138,7 +138,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
fade_in_handle->set_data ("regionview", this); fade_in_handle->set_data ("regionview", this);
fade_out_handle = new Gnome::Canvas::SimpleRect (*group); fade_out_handle = new ArdourCanvas::SimpleRect (*group);
fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0)); fade_out_handle->set_property ("fill_color_rgba", RGBA_TO_UINT(r,g,b,0));
fade_out_handle->set_property ("outline_pixels", 0); fade_out_handle->set_property ("outline_pixels", 0);
fade_out_handle->set_property ("y1", 2.0); fade_out_handle->set_property ("y1", 2.0);
@ -151,7 +151,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
foo += ':'; foo += ':';
foo += "gain"; foo += "gain";
gain_line = new AudioRegionGainLine (foo, tv.session(), *this, &group, region.envelope(), gain_line = new AudioRegionGainLine (foo, tv.session(), *this, *group, region.envelope(),
PublicEditor::canvas_control_point_event, PublicEditor::canvas_control_point_event,
PublicEditor::canvas_line_event); PublicEditor::canvas_line_event);
@ -183,7 +183,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie
fade_in_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_event), fade_in_shape, this)); fade_in_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_event), fade_in_shape, this));
fade_in_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_handle_event), fade_in_handle, this)); fade_in_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_in_handle_event), fade_in_handle, this));
fade_out_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_event)), fade_out_shape, this)); fade_out_shape->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_event), fade_out_shape, this));
fade_out_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_handle_event), fade_out_handle, this)); fade_out_handle->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_fade_out_handle_event), fade_out_handle, this));
set_colors (); set_colors ();
@ -216,7 +216,7 @@ AudioRegionView::~AudioRegionView ()
} }
gint gint
AudioRegionView::_lock_toggle (Gnome::Canvas::Item* item, GdkEvent* ev, void* arg) AudioRegionView::_lock_toggle (ArdourCanvas::Item* item, GdkEvent* ev, void* arg)
{ {
switch (ev->type) { switch (ev->type) {
case GDK_BUTTON_RELEASE: case GDK_BUTTON_RELEASE:
@ -991,7 +991,7 @@ AudioRegionView::create_waves ()
} }
if (create_zero_line) { if (create_zero_line) {
zero_line = new Gnome::Canvas::Line (*group); zero_line = new ArdourCanvas::Line (*group);
zero_line->set_property ("x1", (gdouble) 1.0); zero_line->set_property ("x1", (gdouble) 1.0);
zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0); zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]); zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
@ -1080,7 +1080,7 @@ AudioRegionView::create_one_wave (uint32_t which, bool direct)
tmp_waves.clear (); tmp_waves.clear ();
if (!zero_line) { if (!zero_line) {
zero_line = new Gnome::Canvas::Line (*group); zero_line = new ArdourCanvas::Line (*group);
zero_line->set_property ("x1", (gdouble) 1.0); zero_line->set_property ("x1", (gdouble) 1.0);
zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0); zero_line->set_property ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0);
zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]); zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]);
@ -1096,7 +1096,7 @@ AudioRegionView::peaks_ready_handler (uint32_t which)
} }
void void
AudioRegionView::add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev) AudioRegionView::add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
{ {
double x, y; double x, y;
@ -1140,7 +1140,7 @@ AudioRegionView::add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev)
} }
void void
AudioRegionView::remove_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev) AudioRegionView::remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent *ev)
{ {
ControlPoint *cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point")); ControlPoint *cp = reinterpret_cast<ControlPoint *> (item->get_data ("control_point"));
region.envelope().erase (cp->model); region.envelope().erase (cp->model);

View file

@ -48,7 +48,7 @@ class AutomationTimeAxisView;
class AudioRegionView : public TimeAxisViewItem class AudioRegionView : public TimeAxisViewItem
{ {
public: public:
AudioRegionView (Gnome::Canvas::Group *, AudioRegionView (ArdourCanvas::Group *,
AudioTimeAxisView&, AudioTimeAxisView&,
ARDOUR::AudioRegion&, ARDOUR::AudioRegion&,
double initial_samples_per_unit, double initial_samples_per_unit,
@ -91,8 +91,8 @@ class AudioRegionView : public TimeAxisViewItem
void show_region_editor (); void show_region_editor ();
void hide_region_editor(); void hide_region_editor();
void add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event); void add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event);
void remove_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event); void remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event);
AudioRegionGainLine* get_gain_line() const { return gain_line; } AudioRegionGainLine* get_gain_line() const { return gain_line; }
@ -124,13 +124,13 @@ class AudioRegionView : public TimeAxisViewItem
vector<ArdourCanvas::WaveView *> waves; /* waveviews */ vector<ArdourCanvas::WaveView *> waves; /* waveviews */
vector<ArdourCanvas::WaveView *> tmp_waves; /* see ::create_waves()*/ vector<ArdourCanvas::WaveView *> tmp_waves; /* see ::create_waves()*/
Gnome::Canvas::Polygon* sync_mark; /* polgyon for sync position */ ArdourCanvas::Polygon* sync_mark; /* polgyon for sync position */
Gnome::Canvas::Text* no_wave_msg; /* text */ ArdourCanvas::Text* no_wave_msg; /* text */
Gnome::Canvas::Line* zero_line; /* simpleline */ ArdourCanvas::Line* zero_line; /* simpleline */
Gnome::Canvas::Polygon* fade_in_shape; /* polygon */ ArdourCanvas::Polygon* fade_in_shape; /* polygon */
Gnome::Canvas::Polygon* fade_out_shape; /* polygon */ ArdourCanvas::Polygon* fade_out_shape; /* polygon */
Gnome::Canvas::SimpleRect* fade_in_handle; /* simplerect */ ArdourCanvas::SimpleRect* fade_in_handle; /* simplerect */
Gnome::Canvas::SimpleRect* fade_out_handle; /* simplerect */ ArdourCanvas::SimpleRect* fade_out_handle; /* simplerect */
AudioRegionGainLine* gain_line; AudioRegionGainLine* gain_line;
AudioRegionEditor *editor; AudioRegionEditor *editor;
@ -165,7 +165,7 @@ class AudioRegionView : public TimeAxisViewItem
void region_sync_changed (); void region_sync_changed ();
void region_scale_amplitude_changed (); void region_scale_amplitude_changed ();
static gint _lock_toggle (Gnome::Canvas::Item*, GdkEvent*, void*); static gint _lock_toggle (ArdourCanvas::Item*, GdkEvent*, void*);
void lock_toggle (); void lock_toggle ();
void create_waves (); void create_waves ();

View file

@ -49,7 +49,7 @@ StreamView::StreamView (AudioTimeAxisView& tv)
//canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display),
// gnome_canvas_group_get_type (), // gnome_canvas_group_get_type (),
// NULL); // NULL);
canvas_group = new Gnome::Canvas::Group(GNOME_CANVAS_GROUP(_trackview.canvas_display)); canvas_group = new ArdourCanvas::Group(*_trackview.canvas_display);
//canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group), //canvas_rect = gnome_canvas_item_new (GNOME_CANVAS_GROUP(canvas_group),
// gnome_canvas_simplerect_get_type(), // gnome_canvas_simplerect_get_type(),
@ -61,8 +61,8 @@ StreamView::StreamView (AudioTimeAxisView& tv)
// /* outline ends and bottom */ // /* outline ends and bottom */
// "outline_what", (guint32) (0x1|0x2|0x8), // "outline_what", (guint32) (0x1|0x2|0x8),
// "fill_color_rgba", stream_base_color, // "fill_color_rgba", stream_base_color,
// NULL); // ] NULL);
canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group); canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group);
canvas_rect->set_property ("x1", 0.0); canvas_rect->set_property ("x1", 0.0);
canvas_rect->set_property ("y1", 0.0); canvas_rect->set_property ("y1", 0.0);
canvas_rect->set_property ("x2", 1000000.0); canvas_rect->set_property ("x2", 1000000.0);
@ -670,7 +670,7 @@ StreamView::setup_rec_box ()
gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos); gdouble xstart = _trackview.editor.frame_to_pixel (frame_pos);
gdouble xend = xstart; gdouble xend = xstart;
Gnome::Canvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group); ArdourCanvas::SimpleRect * rec_rect = new Gnome::Canvas::SimpleRect (*canvas_group);
rec_rect->set_property ("x1", xstart); rec_rect->set_property ("x1", xstart);
rec_rect->set_property ("y1", 1.0); rec_rect->set_property ("y1", 1.0);
rec_rect->set_property ("x2", xend); rec_rect->set_property ("x2", xend);
@ -857,7 +857,7 @@ StreamView::update_rec_regions ()
} }
/* also update rect */ /* also update rect */
Gnome::Canvas::Item * rect = rec_rects[n].rectangle; ArdourCanvas::Item * rect = rec_rects[n].rectangle;
gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length()); gdouble xend = _trackview.editor.frame_to_pixel (region->position() + region->length());
rect->set_property ("x2", xend); rect->set_property ("x2", xend);
} }
@ -882,7 +882,7 @@ StreamView::update_rec_regions ()
} }
/* also hide rect */ /* also hide rect */
Gnome::Canvas::Item * rect = rec_rects[n].rectangle; ArdourCanvas::Item * rect = rec_rects[n].rectangle;
rect->hide(); rect->hide();
} }

View file

@ -26,11 +26,11 @@
#include <cmath> #include <cmath>
#include <gtkmm.h> #include <gtkmm.h>
#include <libgnomecanvasmm/libgnomecanvasmm.h>
#include <ardour/location.h> #include <ardour/location.h>
#include "enums.h" #include "enums.h"
#include "simplerect.h" #include "simplerect.h"
#include "canvas.h"
namespace ARDOUR { namespace ARDOUR {
class Route; class Route;
@ -42,7 +42,7 @@ namespace ARDOUR {
} }
struct RecBoxInfo { struct RecBoxInfo {
Gnome::Canvas::SimpleRect* rectangle; ArdourCanvas::SimpleRect* rectangle;
jack_nframes_t start; jack_nframes_t start;
jack_nframes_t length; jack_nframes_t length;
}; };
@ -79,7 +79,7 @@ class StreamView : public sigc::trackable
void set_show_waveforms (bool yn); void set_show_waveforms (bool yn);
void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; } void set_show_waveforms_recording (bool yn) { use_rec_regions = yn; }
Gnome::Canvas::Item* canvas_item() { return canvas_group; } ArdourCanvas::Item* canvas_item() { return canvas_group; }
sigc::signal<void,AudioRegionView*> AudioRegionViewAdded; sigc::signal<void,AudioRegionView*> AudioRegionViewAdded;
@ -111,8 +111,8 @@ class StreamView : public sigc::trackable
private: private:
AudioTimeAxisView& _trackview; AudioTimeAxisView& _trackview;
Gnome::Canvas::Group* canvas_group; ArdourCanvas::Group* canvas_group;
Gnome::Canvas::SimpleRect* canvas_rect; /* frame around the whole thing */ ArdourCanvas::SimpleRect* canvas_rect; /* frame around the whole thing */
typedef list<AudioRegionView* > AudioRegionViewList; typedef list<AudioRegionView* > AudioRegionViewList;
AudioRegionViewList region_views; AudioRegionViewList region_views;

View file

@ -61,7 +61,7 @@ const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ;
* @param start the start point of this item * @param start the start point of this item
* @param duration the duration of this item * @param duration the duration of this item
*/ */
TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, TimeAxisViewItem::TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
jack_nframes_t start, jack_nframes_t duration, jack_nframes_t start, jack_nframes_t duration,
Visibility visibility) Visibility visibility)
: trackview (tv) : trackview (tv)
@ -87,9 +87,9 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
warning << "Time Axis Item Duration == 0" << endl ; warning << "Time Axis Item Duration == 0" << endl ;
} }
group = new Gnome::Canvas::Group (parent); group = new ArdourCanvas::Group (parent);
vestigial_frame = new Gnome::Canvas::SimpleRect (*group); vestigial_frame = new ArdourCanvas::SimpleRect (*group);
vestigial_frame->set_property ("x1", (double) 0.0); vestigial_frame->set_property ("x1", (double) 0.0);
vestigial_frame->set_property ("y1", (double) 1.0); vestigial_frame->set_property ("y1", (double) 1.0);
vestigial_frame->set_property ("x2", 2.0); vestigial_frame->set_property ("x2", 2.0);
@ -99,7 +99,7 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
vestigial_frame->hide (); vestigial_frame->hide ();
if (visibility & ShowFrame) { if (visibility & ShowFrame) {
frame = new Gnome::Canvas::SimpleRect (*group); frame = new ArdourCanvas::SimpleRect (*group);
frame->set_property ("x1", (double) 0.0); frame->set_property ("x1", (double) 0.0);
frame->set_property ("y1", (double) 1.0); frame->set_property ("y1", (double) 1.0);
frame->set_property ("x2", (double) trackview.editor.frame_to_pixel(duration)); frame->set_property ("x2", (double) trackview.editor.frame_to_pixel(duration));
@ -112,7 +112,7 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
} }
if (visibility & ShowNameHighlight) { if (visibility & ShowNameHighlight) {
name_highlight = new Gnome::Canvas::SimpleRect (*group); name_highlight = new ArdourCanvas::SimpleRect (*group);
name_highlight->set_property ("x1", (double) 1.0); name_highlight->set_property ("x1", (double) 1.0);
name_highlight->set_property ("x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1); name_highlight->set_property ("x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1);
name_highlight->set_property ("y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE)); name_highlight->set_property ("y1", (double) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
@ -127,7 +127,7 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
} }
if (visibility & ShowNameText) { if (visibility & ShowNameText) {
name_text = new Gnome::Canvas::Text (*group); name_text = new ArdourCanvas::Text (*group);
name_text->set_property ("x", (double) TimeAxisViewItem::NAME_X_OFFSET); name_text->set_property ("x", (double) TimeAxisViewItem::NAME_X_OFFSET);
name_text->set_property ("y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET); name_text->set_property ("y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET);
name_text->set_property ("font", NAME_FONT); name_text->set_property ("font", NAME_FONT);
@ -142,7 +142,7 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
/* create our grab handles used for trimming/duration etc */ /* create our grab handles used for trimming/duration etc */
if (visibility & ShowHandles) { if (visibility & ShowHandles) {
frame_handle_start = new Gnome::Canvas::SimpleRect (*group); frame_handle_start = new ArdourCanvas::SimpleRect (*group);
frame_handle_start->set_property ("x1", (double) 0.0); frame_handle_start->set_property ("x1", (double) 0.0);
frame_handle_start->set_property ("x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH); frame_handle_start->set_property ("x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH);
frame_handle_start->set_property ("y1", (double) 1.0); frame_handle_start->set_property ("y1", (double) 1.0);
@ -150,7 +150,7 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa
frame_handle_start->set_property ("outline_color_rgba", color_map[cFrameHandleStartOutline]); frame_handle_start->set_property ("outline_color_rgba", color_map[cFrameHandleStartOutline]);
frame_handle_start->set_property ("fill_color_rgba", color_map[cFrameHandleStartFill]); frame_handle_start->set_property ("fill_color_rgba", color_map[cFrameHandleStartFill]);
frame_handle_end = new Gnome::Canvas::SimpleRect (*group); frame_handle_end = new ArdourCanvas::SimpleRect (*group);
frame_handle_end->set_property ("x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH)); frame_handle_end->set_property ("x1", (double) (trackview.editor.frame_to_pixel(get_duration())) - (TimeAxisViewItem::GRAB_HANDLE_LENGTH));
frame_handle_end->set_property ("x2", (double) trackview.editor.frame_to_pixel(get_duration())); frame_handle_end->set_property ("x2", (double) trackview.editor.frame_to_pixel(get_duration()));
frame_handle_end->set_property ("y1", (double) 1); frame_handle_end->set_property ("y1", (double) 1);
@ -554,7 +554,7 @@ TimeAxisViewItem::set_color(Gdk::Color& base_color)
/** /**
* *
*/ */
Gnome::Canvas::Item* ArdourCanvas::Item*
TimeAxisViewItem::get_canvas_frame() TimeAxisViewItem::get_canvas_frame()
{ {
return(frame) ; return(frame) ;
@ -563,7 +563,7 @@ TimeAxisViewItem::get_canvas_frame()
/** /**
* *
*/ */
Gnome::Canvas::Item* ArdourCanvas::Item*
TimeAxisViewItem::get_canvas_group() TimeAxisViewItem::get_canvas_group()
{ {
return(group) ; return(group) ;
@ -572,7 +572,7 @@ TimeAxisViewItem::get_canvas_group()
/** /**
* *
*/ */
Gnome::Canvas::Item* ArdourCanvas::Item*
TimeAxisViewItem::get_name_highlight() TimeAxisViewItem::get_name_highlight()
{ {
return(name_highlight) ; return(name_highlight) ;
@ -581,7 +581,7 @@ TimeAxisViewItem::get_name_highlight()
/** /**
* *
*/ */
Gnome::Canvas::Text* ArdourCanvas::Text*
TimeAxisViewItem::get_name_text() TimeAxisViewItem::get_name_text()
{ {
return(name_text) ; return(name_text) ;

View file

@ -30,6 +30,7 @@
#include "selectable.h" #include "selectable.h"
#include "simplerect.h" #include "simplerect.h"
#include "canvas.h"
class TimeAxisView; class TimeAxisView;
@ -223,22 +224,22 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
/** /**
* *
*/ */
Gnome::Canvas::Item* get_canvas_frame() ; ArdourCanvas::Item* get_canvas_frame() ;
/** /**
* *
*/ */
Gnome::Canvas::Item* get_canvas_group(); ArdourCanvas::Item* get_canvas_group();
/** /**
* *
*/ */
Gnome::Canvas::Item* get_name_highlight(); ArdourCanvas::Item* get_name_highlight();
/** /**
* *
*/ */
Gnome::Canvas::Text* get_name_text(); ArdourCanvas::Text* get_name_text();
/** /**
@ -339,7 +340,7 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
* @param start the start point of this item * @param start the start point of this item
* @param duration the duration of this item * @param duration the duration of this item
*/ */
TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color, TimeAxisViewItem(std::string it_name, ArdourCanvas::Group& parent, TimeAxisView& tv, double spu, Gdk::Color& base_color,
jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0)); jack_nframes_t start, jack_nframes_t duration, Visibility v = Visibility (0));
/** /**
@ -445,13 +446,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable
uint32_t lock_handle_color_g ; uint32_t lock_handle_color_g ;
uint32_t lock_handle_color_b ; uint32_t lock_handle_color_b ;
Gnome::Canvas::Group* group; ArdourCanvas::Group* group;
Gnome::Canvas::SimpleRect* vestigial_frame; ArdourCanvas::SimpleRect* vestigial_frame;
Gnome::Canvas::SimpleRect* frame; ArdourCanvas::SimpleRect* frame;
Gnome::Canvas::Text* name_text; ArdourCanvas::Text* name_text;
Gnome::Canvas::SimpleRect* name_highlight; ArdourCanvas::SimpleRect* name_highlight;
Gnome::Canvas::SimpleRect* frame_handle_start; ArdourCanvas::SimpleRect* frame_handle_start;
Gnome::Canvas::SimpleRect* frame_handle_end; ArdourCanvas::SimpleRect* frame_handle_end;
}; /* class TimeAxisViewItem */ }; /* class TimeAxisViewItem */

View file

@ -302,7 +302,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
return (savergb); return (savergb);
} }
Gnome::Canvas::Points* ArdourCanvas::Points*
get_canvas_points (string who, uint32_t npoints) get_canvas_points (string who, uint32_t npoints)
{ {
// cerr << who << ": wants " << npoints << " canvas points" << endl; // cerr << who << ": wants " << npoints << " canvas points" << endl;
@ -311,7 +311,7 @@ get_canvas_points (string who, uint32_t npoints)
abort (); abort ();
} }
#endif #endif
return new Gnome::Canvas::Points (npoints); return new ArdourCanvas::Points (npoints);
} }
int int

View file

@ -27,7 +27,7 @@
#include <ardour/types.h> #include <ardour/types.h>
#include <libgnomecanvasmm/line.h> #include <libgnomecanvasmm/line.h>
#include <gdkmm/types.h> #include <gdkmm/types.h>
#include "canvas.h"
namespace Gtk { namespace Gtk {
class Window; class Window;
class ComboBoxText; class ComboBoxText;
@ -63,7 +63,7 @@ void allow_keyboard_focus (bool);
unsigned char* xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h); unsigned char* xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h);
unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h); unsigned char* xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h);
Gnome::Canvas::Points* get_canvas_points (std::string who, uint32_t npoints); ArdourCanvas::Points* get_canvas_points (std::string who, uint32_t npoints);
int channel_combo_get_channel_count (Gtk::ComboBoxText& combo); int channel_combo_get_channel_count (Gtk::ComboBoxText& combo);
Pango::FontDescription get_font_for_style (std::string widgetname); Pango::FontDescription get_font_for_style (std::string widgetname);