+
+ set_editor_x (x);
+ set_editor_y (y);
+}
+
+/** Set the editor to display a given x range and a y range with the top at a given position.
+ * The editor's x zoom is adjusted if necessary, but the y zoom is not changed.
+ * x and y parameters are specified in summary coordinates.
+ */
+void
+EditorSummary::set_editor (pair<double,double> const x, double const y)
+{
+ if (_editor->pending_visual_change.idle_handler_id >= 0) {
+ /* see comment in other set_editor () */
+ return;
+ }
+
+ set_editor_x (x);
+ set_editor_y (y);
+}
+
+/** Set the editor to display given x and y ranges. x zoom and track heights are
+ * adjusted if necessary.
+ * x and y parameters are specified in summary coordinates.
+ */
+void
+EditorSummary::set_editor (pair<double,double> const x, pair<double, double> const y)
+{
+ if (_editor->pending_visual_change.idle_handler_id >= 0) {
+ /* see comment in other set_editor () */
+ return;
+ }
+
+ set_editor_x (x);
+ set_editor_y (y);
+}
+
+/** Set the left of the x range visible in the editor.
+ * Caller should have checked that Editor::pending_visual_change.idle_handler_id is < 0
+ * @param x new x left position in summary coordinates.
+ */
+void
+EditorSummary::set_editor_x (double x)
+{
+ if (x < 0) {
+ x = 0;
+ }
+
+ if (suspending_editor_updates ()) {
+ double const w = _pending_editor_x.second - _pending_editor_x.first;
+ _pending_editor_x.first = x;
+ _pending_editor_x.second = x + w;
+ _pending_editor_changed = true;
+ set_dirty ();
+ } else {
+ _editor->reset_x_origin (x / _x_scale + _start);
+ }
+}
+
+/** Set the x range visible in the editor.
+ * Caller should have checked that Editor::pending_visual_change.idle_handler_id is < 0
+ * @param x new x range in summary coordinates.
+ */
+void
+EditorSummary::set_editor_x (pair<double, double> x)
+{
+ if (x.first < 0) {
+ x.first = 0;
+ }
+
+ if (x.second < 0) {
+ x.second = x.first + 1;
+ }
+
+ if (suspending_editor_updates ()) {
+ _pending_editor_x = x;
+ _pending_editor_changed = true;
+ set_dirty ();
+ } else {
+ _editor->reset_x_origin (x.first / _x_scale + _start);
+
+ double const nx = (
+ ((x.second - x.first) / _x_scale) /
+ _editor->frame_to_unit (_editor->current_page_frames())
+ );
+
+ if (nx != _editor->get_current_zoom ()) {
+ _editor->reset_zoom (nx);
+ }
+ }
+}
+
+/** Set the top of the y range visible in the editor.
+ * Caller should have checked that Editor::pending_visual_change.idle_handler_id is < 0
+ * @param y new editor top in summary coodinates.
+ */
+void
+EditorSummary::set_editor_y (double const y)
+{