summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/automation_line.cc')
-rw-r--r--gtk2_ardour/automation_line.cc64
1 files changed, 32 insertions, 32 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index bc2c609b03..f06cbee510 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -207,10 +207,10 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y)
y = min (1.0, y);
y = _height - (y * _height);
- double const x = trackview.editor.frame_to_unit ((*cp.model())->when);
+ double const x = trackview.editor().frame_to_unit ((*cp.model())->when);
- trackview.editor.current_session()->begin_reversible_command (_("automation event move"));
- trackview.editor.current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &get_state(), 0));
+ trackview.editor().current_session()->begin_reversible_command (_("automation event move"));
+ trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &get_state(), 0));
cp.move_to (x, y, ControlPoint::Full);
reset_line_coords (cp);
@@ -225,9 +225,9 @@ AutomationLine::modify_point_y (ControlPoint& cp, double y)
update_pending = false;
- trackview.editor.current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), 0, &alist->get_state()));
- trackview.editor.current_session()->commit_reversible_command ();
- trackview.editor.current_session()->set_dirty ();
+ trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), 0, &alist->get_state()));
+ trackview.editor().current_session()->commit_reversible_command ();
+ trackview.editor().current_session()->set_dirty ();
}
@@ -256,7 +256,7 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
already in frames. it needs to be converted to canvas units.
*/
- x = trackview.editor.frame_to_unit (x);
+ x = trackview.editor().frame_to_unit (x);
/* clamp x position using view coordinates */
@@ -309,7 +309,7 @@ AutomationLine::modify_view_point (ControlPoint& cp, double x, double y, bool wi
/* leave the x-coordinate alone */
- x = trackview.editor.frame_to_unit ((*cp.model())->when);
+ x = trackview.editor().frame_to_unit ((*cp.model())->when);
}
@@ -381,10 +381,10 @@ AutomationLine::model_representation (ControlPoint& cp, ModelRepresentation& mr)
/* if xval has not changed, set it directly from the model to avoid rounding errors */
- if (mr.xval == trackview.editor.frame_to_unit((*cp.model())->when)) {
+ if (mr.xval == trackview.editor().frame_to_unit((*cp.model())->when)) {
mr.xval = (nframes_t) (*cp.model())->when;
} else {
- mr.xval = trackview.editor.unit_to_frame (mr.xval);
+ mr.xval = trackview.editor().unit_to_frame (mr.xval);
}
/* virtual call: this will do the right thing
@@ -634,7 +634,7 @@ AutomationLine::determine_visible_control_points (ALPoints& points)
}
- set_selected_points (trackview.editor.get_selection().points);
+ set_selected_points (trackview.editor().get_selection().points);
}
@@ -718,7 +718,7 @@ AutomationLine::invalidate_point (ALPoints& p, uint32_t index)
void
AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
{
- if (trackview.editor.current_session() == 0) { /* how? */
+ if (trackview.editor().current_session() == 0) { /* how? */
return;
}
@@ -730,8 +730,8 @@ AutomationLine::start_drag (ControlPoint* cp, nframes_t x, float fraction)
str = _("automation range drag");
}
- trackview.editor.current_session()->begin_reversible_command (str);
- trackview.editor.current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &get_state(), 0));
+ trackview.editor().current_session()->begin_reversible_command (str);
+ trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), &get_state(), 0));
drag_x = x;
drag_distance = 0;
@@ -778,7 +778,7 @@ AutomationLine::line_drag (uint32_t i1, uint32_t i2, float fraction, bool with_p
for (uint32_t i = i1 ; i <= i2; i++) {
cp = nth (i);
- modify_view_point (*cp, trackview.editor.unit_to_frame (cp->get_x()), ((_height - cp->get_y()) /_height) + ydelta, with_push);
+ modify_view_point (*cp, trackview.editor().unit_to_frame (cp->get_x()), ((_height - cp->get_y()) /_height) + ydelta, with_push);
}
if (line_points.size() > 1) {
@@ -807,9 +807,9 @@ AutomationLine::end_drag (ControlPoint* cp)
update_pending = false;
- trackview.editor.current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), 0, &alist->get_state()));
- trackview.editor.current_session()->commit_reversible_command ();
- trackview.editor.current_session()->set_dirty ();
+ trackview.editor().current_session()->add_command (new MementoCommand<AutomationList>(*alist.get(), 0, &alist->get_state()));
+ trackview.editor().current_session()->commit_reversible_command ();
+ trackview.editor().current_session()->set_dirty ();
}
@@ -891,7 +891,7 @@ AutomationLine::control_points_adjacent (double xval, uint32_t & before, uint32_
/* xval is in frames */
- unit_xval = trackview.editor.frame_to_unit (xval);
+ unit_xval = trackview.editor().frame_to_unit (xval);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -952,15 +952,15 @@ AutomationLine::remove_point (ControlPoint& cp)
model_representation (cp, mr);
- trackview.editor.current_session()->begin_reversible_command (_("remove control point"));
+ trackview.editor().current_session()->begin_reversible_command (_("remove control point"));
XMLNode &before = alist->get_state();
alist->erase (mr.start, mr.end);
- trackview.editor.current_session()->add_command(new MementoCommand<AutomationList>(
+ trackview.editor().current_session()->add_command(new MementoCommand<AutomationList>(
*alist.get(), &before, &alist->get_state()));
- trackview.editor.current_session()->commit_reversible_command ();
- trackview.editor.current_session()->set_dirty ();
+ trackview.editor().current_session()->commit_reversible_command ();
+ trackview.editor().current_session()->set_dirty ();
}
void
@@ -1050,8 +1050,8 @@ AutomationLine::set_selected_points (PointSelection& points)
double rstart, rend;
- rstart = trackview.editor.frame_to_unit ((*r).start);
- rend = trackview.editor.frame_to_unit ((*r).end);
+ rstart = trackview.editor().frame_to_unit ((*r).start);
+ rend = trackview.editor().frame_to_unit ((*r).end);
if ((*i)->get_x() >= rstart && (*i)->get_x() <= rend) {
@@ -1081,7 +1081,7 @@ void AutomationLine::set_colors() {
void
AutomationLine::show_selection ()
{
- TimeSelection& time (trackview.editor.get_selection().time);
+ TimeSelection& time (trackview.editor().get_selection().time);
for (vector<ControlPoint*>::iterator i = control_points.begin(); i != control_points.end(); ++i) {
@@ -1090,8 +1090,8 @@ AutomationLine::show_selection ()
for (list<AudioRange>::iterator r = time.begin(); r != time.end(); ++r) {
double rstart, rend;
- rstart = trackview.editor.frame_to_unit ((*r).start);
- rend = trackview.editor.frame_to_unit ((*r).end);
+ rstart = trackview.editor().frame_to_unit ((*r).start);
+ rend = trackview.editor().frame_to_unit ((*r).end);
if ((*i)->get_x() >= rstart && (*i)->get_x() <= rend) {
(*i)->set_selected(true);
@@ -1147,7 +1147,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
void
AutomationLine::add_model_point (ALPoints& tmp_points, double frame, double yfract)
{
- tmp_points.push_back (ALPoint (trackview.editor.frame_to_unit (frame),
+ tmp_points.push_back (ALPoint (trackview.editor().frame_to_unit (frame),
_height - (yfract * _height)));
}
@@ -1169,9 +1169,9 @@ AutomationLine::clear ()
/* parent must create command */
XMLNode &before = get_state();
alist->clear();
- trackview.editor.current_session()->add_command (new MementoCommand<AutomationLine>(*this, &before, &get_state()));
- trackview.editor.current_session()->commit_reversible_command ();
- trackview.editor.current_session()->set_dirty ();
+ trackview.editor().current_session()->add_command (new MementoCommand<AutomationLine>(*this, &before, &get_state()));
+ trackview.editor().current_session()->commit_reversible_command ();
+ trackview.editor().current_session()->set_dirty ();
}
void