X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fvwindowgui.C;h=8370b4aaf555af96ded1b6967d7264ef29af83e3;hp=8ecdb0d624d39fa9e58da292ee50a838c600d4ac;hb=e1e5dee5935f9f416a31014906a7e0dfacb10c02;hpb=0e16112661802284c0d2c9eb8d1df84141125e91 diff --git a/cinelerra-5.1/cinelerra/vwindowgui.C b/cinelerra-5.1/cinelerra/vwindowgui.C index 8ecdb0d6..8370b4aa 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()); @@ -363,16 +362,12 @@ int VWindowGUI::keypress_event() case 'Z': mwindow->redo_entry(this); break; - case 'f': - unlock_window(); - canvas->use_fullscreen(canvas->get_fullscreen() ? 0 : 1); - lock_window("VWindowGUI::keypress_event 1"); - break; + case 'f': { + int on = canvas->get_fullscreen() ? 0 : 1; + canvas->set_fullscreen(on, 1); + break; } case ESC: - unlock_window(); - if( canvas->get_fullscreen() ) - canvas->use_fullscreen(0); - lock_window("VWindowGUI::keypress_event 2"); + canvas->set_fullscreen(0, 1); break; case KEY_F1: case KEY_F2: @@ -562,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; @@ -778,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(); @@ -825,17 +827,28 @@ 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_refresh(int flush) +void VWindowCanvas::draw_scope(VFrame *output) { - EDL *edl = gui->vwindow->get_edl(); + if( gui->edit_panel->scope_dialog && output ) + gui->edit_panel->scope_dialog->process(output); +} +void VWindowCanvas::draw_refresh(int flush) +{ if( !get_canvas()->get_video_on() ) { int cw = get_canvas()->get_w(), ch = get_canvas()->get_h(); get_canvas()->clear_box(0, 0, cw, ch); - int ow = edl ? get_output_w(edl) : 0; - int oh = edl ? get_output_h(edl) : 0; - if( ow > 0 && oh > 0 && refresh_frame ) { + } + EDL *edl = gui->vwindow->get_edl(); + if( refresh_frame && edl ) { + int ow = get_output_w(edl), oh = get_output_h(edl); + if( ow > 0 && oh > 0 ) { float in_x1, in_y1, in_x2, in_y2; float out_x1, out_y1, out_x2, out_y2; get_transfers(edl, @@ -855,6 +868,8 @@ void VWindowCanvas::draw_refresh(int flush) (int)(in_x2 - in_x1), (int)(in_y2 - in_y1), 0); } + } + if( !get_canvas()->get_video_on() ) { draw_overlays(); get_canvas()->flash(flush); } @@ -878,14 +893,3 @@ void VWindowCanvas::draw_overlays() } } -int VWindowCanvas::use_fullscreen(int on) -{ - if( Canvas::use_fullscreen(on) ) { - gui->lock_window("VWindowCanvas::use_fullscreen"); - zoom_auto(); - draw_refresh(1); - gui->unlock_window(); - } - return 1; -} -