X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=8a3e5888602f2fc0787d511bb7fee09b9de9a981;hp=1fb4ca21d64bafb76ed674f1d15659274ee7dbdc;hb=205a66f9f2abd6eac72076f773ce5d75921fa151;hpb=04293346a5ef49683cfa6ca3a98ef6cbfcdf7732 diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 1fb4ca21..8a3e5888 100644 --- a/cinelerra-5.1/cinelerra/vwindowgui.C +++ b/cinelerra-5.1/cinelerra/vwindowgui.C @@ -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,22 @@ void VWindowCanvas::close_source() gui->vwindow->delete_source(1, 1); } +int VWindowCanvas::scope_on() +{ + EditPanelScopeDialog *scope_dialog = gui->edit_panel->scope_dialog; + if( !scope_dialog || !scope_dialog->scope_gui ) return 0; + if( scope_dialog->scope_gui->use_refresh ) return 0; + return scope_dialog->running(); +} + +void VWindowCanvas::draw_scope(VFrame *output, int refresh) +{ + if( !output ) return; + EditPanelScopeDialog *scope_dialog = gui->edit_panel->scope_dialog; + if( !scope_dialog || !scope_dialog->scope_gui ) return; + if( scope_dialog->scope_gui->use_refresh && !refresh ) return; + scope_dialog->process(output); +} void VWindowCanvas::draw_refresh(int flush) {