rework scopewindow, spanish xlat updates
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / vwindowgui.C
index 1fb4ca21d64bafb76ed674f1d15659274ee7dbdc..8370b4aaf555af96ded1b6967d7264ef29af83e3 100644 (file)
@@ -237,7 +237,6 @@ void VWindowGUI::create_objects()
 
        canvas = new VWindowCanvas(mwindow, this);
        canvas->create_objects(mwindow->edl);
-       canvas->use_vwindow();
        char vsplash_path[BCTEXTLEN];
        int vsplash_len = sizeof(vsplash_path)-1;
        snprintf(vsplash_path, vsplash_len, "%s/vsplash.png", File::get_cindat_path());
@@ -558,7 +557,8 @@ VWindowEditing::VWindowEditing(MWindow *mwindow, VWindow *vwindow)
                0, // use_cut
                0, // use_commerical
                0, // use_goto
-               1) // use_clk2play
+               1, // use_clk2play
+               1) // use_scope
 {
        this->mwindow = mwindow;
        this->vwindow = vwindow;
@@ -774,6 +774,12 @@ VWindowCanvas::VWindowCanvas(MWindow *mwindow, VWindowGUI *gui)
        this->gui = gui;
 }
 
+void VWindowCanvas::create_objects(EDL *edl)
+{
+       Canvas::create_objects(edl);
+       canvas_menu->add_item(new CanvasPopupRemoveSource(this));
+}
+
 void VWindowCanvas::zoom_resize_window(float percentage)
 {
        EDL *edl = gui->vwindow->get_edl();
@@ -821,6 +827,17 @@ void VWindowCanvas::close_source()
        gui->vwindow->delete_source(1, 1);
 }
 
+int VWindowCanvas::scope_on()
+{
+       return !gui->edit_panel->scope_dialog ? 0 :
+               gui->edit_panel->scope_dialog->running();
+}
+
+void VWindowCanvas::draw_scope(VFrame *output)
+{
+       if( gui->edit_panel->scope_dialog && output )
+               gui->edit_panel->scope_dialog->process(output);
+}
 
 void VWindowCanvas::draw_refresh(int flush)
 {