summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_region_view.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-07-09 13:39:45 +0000
committerCarl Hetherington <carl@carlh.net>2009-07-09 13:39:45 +0000
commit4297071b3f7360b17d81ef9cf36b8d75d46d2818 (patch)
tree13cbb169cfcf79a2e845d8860f0f98e192f3a8d3 /gtk2_ardour/automation_region_view.cc
parent0f8031da06e131595b3625169f9687c1a1ab2f3a (diff)
Use shared_ptr for the TimeAxisView hierarchy.
git-svn-id: svn://localhost/ardour2/branches/3.0@5339 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_region_view.cc')
-rw-r--r--gtk2_ardour/automation_region_view.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk2_ardour/automation_region_view.cc b/gtk2_ardour/automation_region_view.cc
index 80dbd669ca..f3749fd48b 100644
--- a/gtk2_ardour/automation_region_view.cc
+++ b/gtk2_ardour/automation_region_view.cc
@@ -28,7 +28,7 @@
#include "i18n.h"
AutomationRegionView::AutomationRegionView(ArdourCanvas::Group* parent,
- AutomationTimeAxisView& time_axis,
+ AutomationTimeAxisViewPtr time_axis,
boost::shared_ptr<ARDOUR::Region> region,
const Evoral::Parameter& param,
boost::shared_ptr<ARDOUR::AutomationList> list,
@@ -56,7 +56,7 @@ AutomationRegionView::init (Gdk::Color const & basic_color, bool wfd)
reset_width_dependent_items ((double) _region->length() / samples_per_unit);
- set_height (trackview.current_height());
+ set_height (trackview->current_height());
_region->StateChanged.connect (mem_fun(*this, &AutomationRegionView::region_changed));
@@ -75,7 +75,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
_line->set_interpolation(list->interpolation());
_line->show();
_line->show_all_control_points();
- _line->set_height ((uint32_t)rint(trackview.current_height() - NAME_HIGHLIGHT_SIZE));
+ _line->set_height ((uint32_t)rint(trackview->current_height() - NAME_HIGHLIGHT_SIZE));
}
bool
@@ -83,7 +83,7 @@ AutomationRegionView::canvas_event(GdkEvent* ev)
{
if (ev->type == GDK_BUTTON_RELEASE) {
- const nframes_t when = trackview.editor().pixel_to_frame((nframes_t)ev->button.x)
+ const nframes_t when = trackview->editor().pixel_to_frame((nframes_t)ev->button.x)
- _region->position();
add_automation_event(ev, when, ev->button.y);
}
@@ -104,13 +104,13 @@ AutomationRegionView::add_automation_event (GdkEvent* event, nframes_t when, dou
assert(_line);
double x = 0;
- AutomationTimeAxisView* const view = automation_view();
+ AutomationTimeAxisViewPtr view = automation_view();
view->canvas_display()->w2i (x, y);
/* compute vertical fractional position */
- const double h = trackview.current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2;
+ const double h = trackview->current_height() - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE - 2;
y = 1.0 - (y / h);
/* map using line */