add usb_direct for shuttle, revised shuttle again, titler tweak, transportque design...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / mwindowmove.C
index c55f6228d81752d65f35f8e07d82d2be42c5ccf1..d64b6c1b6504873dc414eb2d102aa9e3e0de3985 100644 (file)
@@ -145,7 +145,7 @@ void MWindow::fit_selection()
 }
 
 
-void MWindow::fit_autos(int doall)
+void MWindow::fit_autos(int all)
 {
        float min = 0, max = 0;
        double start, end;
@@ -167,7 +167,7 @@ void MWindow::fit_autos(int doall)
        int forstart = edl->local_session->zoombar_showautotype;
        int forend   = edl->local_session->zoombar_showautotype + 1;
 
-       if (doall) {
+       if( all ) {
                forstart = 0;
                forend   = AUTOGROUPTYPE_COUNT;
        }
@@ -577,7 +577,7 @@ void MWindow::select_all()
                edl->local_session->set_selectionstart(0);
                edl->local_session->set_selectionend(edl->tracks->total_length());
        }
-       gui->update(0, 1, 1, 1, 0, 1, 0);
+       gui->update(0, NORMAL_DRAW, 1, 1, 0, 1, 0);
        gui->activate_timeline();
        cwindow->update(1, 0, 0, 0, 1);
        update_plugin_guis();
@@ -716,6 +716,25 @@ int MWindow::find_selection(double position, int scroll_display)
        return 0;
 }
 
+double MWindow::get_position()
+{
+        return edl->local_session->get_selectionstart(1);
+}
+
+void MWindow::set_position(double position)
+{
+        if( position != get_position() ) {
+                if( position < 0 ) position = 0;
+                edl->local_session->set_selectionstart(position);
+                edl->local_session->set_selectionend(position);
+                gui->lock_window();
+                find_cursor();
+                gui->update(1, NORMAL_DRAW, 1, 1, 1, 1, 0);
+                gui->unlock_window();
+                cwindow->update(1, 0, 0, 0, 0);
+        }
+}
+
 
 int MWindow::expand_y()
 {