4 * Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #include "awindowgui.h"
30 #include "edlsession.h"
31 #include "filesystem.h"
37 #include "localsession.h"
38 #include "mainclock.h"
40 #include "mainsession.h"
42 #include "meterpanel.h"
43 #include "mwindowgui.h"
45 #include "playtransport.h"
46 #include "preferences.h"
51 #include "vplayback.h"
53 #include "vwindowgui.h"
59 VWindowGUI::VWindowGUI(MWindow *mwindow, VWindow *vwindow)
60 : BC_Window(_(PROGRAM_NAME ": Viewer"),
61 mwindow->session->vwindow_x,
62 mwindow->session->vwindow_y,
63 mwindow->session->vwindow_w,
64 mwindow->session->vwindow_h,
71 this->mwindow = mwindow;
72 this->vwindow = vwindow;
78 strcpy(loaded_title, "");
81 VWindowGUI::~VWindowGUI()
83 vwindow->playback_engine->interrupt_playback(1);
84 sources.remove_all_objects();
85 labels.remove_all_objects();
93 void VWindowGUI::change_source(EDL *edl, const char *title)
95 //printf("VWindowGUI::change_source %d\n", __LINE__);
97 update_sources(title);
98 strcpy(loaded_title, title);
99 char string[BCTEXTLEN];
101 sprintf(string, _(PROGRAM_NAME ": %s"), title);
103 sprintf(string, _(PROGRAM_NAME ": Viewer"));
105 lock_window("VWindowGUI::change_source");
112 // Get source list from master EDL
113 void VWindowGUI::update_sources(const char *title)
115 lock_window("VWindowGUI::update_sources");
117 //printf("VWindowGUI::update_sources 1\n");
118 sources.remove_all_objects();
119 //printf("VWindowGUI::update_sources 2\n");
124 i < mwindow->edl->clips.total;
127 char *clip_title = mwindow->edl->clips.values[i]->local_session->clip_title;
130 for(int j = 0; j < sources.total; j++)
132 if(!strcasecmp(sources.values[j]->get_text(), clip_title))
140 sources.append(new BC_ListBoxItem(clip_title));
143 //printf("VWindowGUI::update_sources 3\n");
146 for(Asset *current = mwindow->edl->assets->first;
150 char clip_title[BCTEXTLEN];
151 fs.extract_name(clip_title, current->path);
154 for(int j = 0; j < sources.total; j++)
156 if(!strcasecmp(sources.values[j]->get_text(), clip_title))
164 sources.append(new BC_ListBoxItem(clip_title));
168 //printf("VWindowGUI::update_sources 4\n");
170 // source->update_list(&sources);
171 // source->update(title);
175 void VWindowGUI::create_objects()
179 lock_window("VWindowGUI::create_objects");
180 set_icon(mwindow->theme->get_image("vwindow_icon"));
182 //printf("VWindowGUI::create_objects 1\n");
183 mwindow->theme->get_vwindow_sizes(this);
184 mwindow->theme->draw_vwindow_bg(this);
187 meters = new VWindowMeters(mwindow,
189 mwindow->theme->vmeter_x,
190 mwindow->theme->vmeter_y,
191 mwindow->theme->vmeter_h);
192 meters->create_objects();
194 //printf("VWindowGUI::create_objects 1\n");
195 // Requires meters to build
196 edit_panel = new VWindowEditing(mwindow, vwindow);
197 edit_panel->set_meters(meters);
198 edit_panel->create_objects();
200 //printf("VWindowGUI::create_objects 1\n");
201 transport = new VWindowTransport(mwindow,
203 mwindow->theme->vtransport_x,
204 mwindow->theme->vtransport_y);
205 transport->create_objects();
207 //printf("VWindowGUI::create_objects 1\n");
208 // add_subwindow(fps_title = new BC_Title(mwindow->theme->vedit_x, y, ""));
209 add_subwindow(clock = new MainClock(mwindow,
210 mwindow->theme->vtime_x,
211 mwindow->theme->vtime_y,
212 mwindow->theme->vtime_w));
214 canvas = new VWindowCanvas(mwindow, this);
215 canvas->create_objects(mwindow->edl);
216 canvas->use_vwindow();
219 //printf("VWindowGUI::create_objects 1\n");
220 add_subwindow(timebar = new VTimeBar(mwindow,
222 mwindow->theme->vtimebar_x,
223 mwindow->theme->vtimebar_y,
224 mwindow->theme->vtimebar_w,
225 mwindow->theme->vtimebar_h));
226 timebar->create_objects();
227 //printf("VWindowGUI::create_objects 2\n");
230 //printf("VWindowGUI::create_objects 1\n");
231 // source = new VWindowSource(mwindow,
233 // mwindow->theme->vsource_x,
234 // mwindow->theme->vsource_y);
235 // source->create_objects();
236 update_sources(_("None"));
238 //printf("VWindowGUI::create_objects 2\n");
245 int VWindowGUI::resize_event(int w, int h)
247 mwindow->session->vwindow_x = get_x();
248 mwindow->session->vwindow_y = get_y();
249 mwindow->session->vwindow_w = w;
250 mwindow->session->vwindow_h = h;
252 mwindow->theme->get_vwindow_sizes(this);
253 mwindow->theme->draw_vwindow_bg(this);
256 //printf("VWindowGUI::resize_event %d %d\n", __LINE__, mwindow->theme->vedit_y);
257 edit_panel->reposition_buttons(mwindow->theme->vedit_x,
258 mwindow->theme->vedit_y);
260 timebar->resize_event();
261 transport->reposition_buttons(mwindow->theme->vtransport_x,
262 mwindow->theme->vtransport_y);
263 clock->reposition_window(mwindow->theme->vtime_x,
264 mwindow->theme->vtime_y,
265 mwindow->theme->vtime_w,
267 canvas->reposition_window(0,
268 mwindow->theme->vcanvas_x,
269 mwindow->theme->vcanvas_y,
270 mwindow->theme->vcanvas_w,
271 mwindow->theme->vcanvas_h);
272 //printf("VWindowGUI::resize_event %d %d\n", __LINE__, mwindow->theme->vcanvas_x);
273 // source->reposition_window(mwindow->theme->vsource_x,
274 // mwindow->theme->vsource_y);
275 meters->reposition_window(mwindow->theme->vmeter_x,
276 mwindow->theme->vmeter_y,
278 mwindow->theme->vmeter_h);
280 BC_WindowBase::resize_event(w, h);
288 int VWindowGUI::translation_event()
290 mwindow->session->vwindow_x = get_x();
291 mwindow->session->vwindow_y = get_y();
295 int VWindowGUI::close_event()
298 int i = mwindow->vwindows.size();
299 while( --i >= 0 && mwindow->vwindows.get(i)->gui != this );
305 mwindow->session->show_vwindow = 0;
308 mwindow->gui->lock_window("VWindowGUI::close_event");
309 mwindow->gui->mainmenu->show_vwindow->set_checked(0);
310 mwindow->gui->unlock_window();
312 lock_window("VWindowGUI::close_event");
313 mwindow->save_defaults();
317 int VWindowGUI::keypress_event()
320 switch(get_keypress())
328 mwindow->undo_entry(this);
331 mwindow->redo_entry(this);
335 if(mwindow->session->vwindow_fullscreen)
336 canvas->stop_fullscreen();
338 canvas->start_fullscreen();
339 lock_window("VWindowGUI::keypress_event 1");
343 if(mwindow->session->vwindow_fullscreen)
344 canvas->stop_fullscreen();
345 lock_window("VWindowGUI::keypress_event 2");
348 if(!result) result = transport->keypress_event();
353 int VWindowGUI::button_press_event()
355 if(canvas->get_canvas())
356 return canvas->button_press_event_base(canvas->get_canvas());
360 int VWindowGUI::cursor_leave_event()
362 if(canvas->get_canvas())
363 return canvas->cursor_leave_event_base(canvas->get_canvas());
367 int VWindowGUI::cursor_enter_event()
369 if(canvas->get_canvas())
370 return canvas->cursor_enter_event_base(canvas->get_canvas());
374 int VWindowGUI::button_release_event()
376 if(canvas->get_canvas())
377 return canvas->button_release_event();
381 int VWindowGUI::cursor_motion_event()
383 if(canvas->get_canvas())
385 canvas->get_canvas()->unhide_cursor();
386 return canvas->cursor_motion_event();
392 void VWindowGUI::drag_motion()
395 if(get_hidden()) return;
396 if(mwindow->session->current_operation != DRAG_ASSET) return;
398 int old_status = mwindow->session->vcanvas_highlighted;
400 int cursor_x = get_relative_cursor_x();
401 int cursor_y = get_relative_cursor_y();
403 mwindow->session->vcanvas_highlighted = (get_cursor_over_window() &&
404 cursor_x >= canvas->x &&
405 cursor_x < canvas->x + canvas->w &&
406 cursor_y >= canvas->y &&
407 cursor_y < canvas->y + canvas->h);
410 //printf("VWindowGUI::drag_motion 1 %d %d %d %d %d\n", __LINE__,
411 // mwindow->session->vcanvas_highlighted, get_cursor_over_window(), cursor_x, cursor_y);
413 if(old_status != mwindow->session->vcanvas_highlighted)
414 canvas->draw_refresh();
417 int VWindowGUI::drag_stop()
419 if(get_hidden()) return 0;
421 if(mwindow->session->vcanvas_highlighted &&
422 mwindow->session->current_operation == DRAG_ASSET)
424 mwindow->session->vcanvas_highlighted = 0;
425 canvas->draw_refresh();
427 Indexable *indexable = mwindow->session->drag_assets->size() ?
428 mwindow->session->drag_assets->get(0) :
430 EDL *edl = mwindow->session->drag_clips->size() ?
431 mwindow->session->drag_clips->get(0) :
435 vwindow->change_source(indexable);
438 vwindow->change_source(edl);
446 void VWindowGUI::update_meters()
448 if(mwindow->edl->session->vwindow_meter != meters->visible)
450 meters->set_meters(meters->meter_count,
451 mwindow->edl->session->vwindow_meter);
452 mwindow->theme->get_vwindow_sizes(this);
453 resize_event(get_w(), get_h());
459 VWindowMeters::VWindowMeters(MWindow *mwindow,
464 : MeterPanel(mwindow,
470 mwindow->edl->session->audio_channels,
471 mwindow->edl->session->vwindow_meter,
475 this->mwindow = mwindow;
479 VWindowMeters::~VWindowMeters()
483 int VWindowMeters::change_status_event(int new_status)
485 mwindow->edl->session->vwindow_meter = new_status;
486 gui->update_meters();
496 VWindowEditing::VWindowEditing(MWindow *mwindow, VWindow *vwindow)
499 mwindow->theme->vedit_x,
500 mwindow->theme->vedit_y,
520 this->mwindow = mwindow;
521 this->vwindow = vwindow;
524 VWindowEditing::~VWindowEditing()
528 void VWindowEditing::copy_selection()
533 void VWindowEditing::splice_selection()
535 if(vwindow->get_edl())
537 mwindow->gui->lock_window("VWindowEditing::splice_selection");
538 mwindow->splice(vwindow->get_edl());
539 mwindow->gui->unlock_window();
543 void VWindowEditing::overwrite_selection()
545 if(vwindow->get_edl())
547 mwindow->gui->lock_window("VWindowEditing::overwrite_selection");
548 mwindow->overwrite(vwindow->get_edl());
549 mwindow->gui->unlock_window();
553 void VWindowEditing::toggle_label()
555 if(vwindow->get_edl())
557 EDL *edl = vwindow->get_edl();
558 edl->labels->toggle_label(edl->local_session->get_selectionstart(1),
559 edl->local_session->get_selectionend(1));
560 vwindow->gui->timebar->update(1);
564 void VWindowEditing::prev_label()
566 if(vwindow->get_edl())
568 EDL *edl = vwindow->get_edl();
569 vwindow->gui->unlock_window();
570 vwindow->playback_engine->interrupt_playback(1);
571 vwindow->gui->lock_window("VWindowEditing::prev_label");
573 Label *current = edl->labels->prev_label(
574 edl->local_session->get_selectionstart(1));
579 edl->local_session->set_selectionstart(0);
580 edl->local_session->set_selectionend(0);
581 vwindow->update_position(CHANGE_NONE, 0, 1, 0);
582 vwindow->gui->timebar->update(1);
586 edl->local_session->set_selectionstart(current->position);
587 edl->local_session->set_selectionend(current->position);
588 vwindow->update_position(CHANGE_NONE, 0, 1, 0);
589 vwindow->gui->timebar->update(1);
594 void VWindowEditing::next_label()
596 if(vwindow->get_edl())
598 EDL *edl = vwindow->get_edl();
599 Label *current = edl->labels->next_label(
600 edl->local_session->get_selectionstart(1));
603 vwindow->gui->unlock_window();
604 vwindow->playback_engine->interrupt_playback(1);
605 vwindow->gui->lock_window("VWindowEditing::next_label 1");
607 double position = edl->tracks->total_length();
608 edl->local_session->set_selectionstart(position);
609 edl->local_session->set_selectionend(position);
610 vwindow->update_position(CHANGE_NONE, 0, 1, 0);
611 vwindow->gui->timebar->update(1);
615 vwindow->gui->unlock_window();
616 vwindow->playback_engine->interrupt_playback(1);
617 vwindow->gui->lock_window("VWindowEditing::next_label 2");
619 edl->local_session->set_selectionstart(current->position);
620 edl->local_session->set_selectionend(current->position);
621 vwindow->update_position(CHANGE_NONE, 0, 1, 0);
622 vwindow->gui->timebar->update(1);
627 double VWindowEditing::get_position()
629 EDL *edl = vwindow->get_edl();
630 double position = !edl ? 0 : edl->local_session->get_selectionstart(1) +
631 edl->session->get_frame_offset() / edl->session->frame_rate;
635 void VWindowEditing::set_position(double position)
637 EDL *edl = vwindow->get_edl();
639 if( get_position() != position ) {
640 position -= edl->session->get_frame_offset() / edl->session->frame_rate;
641 if( position < 0 ) position = 0;
642 edl->local_session->set_selectionstart(position);
643 edl->local_session->set_selectionend(position);
644 vwindow->update_position(CHANGE_NONE, 0, 1);
648 void VWindowEditing::set_inpoint()
650 vwindow->set_inpoint();
653 void VWindowEditing::set_outpoint()
655 vwindow->set_outpoint();
658 void VWindowEditing::clear_inpoint()
660 vwindow->clear_inpoint();
663 void VWindowEditing::clear_outpoint()
665 vwindow->clear_outpoint();
668 void VWindowEditing::to_clip()
670 if(vwindow->get_edl())
673 EDL *edl = vwindow->get_edl();
674 double start = edl->local_session->get_selectionstart();
675 double end = edl->local_session->get_selectionend();
677 if(EQUIV(start, end))
679 end = edl->tracks->total_length();
697 EDL *new_edl = new EDL(mwindow->edl);
698 new_edl->create_objects();
699 new_edl->load_xml(&file, LOAD_ALL);
700 sprintf(new_edl->local_session->clip_title,
701 _("Clip %d"), mwindow->session->clip_number++);
702 char string[BCTEXTLEN];
703 Units::totext(string,
705 edl->session->time_format,
706 edl->session->sample_rate,
707 edl->session->frame_rate,
708 edl->session->frames_per_foot);
710 sprintf(new_edl->local_session->clip_notes,
711 _("%s\n Created from:\n%s"), string, vwindow->gui->loaded_title);
713 new_edl->local_session->set_selectionstart(0);
714 new_edl->local_session->set_selectionend(0);
717 //printf("VWindowEditing::to_clip 1 %s\n", edl->local_session->clip_title);
718 new_edl->local_session->set_selectionstart(0.0);
719 new_edl->local_session->set_selectionend(0.0);
720 vwindow->clip_edit->create_clip(new_edl);
725 VWindowSource::VWindowSource(MWindow *mwindow, VWindowGUI *vwindow, int x, int y)
726 : BC_PopupTextBox(vwindow,
734 this->mwindow = mwindow;
735 this->vwindow = vwindow;
738 VWindowSource::~VWindowSource()
742 int VWindowSource::handle_event()
748 VWindowTransport::VWindowTransport(MWindow *mwindow,
752 : PlayTransport(mwindow,
760 EDL* VWindowTransport::get_edl()
762 return gui->vwindow->get_edl();
766 void VWindowTransport::goto_start()
768 gui->unlock_window();
769 handle_transport(REWIND, 1);
770 gui->lock_window("VWindowTransport::goto_start");
771 gui->vwindow->goto_start();
774 void VWindowTransport::goto_end()
776 gui->unlock_window();
777 handle_transport(GOTO_END, 1);
778 gui->lock_window("VWindowTransport::goto_end");
779 gui->vwindow->goto_end();
785 VWindowCanvas::VWindowCanvas(MWindow *mwindow, VWindowGUI *gui)
788 mwindow->theme->vcanvas_x,
789 mwindow->theme->vcanvas_y,
790 mwindow->theme->vcanvas_w,
791 mwindow->theme->vcanvas_h,
794 //printf("VWindowCanvas::VWindowCanvas %d %d\n", __LINE__, mwindow->theme->vcanvas_x);
795 this->mwindow = mwindow;
799 void VWindowCanvas::zoom_resize_window(float percentage)
801 EDL *edl = gui->vwindow->get_edl();
802 if(!edl) edl = mwindow->edl;
804 int canvas_w, canvas_h;
807 // Get required canvas size
808 calculate_sizes(edl->get_aspect_ratio(),
809 edl->session->output_w,
810 edl->session->output_h,
815 // Estimate window size from current borders
816 new_w = canvas_w + (gui->get_w() - mwindow->theme->vcanvas_w);
817 new_h = canvas_h + (gui->get_h() - mwindow->theme->vcanvas_h);
819 mwindow->session->vwindow_w = new_w;
820 mwindow->session->vwindow_h = new_h;
822 mwindow->theme->get_vwindow_sizes(gui);
824 // Estimate again from new borders
825 new_w = canvas_w + (mwindow->session->vwindow_w - mwindow->theme->vcanvas_w);
826 new_h = canvas_h + (mwindow->session->vwindow_h - mwindow->theme->vcanvas_h);
829 gui->resize_window(new_w, new_h);
830 gui->resize_event(new_w, new_h);
833 void VWindowCanvas::close_source()
835 gui->unlock_window();
836 gui->vwindow->playback_engine->interrupt_playback(1);
837 gui->lock_window("VWindowCanvas::close_source");
838 gui->vwindow->delete_source(1, 1);
842 void VWindowCanvas::draw_refresh(int flush)
844 EDL *edl = gui->vwindow->get_edl();
846 if(!get_canvas()->get_video_on()) get_canvas()->clear_box(0, 0, get_canvas()->get_w(), get_canvas()->get_h());
847 if(!get_canvas()->get_video_on() && refresh_frame && edl)
849 float in_x1, in_y1, in_x2, in_y2;
850 float out_x1, out_y1, out_x2, out_y2;
860 get_canvas()->draw_vframe(refresh_frame,
863 (int)(out_x2 - out_x1),
864 (int)(out_y2 - out_y1),
867 (int)(in_x2 - in_x1),
868 (int)(in_y2 - in_y1),
872 if(!get_canvas()->get_video_on())
875 get_canvas()->flash(flush);
879 void VWindowCanvas::draw_overlays()
881 if(mwindow->session->vcanvas_highlighted)
883 get_canvas()->set_color(WHITE);
884 get_canvas()->set_inverse();
885 get_canvas()->draw_rectangle(0, 0, get_canvas()->get_w(), get_canvas()->get_h());
886 get_canvas()->draw_rectangle(1, 1, get_canvas()->get_w() - 2, get_canvas()->get_h() - 2);
887 get_canvas()->set_opaque();
891 int VWindowCanvas::get_fullscreen()
893 return mwindow->session->vwindow_fullscreen;
896 void VWindowCanvas::set_fullscreen(int value)
898 mwindow->session->vwindow_fullscreen = value;
938 void VWindowGUI::update_points()
940 EDL *edl = vwindow->get_edl();
942 //printf("VWindowGUI::update_points 1\n");
945 //printf("VWindowGUI::update_points 2\n");
946 long pixel = (long)((double)edl->local_session->in_point /
947 edl->tracks->total_playable_length() *
948 (mwindow->theme->vtimebar_w -
950 mwindow->theme->in_point[0]->get_w())) +
951 mwindow->theme->in_point[0]->get_w();
953 //printf("VWindowGUI::update_points 3 %d\n", edl->local_session->in_point);
956 //printf("VWindowGUI::update_points 3.1\n");
957 if(edl->local_session->in_point >= 0)
959 //printf("VWindowGUI::update_points 4\n");
960 if(edl->local_session->in_point != in_point->position ||
961 in_point->pixel != pixel)
963 in_point->pixel = pixel;
964 in_point->reposition();
967 //printf("VWindowGUI::update_points 5\n");
968 in_point->position = edl->local_session->in_point;
970 //printf("VWindowGUI::update_points 6\n");
971 if(edl->equivalent(in_point->position, edl->local_session->get_selectionstart(1)) ||
972 edl->equivalent(in_point->position, edl->local_session->get_selectionend(1)))
976 //printf("VWindowGUI::update_points 7\n");
985 if(edl->local_session->in_point >= 0)
987 //printf("VWindowGUI::update_points 8 %p\n", mwindow->theme->in_point);
988 add_subwindow(in_point =
989 new VWindowInPoint(mwindow,
993 edl->local_session->in_point));
994 //printf("VWindowGUI::update_points 9\n");
996 //printf("VWindowGUI::update_points 10\n");
998 pixel = (long)((double)edl->local_session->out_point /
999 (edl->tracks->total_playable_length() + 0.5) *
1000 (mwindow->theme->vtimebar_w -
1002 mwindow->theme->in_point[0]->get_w())) +
1003 mwindow->theme->in_point[0]->get_w() *
1008 if(edl->local_session->out_point >= 0 && pixel >= 0 && pixel <= mwindow->theme->vtimebar_w)
1010 if(edl->local_session->out_point != out_point->position ||
1011 out_point->pixel != pixel)
1013 out_point->pixel = pixel;
1014 out_point->reposition();
1016 out_point->position = edl->local_session->out_point;
1018 if(edl->equivalent(out_point->position, edl->local_session->get_selectionstart(1)) ||
1019 edl->equivalent(out_point->position, edl->local_session->get_selectionend(1)))
1020 out_point->update(1);
1022 out_point->update(0);
1031 if(edl->local_session->out_point >= 0 && pixel >= 0 && pixel <= mwindow->theme->vtimebar_w)
1033 add_subwindow(out_point =
1034 new VWindowOutPoint(mwindow,
1038 edl->local_session->out_point));
1043 void VWindowGUI::update_labels()
1045 EDL *edl = vwindow->get_edl();
1048 for(Label *current = edl->labels->first;
1052 long pixel = (long)((current->position - edl->local_session->view_start) / edl->local_session->zoom_sample);
1054 if(pixel >= 0 && pixel < mwindow->theme->vtimebar_w)
1057 if(output >= labels.total)
1059 LabelGUI *new_label;
1060 add_subwindow(new_label = new LabelGUI(mwindow, this, pixel, 0, current->position));
1061 labels.append(new_label);
1064 // Reposition old label
1065 if(labels.values[output]->pixel != pixel)
1067 labels.values[output]->pixel = pixel;
1068 labels.values[output]->position = current->position;
1069 labels.values[output]->reposition();
1072 if(mwindow->edl->local_session->get_selectionstart(1) <= current->position &&
1073 mwindow->edl->local_session->get_selectionend(1) >= current->position)
1074 labels.values[output]->update(1);
1076 if(labels.values[output]->get_value())
1077 labels.values[output]->update(0);
1082 // Delete excess labels
1083 while(labels.total > output)
1085 labels.remove_object();
1091 VWindowInPoint::VWindowInPoint(MWindow *mwindow,
1096 : InPointGUI(mwindow,
1104 int VWindowInPoint::handle_event()
1106 EDL *edl = gui->vwindow->get_edl();
1110 double position = edl->align_to_frame(this->position, 0);
1112 edl->local_session->set_selectionstart(position);
1113 edl->local_session->set_selectionend(position);
1114 gui->timebar->update(1);
1117 mwindow->vwindow->update_position(CHANGE_NONE, 0, 1, 0);
1124 VWindowOutPoint::VWindowOutPoint(MWindow *mwindow,
1129 : OutPointGUI(mwindow,
1137 int VWindowOutPoint::handle_event()
1139 EDL *edl = gui->vwindow->get_edl();
1143 double position = edl->align_to_frame(this->position, 0);
1145 edl->local_session->set_selectionstart(position);
1146 edl->local_session->set_selectionend(position);
1147 gui->timebar->update(1);
1150 mwindow->vwindow->update_position(CHANGE_NONE, 0, 1, 0);