+
+double
+Editor::horizontal_position () const
+{
+ return frame_to_unit (leftmost_frame);
+}
+void
+Editor::set_canvas_cursor (Gdk::Cursor* cursor, bool save)
+{
+ if (save) {
+ current_canvas_cursor = cursor;
+ }
+
+ if (is_drawable()) {
+ track_canvas->get_window()->set_cursor (*cursor);
+ }
+}
+
+bool
+Editor::track_canvas_key_press (GdkEventKey*)
+{
+ /* XXX: event does not report the modifier key pressed down, AFAICS, so use the Keyboard object instead */
+ if (mouse_mode == Editing::MouseZoom && Keyboard::the_keyboard().key_is_down (GDK_Control_L)) {
+ set_canvas_cursor (_cursors->zoom_out, true);
+ }
+
+ return false;
+}
+
+bool
+Editor::track_canvas_key_release (GdkEventKey*)
+{
+ if (mouse_mode == Editing::MouseZoom && !Keyboard::the_keyboard().key_is_down (GDK_Control_L)) {
+ set_canvas_cursor (_cursors->zoom_in, true);
+ }
+
+ return false;
+}