+/** If the editor window is arranged such that the edge of the trackview is right up
+ * against the edge of the screen, autoscroll will not work very well. In this situation,
+ * we start autoscrolling some distance in from the right-hand-side of the screen edge;
+ * this is the distance at which that happens.
+ */
+int
+Editor::autoscroll_fudge_threshold () const
+{
+ return current_page_frames() / 6;
+}
+
+/** @param allow_horiz true to allow horizontal autoscroll, otherwise false.
+ * @param allow_vert true to allow vertical autoscroll, otherwise false.
+ * @param moving_left true if we are moving left, so we only want to autoscroll on the left of the canvas,
+ * otherwise false, so we only want to autoscroll on the right of the canvas.
+ * @param moving_up true if we are moving up, so we only want to autoscroll at the top of the canvas,
+ * otherwise false, so we only want to autoscroll at the bottom of the canvas.
+ */