From 54a80321064aa543023cd0b224ba9d433520983f Mon Sep 17 00:00:00 2001 From: Nick Mainsbridge Date: Wed, 23 Nov 2005 17:21:12 +0000 Subject: Gnome::Canvas -> ArdourCanvas and some other small fixes git-svn-id: svn://localhost/trunk/ardour2@107 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/automation_gain_line.cc | 2 +- gtk2_ardour/automation_line.cc | 6 +- gtk2_ardour/automation_line.h | 23 ++--- gtk2_ardour/automation_pan_line.cc | 2 +- gtk2_ardour/automation_pan_line.h | 2 +- gtk2_ardour/crossfade_edit.cc | 6 +- gtk2_ardour/crossfade_view.cc | 2 +- gtk2_ardour/crossfade_view.h | 10 +-- gtk2_ardour/editor.cc | 62 +++++++------- gtk2_ardour/editor_actions.cc | 2 +- gtk2_ardour/editor_imageframe.cc | 38 ++++----- gtk2_ardour/editor_markers.cc | 11 +-- gtk2_ardour/editor_mixer.cc | 4 +- gtk2_ardour/editor_mouse.cc | 120 +++++++++++++-------------- gtk2_ardour/editor_route_list.cc | 2 +- gtk2_ardour/editor_tempodisplay.cc | 16 ++-- gtk2_ardour/editor_timefx.cc | 3 +- gtk2_ardour/export_dialog.cc | 3 +- gtk2_ardour/gain_automation_time_axis.cc | 4 +- gtk2_ardour/ghostregion.cc | 4 +- gtk2_ardour/glade/new_session_dialog.glade | 4 +- gtk2_ardour/imageframe.cc | 4 +- gtk2_ardour/imageframe.h | 4 +- gtk2_ardour/imageframe_time_axis.cc | 4 +- gtk2_ardour/imageframe_time_axis_group.cc | 2 +- gtk2_ardour/imageframe_view.cc | 4 +- gtk2_ardour/imageframe_view.h | 2 +- gtk2_ardour/marker.cc | 35 ++++---- gtk2_ardour/marker.h | 25 +++--- gtk2_ardour/marker_time_axis_view.cc | 6 +- gtk2_ardour/marker_time_axis_view.h | 8 +- gtk2_ardour/marker_view.cc | 4 +- gtk2_ardour/marker_view.h | 5 +- gtk2_ardour/pan_automation_time_axis.cc | 2 +- gtk2_ardour/plugin_ui.cc | 8 +- gtk2_ardour/redirect_automation_line.cc | 10 ++- gtk2_ardour/redirect_automation_time_axis.cc | 2 +- gtk2_ardour/region_gain_line.cc | 8 +- gtk2_ardour/region_gain_line.h | 6 +- gtk2_ardour/regionview.cc | 30 +++---- gtk2_ardour/regionview.h | 22 ++--- gtk2_ardour/streamview.cc | 12 +-- gtk2_ardour/streamview.h | 10 +-- gtk2_ardour/time_axis_view_item.cc | 24 +++--- gtk2_ardour/time_axis_view_item.h | 25 +++--- gtk2_ardour/utils.cc | 4 +- gtk2_ardour/utils.h | 4 +- 47 files changed, 300 insertions(+), 296 deletions(-) (limited to 'gtk2_ardour') diff --git a/gtk2_ardour/automation_gain_line.cc b/gtk2_ardour/automation_gain_line.cc index 58dc502520..d4db4d25d7 100644 --- a/gtk2_ardour/automation_gain_line.cc +++ b/gtk2_ardour/automation_gain_line.cc @@ -32,7 +32,7 @@ using namespace std; 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), session (s) diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc index da208489f4..f168a9f9f0 100644 --- a/gtk2_ardour/automation_line.cc +++ b/gtk2_ardour/automation_line.cc @@ -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), _name (name), alist (al), @@ -231,11 +231,11 @@ AutomationLine::AutomationLine (string name, TimeAxisView& tv, Gnome::Canvas::Gr terminal_points_can_slide = true; _height = 0; - group = new Gnome::Canvas::Group (parent); + group = new ArdourCanvas::Group (parent); group->set_property ("x", 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->signal_event().connect (mem_fun (*this, &AutomationLine::event_handler)); diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index ed3ad05b16..0567abba05 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -27,9 +27,10 @@ #include #include -#include +#include #include - +#include "canvas.h" +#include "simplerect.h" #include #include @@ -77,7 +78,7 @@ class ControlPoint void set_size (double); void set_visible (bool); - Gnome::Canvas::SimpleRect* item; + ArdourCanvas::SimpleRect* item; AutomationLine& line; uint32_t view_index; ARDOUR::AutomationList::iterator model; @@ -97,7 +98,7 @@ class ControlPoint class AutomationLine : public sigc::trackable { public: - AutomationLine (string name, TimeAxisView&, Gnome::Canvas::Group&, ARDOUR::AutomationList&); + AutomationLine (string name, TimeAxisView&, ArdourCanvas::Group&, ARDOUR::AutomationList&); virtual ~AutomationLine (); void queue_reset (); @@ -137,9 +138,9 @@ class AutomationLine : public sigc::trackable TimeAxisView& trackview; - Gnome::Canvas::Group& canvas_group() const { return *group; } - Gnome::Canvas::Item& parent_group() const { return _parent_group; } - Gnome::Canvas::Item& grab_item() const { return *line; } + ArdourCanvas::Group& canvas_group() const { return *group; } + ArdourCanvas::Item& parent_group() const { return _parent_group; } + ArdourCanvas::Item& grab_item() const { return *line; } void show_selection(); void hide_selection (); @@ -171,10 +172,10 @@ class AutomationLine : public sigc::trackable bool no_draw : 1; bool points_visible : 1; - Gnome::Canvas::Group& _parent_group; - Gnome::Canvas::Group* group; - Gnome::Canvas::Line* line; /* line */ - Gnome::Canvas::Points line_points; /* coordinates for canvas line */ + ArdourCanvas::Group& _parent_group; + ArdourCanvas::Group* group; + ArdourCanvas::Line* line; /* line */ + ArdourCanvas::Points line_points; /* coordinates for canvas line */ vector control_points; /* visible control points */ struct ALPoint { diff --git a/gtk2_ardour/automation_pan_line.cc b/gtk2_ardour/automation_pan_line.cc index 0bdbdef3f4..5493ac5301 100644 --- a/gtk2_ardour/automation_pan_line.cc +++ b/gtk2_ardour/automation_pan_line.cc @@ -32,7 +32,7 @@ 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), session (s) diff --git a/gtk2_ardour/automation_pan_line.h b/gtk2_ardour/automation_pan_line.h index a8535da71b..13f31a4e63 100644 --- a/gtk2_ardour/automation_pan_line.h +++ b/gtk2_ardour/automation_pan_line.h @@ -16,7 +16,7 @@ class TimeAxisView; class AutomationPanLine : public AutomationLine { 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 model_to_view_y (double&); diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc index f244e337f1..ffef903d9a 100644 --- a/gtk2_ardour/crossfade_edit.cc +++ b/gtk2_ardour/crossfade_edit.cc @@ -660,8 +660,8 @@ CrossfadeEditor::redraw () fade[current].normative_curve.get_vector (0, 1.0, vec, npoints); - Gnome::Canvas::Points pts; - Gnome::Canvas::Points spts; + ArdourCanvas::Points pts; + ArdourCanvas::Points spts; while (pts.size() < npoints) { pts.push_back (Gnome::Art::Point (0,0)); @@ -729,7 +729,7 @@ CrossfadeEditor::redraw () fade[current].line->property_points() = pts; fade[current].shading->property_points() = spts; - for (vector::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) { + for (vector::iterator i = fade[current].waves.begin(); i != fade[current].waves.end(); ++i) { (*i)->property_gain_src() = &fade[current].gain_curve; } } diff --git a/gtk2_ardour/crossfade_view.cc b/gtk2_ardour/crossfade_view.cc index 75dd3008fd..f81e95a4a9 100644 --- a/gtk2_ardour/crossfade_view.cc +++ b/gtk2_ardour/crossfade_view.cc @@ -40,7 +40,7 @@ using namespace Canvas; sigc::signal CrossfadeView::GoingAway; -CrossfadeView::CrossfadeView (Gnome::Canvas::Group *parent, +CrossfadeView::CrossfadeView (ArdourCanvas::Group *parent, AudioTimeAxisView &tv, Crossfade& xf, double spu, diff --git a/gtk2_ardour/crossfade_view.h b/gtk2_ardour/crossfade_view.h index ef137bef78..deb33e4476 100644 --- a/gtk2_ardour/crossfade_view.h +++ b/gtk2_ardour/crossfade_view.h @@ -34,7 +34,7 @@ class AudioRegionView; struct CrossfadeView : public TimeAxisViewItem { - CrossfadeView (Gnome::Canvas::Group*, + CrossfadeView (ArdourCanvas::Group*, AudioTimeAxisView&, ARDOUR::Crossfade&, double initial_samples_per_unit, @@ -71,10 +71,10 @@ struct CrossfadeView : public TimeAxisViewItem double spu; - Gnome::Canvas::Item *overlap_rect; - Gnome::Canvas::Line *fade_in; - Gnome::Canvas::Line *fade_out; - Gnome::Canvas::Item *active_button; + ArdourCanvas::Item *overlap_rect; + ArdourCanvas::Line *fade_in; + ArdourCanvas::Line *fade_out; + ArdourCanvas::Item *active_button; void crossfade_changed (ARDOUR::Change); void active_changed (); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b1307e3989..286a0f5df4 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -798,7 +798,7 @@ Editor::left_track_canvas (GdkEventCrossing *ev) void Editor::initialize_canvas () { - Gnome::Canvas::init (); + ArdourCanvas::init (); /* adjust sensitivity for "picking" items */ @@ -825,7 +825,7 @@ Editor::initialize_canvas () 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 ("anchor", GTK_ANCHOR_NW); 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 */ - time_line_group = new Gnome::Canvas::Group (*track_canvas.root(), 0.0, 0.0); - cursor_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 ArdourCanvas::Group (*track_canvas.root(), 0.0, 0.0); time_canvas.set_name ("EditorTimeCanvas"); time_canvas.add_events (Gdk::POINTER_MOTION_HINT_MASK); - meter_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, 0.0); - tempo_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, 0.0); - marker_group = new Gnome::Canvas::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); - transport_marker_group = new Gnome::Canvas::Group (*time_canvas.root(), 0.0, timebar_height * 4.0); + meter_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0); + tempo_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, 0.0); + marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 2.0); + range_marker_group = new ArdourCanvas::Group (*time_canvas.root(), 0.0, timebar_height * 3.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 ("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 ("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 ("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 ("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 ("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 ("outline_color_rgba", color_map[cRangeDragBarRect]); range_bar_drag_rect->set_property ("outline_pixels", 0); 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 ("outline_color_rgba", color_map[cTransportDragRect]); 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 = 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("fill_color_rgba", color_map[cMarkerDragLine]); marker_drag_line->set_property("points", marker_drag_line_points->gobj()); 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 ("outline_color_rgba", color_map[cRangeDragRect]); 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 ("outline_color_rgba", color_map[cTransportLoopRect]); transport_loop_range_rect->set_property ("outline_pixels", 1); 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 ("outline_color_rgba", color_map[cTransportPunchRect]); 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_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 ("y1", 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->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 ("y1", 0.0); transport_punchout_line->set_property ("x2", 0.0); @@ -926,7 +926,7 @@ Editor::initialize_canvas () transport_punchout_line->hide(); // 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 ("outline_color_rgba", color_map[cZoomRect]); 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)); // 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 ("fill_color_rgba", (guint32) color_map[cRubberBandRectFill]); 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(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 ("fill_color", Gdk::Color ("#000000")); 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 = 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 ("fill_color", Gdk::Color ("#000000")); 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 = 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 ("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 ("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 ("fill_color", Gdk::Color ("#000000")); @@ -1257,7 +1257,7 @@ Editor::track_canvas_allocate (Gtk::Allocation alloc) strcpy (txt, _(txt1)); 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 ("fill_color_rgba", color_map[cFirstActionMessage]); first_action_message->set_property ("x", (gdouble) (canvas_width - pixel_width) / 2.0); @@ -1767,7 +1767,7 @@ Editor::build_cursors () } 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; AudioRegionView* arv = static_cast (gtk_object_get_data (GTK_OBJECT(item), "regionview")); diff --git a/gtk2_ardour/editor_actions.cc b/gtk2_ardour/editor_actions.cc index d9b337853e..241e2cd046 100644 --- a/gtk2_ardour/editor_actions.cc +++ b/gtk2_ardour/editor_actions.cc @@ -4,7 +4,7 @@ #include "editor.h" #include "editing.h" #include "actions.h" - +#include "ardour_ui.h" #include "i18n.h" using namespace Gtk; diff --git a/gtk2_ardour/editor_imageframe.cc b/gtk2_ardour/editor_imageframe.cc index 4b1636fb4b..391a9972f0 100644 --- a/gtk2_ardour/editor_imageframe.cc +++ b/gtk2_ardour/editor_imageframe.cc @@ -119,7 +119,7 @@ Editor::add_imageframe_marker_time_axis(std::string track_name, TimeAxisView* ma } 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(clicked_trackview) ; @@ -136,7 +136,7 @@ Editor::popup_imageframe_edit_menu(int button, int32_t time, Gnome::Canvas::Item } 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(clicked_trackview) ; @@ -420,7 +420,7 @@ Editor::canvas_markerview_end_handle_event (GdkEvent* event, ArdourCanvas::Item* /* */ 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() ; drag_info.copy = false ; @@ -453,7 +453,7 @@ Editor::start_imageframe_grab(Gnome::Canvas::Item* item, GdkEvent* event) 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() ; drag_info.copy = false ; @@ -486,7 +486,7 @@ Editor::start_markerview_grab(Gnome::Canvas::Item* item, GdkEvent* event) void -Editor::markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) +Editor::markerview_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event) { double cx, cy ; @@ -533,7 +533,7 @@ Editor::markerview_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) } void -Editor::imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) +Editor::imageframe_drag_motion_callback(ArdourCanvas::Item*, GdkEvent* event) { double cx, cy ; @@ -572,7 +572,7 @@ Editor::imageframe_drag_motion_callback(Gnome::Canvas::Item*, GdkEvent* event) } 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 ; TimeAxisViewItem* tavi = reinterpret_cast(drag_info.data) ; @@ -610,7 +610,7 @@ Editor::timeaxis_item_drag_finished_callback(Gnome::Canvas::Item*, GdkEvent* eve 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 ImageFrameTimeAxis* ifta = dynamic_cast(clicked_trackview) ; @@ -640,7 +640,7 @@ Editor::imageframe_start_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) } 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 ImageFrameTimeAxis* ifta = dynamic_cast(clicked_trackview) ; @@ -672,7 +672,7 @@ Editor::imageframe_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event) } 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 (drag_info.data) ; @@ -743,7 +743,7 @@ Editor::imageframe_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* } 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 (drag_info.data) ; @@ -763,7 +763,7 @@ Editor::imageframe_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* ev } 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 (drag_info.data) ; @@ -822,7 +822,7 @@ Editor::imageframe_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* e 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 (drag_info.data) ; @@ -844,7 +844,7 @@ Editor::imageframe_end_handle_end_trim (Gnome::Canvas::Item* item, GdkEvent* eve 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(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 -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(clicked_trackview)->get_view()->get_selected_time_axis_item() ; if (mv == 0) @@ -894,7 +894,7 @@ Editor::markerview_item_end_handle_op(Gnome::Canvas::Item* item, GdkEvent* event 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 (drag_info.data) ; @@ -968,7 +968,7 @@ Editor::markerview_start_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* } 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 (drag_info.data) ; @@ -988,7 +988,7 @@ Editor::markerview_start_handle_end_trim(Gnome::Canvas::Item* item, GdkEvent* ev } 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 (drag_info.data) ; @@ -1064,7 +1064,7 @@ Editor::markerview_end_handle_trim_motion(Gnome::Canvas::Item* item, GdkEvent* e 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 (drag_info.data) ; diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc index e5b7bbaab2..91391b2c13 100644 --- a/gtk2_ardour/editor_markers.cc +++ b/gtk2_ardour/editor_markers.cc @@ -30,6 +30,7 @@ #include "editor.h" #include "marker.h" #include "selection.h" +#include "simplerect.h" #include "editing.h" #include "gui_thread.h" @@ -293,7 +294,7 @@ Editor::mouse_add_new_marker (jack_nframes_t where) } void -Editor::remove_marker (Gnome::Canvas::Item& item, GdkEvent* event) +Editor::remove_marker (ArdourCanvas::Item& item, GdkEvent* event) { Marker* marker; bool is_start; @@ -356,7 +357,7 @@ Editor::location_gone (Location *location) } 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) { build_tm_marker_menu (); @@ -369,7 +370,7 @@ Editor::tm_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) void -Editor::marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) +Editor::marker_context_menu (GdkEventButton* ev, ArdourCanvas::Item* item) { Marker * marker; if ((marker = reinterpret_cast (gtk_object_get_data (GTK_OBJECT(item), "marker"))) == 0) { @@ -412,7 +413,7 @@ Editor::marker_context_menu (GdkEventButton* ev, Gnome::Canvas::Item* item) 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) { build_new_transport_marker_menu (); @@ -423,7 +424,7 @@ Editor::new_transport_marker_context_menu (GdkEventButton* ev, Gnome::Canvas::It } 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) { build_transport_marker_menu (); diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index f297837538..77d73de588 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -161,7 +161,7 @@ Editor::update_current_screen () if (_follow_playhead) { - playhead_cursor->canvas_item->show(); + playhead_cursor->canvas_item.show(); if (frame != last_update_frame) { 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 < leftmost_frame || frame > leftmost_frame + current_page_frames()) { - playhead_cursor->canvas_item->hide(); + playhead_cursor->canvas_item.hide(); } else { playhead_cursor->set_position (frame); } diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index 802290a782..fceb3a1604 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -283,7 +283,7 @@ Editor::step_mouse_mode (bool next) } 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); @@ -781,7 +781,7 @@ Editor::button_press_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemTy } 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); @@ -1116,7 +1116,7 @@ Editor::maybe_autoscroll (GdkEvent* event) } 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; Marker * marker; @@ -1314,7 +1314,7 @@ Editor::enter_handler (Gnome::Canvas::Item* item, GdkEvent* event, ItemType item } 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; ControlPoint* cp; @@ -1437,7 +1437,7 @@ Editor::left_automation_track () } 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; @@ -1606,7 +1606,7 @@ Editor::start_grab (GdkEvent* event, Gdk::Cursor *cursor) } bool -Editor::end_grab (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::end_grab (ArdourCanvas::Item* item, GdkEvent* event) { bool did_drag = false; @@ -1675,7 +1675,7 @@ Editor::set_playhead_cursor (GdkEvent* event) } 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.motion_callback = &Editor::fade_in_drag_motion_callback; @@ -1694,7 +1694,7 @@ Editor::start_fade_in_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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(drag_info.data); jack_nframes_t pos; @@ -1727,7 +1727,7 @@ Editor::fade_in_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event } 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; @@ -1765,7 +1765,7 @@ Editor::fade_in_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* eve } 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.motion_callback = &Editor::fade_out_drag_motion_callback; @@ -1784,7 +1784,7 @@ Editor::start_fade_out_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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(drag_info.data); jack_nframes_t pos; @@ -1819,7 +1819,7 @@ Editor::fade_out_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* even } 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; @@ -1858,7 +1858,7 @@ Editor::fade_out_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* ev } 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.motion_callback = &Editor::cursor_drag_motion_callback; @@ -1885,7 +1885,7 @@ Editor::start_cursor_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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; jack_nframes_t adjusted_frame; @@ -1918,7 +1918,7 @@ Editor::cursor_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) } 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; @@ -1952,7 +1952,7 @@ Editor::update_marker_drag_item (Location *location) } void -Editor::start_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::start_marker_grab (ArdourCanvas::Item* item, GdkEvent* event) { Marker* marker; @@ -1991,7 +1991,7 @@ Editor::start_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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; Marker* marker = (Marker *) drag_info.data; @@ -2070,7 +2070,7 @@ Editor::marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { marker_drag_motion_callback (item, event); @@ -2089,7 +2089,7 @@ Editor::marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* even } void -Editor::start_meter_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::start_meter_marker_grab (ArdourCanvas::Item* item, GdkEvent* event) { Marker* marker; MeterMarker* meter_marker; @@ -2120,7 +2120,7 @@ Editor::start_meter_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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; jack_nframes_t adjusted_frame; @@ -2148,7 +2148,7 @@ Editor::meter_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* } 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; @@ -2168,7 +2168,7 @@ Editor::meter_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent } void -Editor::start_tempo_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::start_tempo_marker_grab (ArdourCanvas::Item* item, GdkEvent* event) { Marker* marker; TempoMarker* tempo_marker; @@ -2201,7 +2201,7 @@ Editor::start_tempo_marker_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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; jack_nframes_t adjusted_frame; @@ -2230,7 +2230,7 @@ Editor::tempo_marker_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* } 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; @@ -2250,7 +2250,7 @@ Editor::tempo_marker_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent } 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; @@ -2269,7 +2269,7 @@ Editor::remove_gain_control_point (Gnome::Canvas::Item*item, GdkEvent* event) } void -Editor::remove_control_point (Gnome::Canvas::Item*item, GdkEvent* event) +Editor::remove_control_point (ArdourCanvas::Item*item, GdkEvent* event) { ControlPoint* control_point; @@ -2282,7 +2282,7 @@ Editor::remove_control_point (Gnome::Canvas::Item*item, GdkEvent* event) } 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; @@ -2308,7 +2308,7 @@ Editor::start_control_point_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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 (drag_info.data); @@ -2360,7 +2360,7 @@ Editor::control_point_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* } 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 (drag_info.data); control_point_drag_motion_callback (item, event); @@ -2368,7 +2368,7 @@ Editor::control_point_drag_finished_callback (Gnome::Canvas::Item* item, GdkEven } 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) { case MouseGain: @@ -2380,7 +2380,7 @@ Editor::start_line_grab_from_regionview (Gnome::Canvas::Item* item, GdkEvent* ev } 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; @@ -2431,7 +2431,7 @@ Editor::start_line_grab (AutomationLine* line, GdkEvent* event) } 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 (drag_info.data); double cx = drag_info.current_pointer_x; @@ -2456,7 +2456,7 @@ Editor::line_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) } 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 (drag_info.data); line_drag_motion_callback (item, event); @@ -2464,7 +2464,7 @@ Editor::line_drag_finished_callback (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { return; @@ -2498,7 +2498,7 @@ Editor::start_region_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { return; @@ -2580,7 +2580,7 @@ Editor::start_region_copy_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { return; @@ -2613,7 +2613,7 @@ Editor::start_region_brush_grab (Gnome::Canvas::Item* item, GdkEvent* event) } 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 y_delta = 0; @@ -3048,7 +3048,7 @@ Editor::region_drag_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) } 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; AudioRegionView* rv = reinterpret_cast (drag_info.data); @@ -3389,7 +3389,7 @@ Editor::collect_new_region_view (AudioRegionView* rv) } void -Editor::start_selection_grab (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::start_selection_grab (ArdourCanvas::Item* item, GdkEvent* event) { if (clicked_regionview == 0) { return; @@ -3468,7 +3468,7 @@ Editor::cancel_selection () } 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 end = 0; @@ -3523,7 +3523,7 @@ Editor::start_selection_op (Gnome::Canvas::Item* item, GdkEvent* event, Selectio } 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 end = 0; @@ -3653,7 +3653,7 @@ Editor::drag_selection (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { drag_selection (item, event); @@ -3678,7 +3678,7 @@ Editor::end_selection_op (Gnome::Canvas::Item* item, GdkEvent* event) } void -Editor::start_trim (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::start_trim (ArdourCanvas::Item* item, GdkEvent* event) { double speed = 1.0; TimeAxisView* tvp = clicked_trackview; @@ -3728,7 +3728,7 @@ Editor::start_trim (Gnome::Canvas::Item* item, GdkEvent* event) } void -Editor::trim_motion_callback (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::trim_motion_callback (ArdourCanvas::Item* item, GdkEvent* event) { AudioRegionView* rv = clicked_regionview; jack_nframes_t frame_delta = 0; @@ -3954,7 +3954,7 @@ Editor::single_end_trim (AudioRegionView& rv, jack_nframes_t frame_delta, bool l } 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) { trim_motion_callback (item, event); @@ -4066,7 +4066,7 @@ Editor::thaw_region_after_trim (AudioRegionView& rv) } void -Editor::hide_marker (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::hide_marker (ArdourCanvas::Item* item, GdkEvent* event) { Marker* marker; bool is_start; @@ -4082,7 +4082,7 @@ Editor::hide_marker (Gnome::Canvas::Item* item, GdkEvent* event) 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) { @@ -4117,11 +4117,11 @@ Editor::start_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event, Ra } 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 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())) { snap_to (drag_info.current_pointer_frame); @@ -4190,7 +4190,7 @@ Editor::drag_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event) } 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; @@ -4233,7 +4233,7 @@ Editor::end_range_markerbar_op (Gnome::Canvas::Item* item, GdkEvent* event) 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.motion_callback = &Editor::drag_mouse_zoom; @@ -4245,7 +4245,7 @@ Editor::start_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event) } 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 end; @@ -4286,7 +4286,7 @@ Editor::drag_mouse_zoom (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { drag_mouse_zoom (item, event); @@ -4321,7 +4321,7 @@ Editor::reposition_zoom_rect (jack_nframes_t start, jack_nframes_t end) } 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.motion_callback = &Editor::drag_rubberband_select; @@ -4333,7 +4333,7 @@ Editor::start_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) } 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 end; @@ -4397,7 +4397,7 @@ Editor::drag_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) } 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) { @@ -4440,7 +4440,7 @@ Editor::end_rubberband_select (Gnome::Canvas::Item* item, GdkEvent* event) gint -Editor::mouse_rename_region (Gnome::Canvas::Item* item, GdkEvent* event) +Editor::mouse_rename_region (ArdourCanvas::Item* item, GdkEvent* event) { using namespace Gtkmm2ext; @@ -4463,7 +4463,7 @@ Editor::mouse_rename_region (Gnome::Canvas::Item* item, GdkEvent* event) } 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.motion_callback = &Editor::time_fx_motion; @@ -4475,7 +4475,7 @@ Editor::start_time_fx (Gnome::Canvas::Item* item, GdkEvent* event) } void -Editor::time_fx_motion (Gnome::Canvas::Item *item, GdkEvent* event) +Editor::time_fx_motion (ArdourCanvas::Item *item, GdkEvent* event) { AudioRegionView* rv = clicked_regionview; @@ -4498,7 +4498,7 @@ Editor::time_fx_motion (Gnome::Canvas::Item *item, GdkEvent* event) } 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 (); diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index f4f6f4df76..d9bfc7e65f 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -54,7 +54,7 @@ Editor::handle_new_route (Route& route) return; } - tv = new AudioTimeAxisView (*this, *session, route, &track_canvas); + tv = new AudioTimeAxisView (*this, *session, route, track_canvas); track_views.push_back (tv); diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 804fe3eabc..aeae0058a2 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -126,13 +126,13 @@ Editor::hide_measures () used_measure_lines.clear (); } -Gnome::Canvas::Line * +ArdourCanvas::Line * Editor::get_time_line () { - Gnome::Canvas::Line *line; + ArdourCanvas::Line *line; 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; used_measure_lines.push_back (line); } else { @@ -153,7 +153,7 @@ Editor::draw_measures () TempoMap::BBTPointList::iterator i; TempoMap::BBTPointList *all_bbt_points; - Gnome::Canvas::Line *line; + ArdourCanvas::Line *line; gdouble xpos, last_xpos; uint32_t cnt; uint32_t color; @@ -324,7 +324,7 @@ Editor::mouse_add_new_meter_event (jack_nframes_t frame) } void -Editor::remove_tempo_marker (Gnome::Canvas::Item* item) +Editor::remove_tempo_marker (ArdourCanvas::Item* item) { Marker* marker; TempoMarker* tempo_marker; @@ -411,7 +411,7 @@ Editor::edit_tempo_section (TempoSection* section) } void -Editor::edit_tempo_marker (Gnome::Canvas::Item *item) +Editor::edit_tempo_marker (ArdourCanvas::Item *item) { Marker* marker; TempoMarker* tempo_marker; @@ -430,7 +430,7 @@ Editor::edit_tempo_marker (Gnome::Canvas::Item *item) } void -Editor::edit_meter_marker (Gnome::Canvas::Item *item) +Editor::edit_meter_marker (ArdourCanvas::Item *item) { Marker* marker; MeterMarker* meter_marker; @@ -461,7 +461,7 @@ Editor::real_remove_tempo_marker (TempoSection *section) } void -Editor::remove_meter_marker (Gnome::Canvas::Item* item) +Editor::remove_meter_marker (ArdourCanvas::Item* item) { Marker* marker; MeterMarker* meter_marker; diff --git a/gtk2_ardour/editor_timefx.cc b/gtk2_ardour/editor_timefx.cc index 274f9587d6..805c4e0b1d 100644 --- a/gtk2_ardour/editor_timefx.cc +++ b/gtk2_ardour/editor_timefx.cc @@ -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)); 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; return -1; } diff --git a/gtk2_ardour/export_dialog.cc b/gtk2_ardour/export_dialog.cc index 9c594e456d..97fe7feff7 100644 --- a/gtk2_ardour/export_dialog.cc +++ b/gtk2_ardour/export_dialog.cc @@ -60,7 +60,7 @@ static const gchar *sample_rates[] = { 0 }; -static const gchar *src_qualities[] = { +static const gchar *src_quality[] = { N_("best"), N_("fastest"), 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_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 (); } diff --git a/gtk2_ardour/gain_automation_time_axis.cc b/gtk2_ardour/gain_automation_time_axis.cc index ed2ea49d67..8317f50f22 100644 --- a/gtk2_ardour/gain_automation_time_axis.cc +++ b/gtk2_ardour/gain_automation_time_axis.cc @@ -30,7 +30,7 @@ using namespace ARDOUR; 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), AutomationTimeAxisView (s, r, e, parent, canvas, n, X_("gain"), ""), @@ -44,7 +44,7 @@ GainAutomationTimeAxisView::~GainAutomationTimeAxisView () } 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; diff --git a/gtk2_ardour/ghostregion.cc b/gtk2_ardour/ghostregion.cc index c8a89ca5b6..9747332db6 100644 --- a/gtk2_ardour/ghostregion.cc +++ b/gtk2_ardour/ghostregion.cc @@ -15,11 +15,11 @@ GhostRegion::GhostRegion (AutomationTimeAxisView& atv, double initial_pos) // "x", initial_pos, // "y", 0.0, // 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 ("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 ("y1", (double) 0.0); base_rect->set_property ("y2", (double) trackview.height); diff --git a/gtk2_ardour/glade/new_session_dialog.glade b/gtk2_ardour/glade/new_session_dialog.glade index efcf6d97fe..330475fbfa 100644 --- a/gtk2_ardour/glade/new_session_dialog.glade +++ b/gtk2_ardour/glade/new_session_dialog.glade @@ -655,7 +655,7 @@ True True - Connect to Master Track + Connect to Master Bus True GTK_RELIEF_NORMAL True @@ -674,7 +674,7 @@ True True - Connect to Control Track + Connect to Control Bus True GTK_RELIEF_NORMAL True diff --git a/gtk2_ardour/imageframe.cc b/gtk2_ardour/imageframe.cc index a376058151..b54cc72dc1 100644 --- a/gtk2_ardour/imageframe.cc +++ b/gtk2_ardour/imageframe.cc @@ -57,9 +57,9 @@ namespace namespace Glib { -Gnome::Canvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy) +ArdourCanvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy) { - return dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)); + return dynamic_cast (Glib::wrap_auto ((GObject*)(object), take_copy)); } } /* namespace Glib */ diff --git a/gtk2_ardour/imageframe.h b/gtk2_ardour/imageframe.h index b2ff25b408..b10422cab6 100644 --- a/gtk2_ardour/imageframe.h +++ b/gtk2_ardour/imageframe.h @@ -133,12 +133,12 @@ public: namespace Glib { - /** @relates Gnome::Canvas::ImageFrame + /** @relates ArdourCanvas::ImageFrame * @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. * @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 */ diff --git a/gtk2_ardour/imageframe_time_axis.cc b/gtk2_ardour/imageframe_time_axis.cc index 17bdf5ecab..7551bf36bc 100644 --- a/gtk2_ardour/imageframe_time_axis.cc +++ b/gtk2_ardour/imageframe_time_axis.cc @@ -56,7 +56,7 @@ using namespace Gtk ; * @param sess the current session * @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), 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? //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(); // intialize our data items diff --git a/gtk2_ardour/imageframe_time_axis_group.cc b/gtk2_ardour/imageframe_time_axis_group.cc index 79c5d24705..12e488de5e 100644 --- a/gtk2_ardour/imageframe_time_axis_group.cc +++ b/gtk2_ardour/imageframe_time_axis_group.cc @@ -203,7 +203,7 @@ ImageFrameTimeAxisGroup::add_imageframe_item(std::string frame_id, jack_nframes_ if(get_named_imageframe_item(frame_id) == 0) { ifv = new ImageFrameView(frame_id, - _view_helper.canvas_item(), + _view_helper.canvas_item()->property_parent(), &(_view_helper.trackview()), this, _view_helper.trackview().editor.get_current_zoom(), diff --git a/gtk2_ardour/imageframe_view.cc b/gtk2_ardour/imageframe_view.cc index 865c286fde..f3a8b48a8c 100644 --- a/gtk2_ardour/imageframe_view.cc +++ b/gtk2_ardour/imageframe_view.cc @@ -55,7 +55,7 @@ sigc::signal ImageFrameView::GoingAway; * @param num_channels the number of color channels within rgb_data */ ImageFrameView::ImageFrameView(std::string item_id, - Gnome::Canvas::Group *parent, + ArdourCanvas::Group *parent, ImageFrameTimeAxis* tv, ImageFrameTimeAxisGroup* item_group, double spu, @@ -66,7 +66,7 @@ ImageFrameView::ImageFrameView(std::string item_id, uint32_t width, uint32_t height, 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::ShowNameHighlight| TimeAxisViewItem::ShowFrame| diff --git a/gtk2_ardour/imageframe_view.h b/gtk2_ardour/imageframe_view.h index f652482612..d6f436d744 100644 --- a/gtk2_ardour/imageframe_view.h +++ b/gtk2_ardour/imageframe_view.h @@ -60,7 +60,7 @@ class ImageFrameView : public TimeAxisViewItem * @param num_channels the number of color channels within rgb_data */ ImageFrameView(std::string item_id, - Gnome::Canvas::Group *parent, + ArdourCanvas::Group *parent, ImageFrameTimeAxis *tv, ImageFrameTimeAxisGroup* group, double spu, diff --git a/gtk2_ardour/marker.cc b/gtk2_ardour/marker.cc index 2bac926b7e..79ae58a98d 100644 --- a/gtk2_ardour/marker.cc +++ b/gtk2_ardour/marker.cc @@ -27,8 +27,8 @@ #include "i18n.h" -Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, const string& annotation, - Type type, gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame) +Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation, + Type type, gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame) : editor (ed), _type(type) { @@ -122,14 +122,12 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co switch (type) { 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 (6.0, 0.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 (0.0, 5.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 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 (6.0, 5.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, 5.0)); @@ -154,7 +151,7 @@ Marker::Marker (PublicEditor& ed, Gnome::Canvas::Group& parent, guint32 rgba, co break; 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 (5.0, 0.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; 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 (10.0, 0.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; 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 (4.0, 0.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; 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, 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; 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 (8.0, 0.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; 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 (8.0, 0.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 ("y", 1.0); // 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 ("fill_color_rgba", rgba); mark->set_property ("outline_color", Gdk::Color ("black")); 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 ("x", label_offset); 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, - gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)) + gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer)) : Marker (editor, parent, rgba, text, Tempo, callback, 0), _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, - gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)) + gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer)) : Marker (editor, parent, rgba, text, Meter, callback, 0), _meter (m) { diff --git a/gtk2_ardour/marker.h b/gtk2_ardour/marker.h index 6595289901..bcf4357f19 100644 --- a/gtk2_ardour/marker.h +++ b/gtk2_ardour/marker.h @@ -24,10 +24,13 @@ #include #include #include -#include +#include +#include #include #include +#include "canvas.h" + namespace ARDOUR { class TempoSection; class MeterSection; @@ -50,8 +53,8 @@ class Marker : public sigc::trackable PunchOut }; - Marker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, Type, - gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0); + Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type, + gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0); virtual ~Marker (); void set_position (jack_nframes_t); @@ -66,10 +69,10 @@ class Marker : public sigc::trackable protected: PublicEditor& editor; - Gnome::Canvas::Group *group; - Gnome::Canvas::Item *mark; - Gnome::Canvas::Text *text; - Gnome::Canvas::Points *points; + ArdourCanvas::Group *group; + ArdourCanvas::Item *mark; + ArdourCanvas::Text *text; + ArdourCanvas::Points *points; double unit_position; jack_nframes_t frame_position; @@ -82,8 +85,8 @@ class Marker : public sigc::trackable class TempoMarker : public Marker { public: - TempoMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&, - gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)); + TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&, + gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer)); ~TempoMarker (); ARDOUR::TempoSection& tempo() const { return _tempo; } @@ -95,8 +98,8 @@ class TempoMarker : public Marker class MeterMarker : public Marker { public: - MeterMarker (PublicEditor& editor, Gnome::Canvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&, - gint (*callback)(Gnome::Canvas::Item *, GdkEvent *, gpointer)); + MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&, + gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer)); ~MeterMarker (); ARDOUR::MeterSection& meter() const { return _meter; } diff --git a/gtk2_ardour/marker_time_axis_view.cc b/gtk2_ardour/marker_time_axis_view.cc index e0a497bb0d..cad7df186d 100644 --- a/gtk2_ardour/marker_time_axis_view.cc +++ b/gtk2_ardour/marker_time_axis_view.cc @@ -54,9 +54,9 @@ MarkerTimeAxisView::MarkerTimeAxisView(MarkerTimeAxis& tv) //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 = 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 ("y1", 0.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 ("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() ; diff --git a/gtk2_ardour/marker_time_axis_view.h b/gtk2_ardour/marker_time_axis_view.h index 5d3f76ad8e..4f6caf8266 100644 --- a/gtk2_ardour/marker_time_axis_view.h +++ b/gtk2_ardour/marker_time_axis_view.h @@ -25,10 +25,10 @@ #include #include -#include #include #include "simplerect.h" +#include "canvas.h" class PublicEditor; 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 */ MarkerTimeAxis& _trackview ; - Gnome::Canvas::Group *canvas_group ; - Gnome::Canvas::SimpleRect *canvas_rect ; /* frame around the whole thing */ + ArdourCanvas::Group *canvas_group ; + ArdourCanvas::SimpleRect *canvas_rect ; /* frame around the whole thing */ /** the current samples per unit */ double _samples_per_unit; diff --git a/gtk2_ardour/marker_view.cc b/gtk2_ardour/marker_view.cc index f65c9431ca..8ccc3d8c12 100644 --- a/gtk2_ardour/marker_view.cc +++ b/gtk2_ardour/marker_view.cc @@ -47,7 +47,7 @@ sigc::signal MarkerView::GoingAway; * @param start the start time of this item * @param duration the duration of this item */ -MarkerView::MarkerView(Gnome::Canvas::Group *parent, +MarkerView::MarkerView(ArdourCanvas::Group *parent, TimeAxisView* tv, ImageFrameView* marked, double spu, @@ -56,7 +56,7 @@ MarkerView::MarkerView(Gnome::Canvas::Group *parent, std::string mark_id, jack_nframes_t start, 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 ; marked_item = marked ; diff --git a/gtk2_ardour/marker_view.h b/gtk2_ardour/marker_view.h index 969a0a216f..a3e7dc3fea 100644 --- a/gtk2_ardour/marker_view.h +++ b/gtk2_ardour/marker_view.h @@ -23,9 +23,10 @@ #include #include -#include #include "time_axis_view_item.h" +#include "canvas.h" + class MarkerTimeAxisView ; class ImageFrameView ; @@ -54,7 +55,7 @@ class MarkerView : public TimeAxisViewItem * @param start the start time of this item * @param duration the duration of this item */ - MarkerView(Gnome::Canvas::Group *parent, + MarkerView(ArdourCanvas::Group *parent, TimeAxisView *tv, ImageFrameView* marked, double spu, diff --git a/gtk2_ardour/pan_automation_time_axis.cc b/gtk2_ardour/pan_automation_time_axis.cc index 6b614a5a47..36e6c31245 100644 --- a/gtk2_ardour/pan_automation_time_axis.cc +++ b/gtk2_ardour/pan_automation_time_axis.cc @@ -45,7 +45,7 @@ PanAutomationTimeAxisView::~PanAutomationTimeAxisView () } 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()) { /* no data, possibly caused by no outputs/inputs */ diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index c426b57702..b15d12ad31 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -746,7 +746,7 @@ PluginUI::control_port_toggled (ControlUI* cui) } } -bool +void PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui) { if (!cui->ignore_change) { @@ -755,7 +755,6 @@ PluginUI::control_combo_changed (GdkEventAny* ignored, ControlUI* cui) insert.set_parameter (cui->port_index, mapping[value]); } - return FALSE; } void @@ -868,8 +867,8 @@ PlugUIBase::PlugUIBase (PluginInsert& pi) bypass_button.signal_toggled().connect (mem_fun(*this, &PlugUIBase::bypass_toggled)); } -gint -PlugUIBase::setting_selected(GdkEventAny* ignored) +void +PlugUIBase::setting_selected() { if (combo.get_active_text().length() > 0) { if (!plugin.load_preset(combo.get_active_text())) { @@ -877,7 +876,6 @@ PlugUIBase::setting_selected(GdkEventAny* ignored) } } - return FALSE; } void diff --git a/gtk2_ardour/redirect_automation_line.cc b/gtk2_ardour/redirect_automation_line.cc index 90acec08c4..71012c1b0c 100644 --- a/gtk2_ardour/redirect_automation_line.cc +++ b/gtk2_ardour/redirect_automation_line.cc @@ -34,15 +34,17 @@ using namespace std; using namespace ARDOUR; RedirectAutomationLine::RedirectAutomationLine (string name, Redirect& rd, uint32_t port, Session& s, - TimeAxisView& tv, Gnome::Canvas::Group& parent, + + TimeAxisView& tv, ArdourCanvas::Group& parent, + AutomationList& l) - - : AutomationLine (name, tv, parent, l) + + : AutomationLine (name, tv, parent, l), session (s), _redirect (rd), _port (port) { - set_verbose_cursor_uses_gain_mapping (false); + set_verbose_cursor_uses_gain_mapping (false); PluginInsert *pi; Plugin::ParameterDescriptor desc; diff --git a/gtk2_ardour/redirect_automation_time_axis.cc b/gtk2_ardour/redirect_automation_time_axis.cc index f3c6ca3776..798d132a4a 100644 --- a/gtk2_ardour/redirect_automation_time_axis.cc +++ b/gtk2_ardour/redirect_automation_time_axis.cc @@ -71,7 +71,7 @@ RedirectAutomationTimeAxisView::~RedirectAutomationTimeAxisView () } 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; diff --git a/gtk2_ardour/region_gain_line.cc b/gtk2_ardour/region_gain_line.cc index 5ad4b31186..6924b770ec 100644 --- a/gtk2_ardour/region_gain_line.cc +++ b/gtk2_ardour/region_gain_line.cc @@ -17,11 +17,11 @@ using namespace std; 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, - gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer), - gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer)) - : AutomationLine (name, r.get_time_axis_view(), parent, c, point_callback, line_callback), + bool (*point_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer), + bool (*line_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer)) + : AutomationLine (name, r.get_time_axis_view(), parent, c), session (s), rv (r) { diff --git a/gtk2_ardour/region_gain_line.h b/gtk2_ardour/region_gain_line.h index 97e2253d01..145bb23c00 100644 --- a/gtk2_ardour/region_gain_line.h +++ b/gtk2_ardour/region_gain_line.h @@ -17,10 +17,10 @@ class AudioRegionView; class AudioRegionGainLine : public AutomationLine { public: - AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, Gnome::Canvas::Item& parent, + AudioRegionGainLine (string name, ARDOUR::Session&, AudioRegionView&, ArdourCanvas::Group& parent, ARDOUR::Curve&, - gint (*point_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer), - gint (*line_callback)(Gnome::Canvas::Item*, GdkEvent*, gpointer)); + bool (*point_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer), + bool (*line_callback)(ArdourCanvas::Item*, GdkEvent*, gpointer)); void view_to_model_y (double&); void model_to_view_y (double&); diff --git a/gtk2_ardour/regionview.cc b/gtk2_ardour/regionview.cc index 0b63aa9d97..be3fbf8d8d 100644 --- a/gtk2_ardour/regionview.cc +++ b/gtk2_ardour/regionview.cc @@ -56,7 +56,7 @@ static const int32_t sync_mark_width = 9; sigc::signal AudioRegionView::AudioRegionViewGoingAway; -AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisView &tv, +AudioRegionView::AudioRegionView (ArdourCanvas::Group *parent, AudioTimeAxisView &tv, AudioRegion& r, double spu, double amplitude_above_axis, @@ -70,7 +70,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie region (r) { - Gnome::Canvas::Points shape; + ArdourCanvas::Points shape; XMLNode *node; 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_text), "regionview", this); - // shape = new Gnome::Canvas::Points (); + // shape = new ArdourCanvas::Points (); /* 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 (-((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->set_property ("fill_color_rgba", fill_color); 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_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_data ("regionview", this); @@ -130,7 +130,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie 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 ("outline_pixels", 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_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 ("outline_pixels", 0); fade_out_handle->set_property ("y1", 2.0); @@ -151,7 +151,7 @@ AudioRegionView::AudioRegionView (Gnome::Canvas::Group *parent, AudioTimeAxisVie foo += ':'; 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_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_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)); set_colors (); @@ -216,7 +216,7 @@ AudioRegionView::~AudioRegionView () } 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) { case GDK_BUTTON_RELEASE: @@ -991,7 +991,7 @@ AudioRegionView::create_waves () } 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 ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0); 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 (); 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 ("x2", (gdouble) (region.length() / samples_per_unit) - 1.0); zero_line->set_property ("color_rgba", (guint) color_map[cZeroLine]); @@ -1096,7 +1096,7 @@ AudioRegionView::peaks_ready_handler (uint32_t which) } 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; @@ -1140,7 +1140,7 @@ AudioRegionView::add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *ev) } 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 (item->get_data ("control_point")); region.envelope().erase (cp->model); diff --git a/gtk2_ardour/regionview.h b/gtk2_ardour/regionview.h index 26450f8fb3..ee42e6209f 100644 --- a/gtk2_ardour/regionview.h +++ b/gtk2_ardour/regionview.h @@ -48,7 +48,7 @@ class AutomationTimeAxisView; class AudioRegionView : public TimeAxisViewItem { public: - AudioRegionView (Gnome::Canvas::Group *, + AudioRegionView (ArdourCanvas::Group *, AudioTimeAxisView&, ARDOUR::AudioRegion&, double initial_samples_per_unit, @@ -91,8 +91,8 @@ class AudioRegionView : public TimeAxisViewItem void show_region_editor (); void hide_region_editor(); - void add_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event); - void remove_gain_point_event (Gnome::Canvas::Item *item, GdkEvent *event); + void add_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event); + void remove_gain_point_event (ArdourCanvas::Item *item, GdkEvent *event); AudioRegionGainLine* get_gain_line() const { return gain_line; } @@ -124,13 +124,13 @@ class AudioRegionView : public TimeAxisViewItem vector waves; /* waveviews */ vector tmp_waves; /* see ::create_waves()*/ - Gnome::Canvas::Polygon* sync_mark; /* polgyon for sync position */ - Gnome::Canvas::Text* no_wave_msg; /* text */ - Gnome::Canvas::Line* zero_line; /* simpleline */ - Gnome::Canvas::Polygon* fade_in_shape; /* polygon */ - Gnome::Canvas::Polygon* fade_out_shape; /* polygon */ - Gnome::Canvas::SimpleRect* fade_in_handle; /* simplerect */ - Gnome::Canvas::SimpleRect* fade_out_handle; /* simplerect */ + ArdourCanvas::Polygon* sync_mark; /* polgyon for sync position */ + ArdourCanvas::Text* no_wave_msg; /* text */ + ArdourCanvas::Line* zero_line; /* simpleline */ + ArdourCanvas::Polygon* fade_in_shape; /* polygon */ + ArdourCanvas::Polygon* fade_out_shape; /* polygon */ + ArdourCanvas::SimpleRect* fade_in_handle; /* simplerect */ + ArdourCanvas::SimpleRect* fade_out_handle; /* simplerect */ AudioRegionGainLine* gain_line; AudioRegionEditor *editor; @@ -165,7 +165,7 @@ class AudioRegionView : public TimeAxisViewItem void region_sync_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 create_waves (); diff --git a/gtk2_ardour/streamview.cc b/gtk2_ardour/streamview.cc index 59bb91d675..0575090701 100644 --- a/gtk2_ardour/streamview.cc +++ b/gtk2_ardour/streamview.cc @@ -49,7 +49,7 @@ StreamView::StreamView (AudioTimeAxisView& tv) //canvas_group = gnome_canvas_item_new (GNOME_CANVAS_GROUP(_trackview.canvas_display), // gnome_canvas_group_get_type (), // 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), // gnome_canvas_simplerect_get_type(), @@ -61,8 +61,8 @@ StreamView::StreamView (AudioTimeAxisView& tv) // /* outline ends and bottom */ // "outline_what", (guint32) (0x1|0x2|0x8), // "fill_color_rgba", stream_base_color, - // NULL); - canvas_rect = new Gnome::Canvas::SimpleRect (*canvas_group); + // ] NULL); + canvas_rect = new ArdourCanvas::SimpleRect (*canvas_group); canvas_rect->set_property ("x1", 0.0); canvas_rect->set_property ("y1", 0.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 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 ("y1", 1.0); rec_rect->set_property ("x2", xend); @@ -857,7 +857,7 @@ StreamView::update_rec_regions () } /* 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()); rect->set_property ("x2", xend); } @@ -882,7 +882,7 @@ StreamView::update_rec_regions () } /* also hide rect */ - Gnome::Canvas::Item * rect = rec_rects[n].rectangle; + ArdourCanvas::Item * rect = rec_rects[n].rectangle; rect->hide(); } diff --git a/gtk2_ardour/streamview.h b/gtk2_ardour/streamview.h index 2913aaea2d..3e376d34d7 100644 --- a/gtk2_ardour/streamview.h +++ b/gtk2_ardour/streamview.h @@ -26,11 +26,11 @@ #include #include -#include #include #include "enums.h" #include "simplerect.h" +#include "canvas.h" namespace ARDOUR { class Route; @@ -42,7 +42,7 @@ namespace ARDOUR { } struct RecBoxInfo { - Gnome::Canvas::SimpleRect* rectangle; + ArdourCanvas::SimpleRect* rectangle; jack_nframes_t start; jack_nframes_t length; }; @@ -79,7 +79,7 @@ class StreamView : public sigc::trackable void set_show_waveforms (bool 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 AudioRegionViewAdded; @@ -111,8 +111,8 @@ class StreamView : public sigc::trackable private: AudioTimeAxisView& _trackview; - Gnome::Canvas::Group* canvas_group; - Gnome::Canvas::SimpleRect* canvas_rect; /* frame around the whole thing */ + ArdourCanvas::Group* canvas_group; + ArdourCanvas::SimpleRect* canvas_rect; /* frame around the whole thing */ typedef list AudioRegionViewList; AudioRegionViewList region_views; diff --git a/gtk2_ardour/time_axis_view_item.cc b/gtk2_ardour/time_axis_view_item.cc index 5b2e1c2af7..7e52c5f4dd 100644 --- a/gtk2_ardour/time_axis_view_item.cc +++ b/gtk2_ardour/time_axis_view_item.cc @@ -61,7 +61,7 @@ const double TimeAxisViewItem::GRAB_HANDLE_LENGTH = 6 ; * @param start the start point 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, Visibility visibility) : trackview (tv) @@ -87,9 +87,9 @@ TimeAxisViewItem::TimeAxisViewItem(std::string it_name, Gnome::Canvas::Group& pa 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 ("y1", (double) 1.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 (); if (visibility & ShowFrame) { - frame = new Gnome::Canvas::SimpleRect (*group); + frame = new ArdourCanvas::SimpleRect (*group); frame->set_property ("x1", (double) 0.0); frame->set_property ("y1", (double) 1.0); 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) { - 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 ("x2", (double) (trackview.editor.frame_to_pixel(item_duration)) - 1); 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) { - 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 ("y", (double) trackview.height + 1.0 - TimeAxisViewItem::NAME_Y_OFFSET); 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 */ 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 ("x2", (double) TimeAxisViewItem::GRAB_HANDLE_LENGTH); 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 ("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 ("x2", (double) trackview.editor.frame_to_pixel(get_duration())); 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() { return(frame) ; @@ -563,7 +563,7 @@ TimeAxisViewItem::get_canvas_frame() /** * */ -Gnome::Canvas::Item* +ArdourCanvas::Item* TimeAxisViewItem::get_canvas_group() { return(group) ; @@ -572,7 +572,7 @@ TimeAxisViewItem::get_canvas_group() /** * */ -Gnome::Canvas::Item* +ArdourCanvas::Item* TimeAxisViewItem::get_name_highlight() { return(name_highlight) ; @@ -581,7 +581,7 @@ TimeAxisViewItem::get_name_highlight() /** * */ -Gnome::Canvas::Text* +ArdourCanvas::Text* TimeAxisViewItem::get_name_text() { return(name_text) ; diff --git a/gtk2_ardour/time_axis_view_item.h b/gtk2_ardour/time_axis_view_item.h index fa68944422..cf74736479 100644 --- a/gtk2_ardour/time_axis_view_item.h +++ b/gtk2_ardour/time_axis_view_item.h @@ -30,6 +30,7 @@ #include "selectable.h" #include "simplerect.h" +#include "canvas.h" 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 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)); /** @@ -445,13 +446,13 @@ class TimeAxisViewItem : public sigc::trackable, public Selectable uint32_t lock_handle_color_g ; uint32_t lock_handle_color_b ; - Gnome::Canvas::Group* group; - Gnome::Canvas::SimpleRect* vestigial_frame; - Gnome::Canvas::SimpleRect* frame; - Gnome::Canvas::Text* name_text; - Gnome::Canvas::SimpleRect* name_highlight; - Gnome::Canvas::SimpleRect* frame_handle_start; - Gnome::Canvas::SimpleRect* frame_handle_end; + ArdourCanvas::Group* group; + ArdourCanvas::SimpleRect* vestigial_frame; + ArdourCanvas::SimpleRect* frame; + ArdourCanvas::Text* name_text; + ArdourCanvas::SimpleRect* name_highlight; + ArdourCanvas::SimpleRect* frame_handle_start; + ArdourCanvas::SimpleRect* frame_handle_end; }; /* class TimeAxisViewItem */ diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index bccdeb22bc..2798e0e29e 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -302,7 +302,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h) return (savergb); } -Gnome::Canvas::Points* +ArdourCanvas::Points* get_canvas_points (string who, uint32_t npoints) { // cerr << who << ": wants " << npoints << " canvas points" << endl; @@ -311,7 +311,7 @@ get_canvas_points (string who, uint32_t npoints) abort (); } #endif - return new Gnome::Canvas::Points (npoints); + return new ArdourCanvas::Points (npoints); } int diff --git a/gtk2_ardour/utils.h b/gtk2_ardour/utils.h index e1c6bb0c44..8463b67bb3 100644 --- a/gtk2_ardour/utils.h +++ b/gtk2_ardour/utils.h @@ -27,7 +27,7 @@ #include #include #include - +#include "canvas.h" namespace Gtk { class Window; 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* 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); Pango::FontDescription get_font_for_style (std::string widgetname); -- cgit v1.2.3