00001 #include "bcsignals.h"
00002 #include "clip.h"
00003 #include "cplayback.h"
00004 #include "cursors.h"
00005 #include "cwindow.h"
00006 #include "edl.h"
00007 #include "edlsession.h"
00008 #include "filexml.h"
00009 #include "fonts.h"
00010 #include "labels.h"
00011 #include "labeledit.h"
00012 #include "localsession.h"
00013 #include "maincursor.h"
00014 #include "mainundo.h"
00015 #include "mbuttons.h"
00016 #include "mwindow.h"
00017 #include "mwindowgui.h"
00018 #include "patchbay.h"
00019 #include "preferences.h"
00020 #include "recordlabel.h"
00021 #include "localsession.h"
00022 #include "mainsession.h"
00023 #include "theme.h"
00024 #include "timebar.h"
00025 #include "trackcanvas.h"
00026 #include "tracks.h"
00027 #include "transportque.h"
00028 #include "units.h"
00029 #include "vframe.h"
00030 #include "vwindow.h"
00031 #include "vwindowgui.h"
00032 #include "zoombar.h"
00033
00034
00035 LabelGUI::LabelGUI(MWindow *mwindow,
00036 TimeBar *timebar,
00037 int64_t pixel,
00038 int y,
00039 double position,
00040 VFrame **data)
00041 : BC_Toggle(translate_pixel(mwindow, pixel),
00042 y,
00043 data ? data : mwindow->theme->label_toggle,
00044 0)
00045 {
00046 this->mwindow = mwindow;
00047 this->timebar = timebar;
00048 this->gui = 0;
00049 this->pixel = pixel;
00050 this->position = position;
00051 this->label = 0;
00052 }
00053
00054 LabelGUI::~LabelGUI()
00055 {
00056 }
00057
00058 int LabelGUI::get_y(MWindow *mwindow, TimeBar *timebar)
00059 {
00060 return timebar->get_h() -
00061 mwindow->theme->label_toggle[0]->get_h();
00062 }
00063
00064 int LabelGUI::translate_pixel(MWindow *mwindow, int pixel)
00065 {
00066 int result = pixel - mwindow->theme->label_toggle[0]->get_w() / 2;
00067 return result;
00068 }
00069
00070 void LabelGUI::reposition()
00071 {
00072 reposition_window(translate_pixel(mwindow, pixel), BC_Toggle::get_y());
00073 }
00074
00075 int LabelGUI::button_press_event()
00076 {
00077 if (this->is_event_win() && get_buttonpress() == 3) {
00078 if (label)
00079 timebar->label_edit->edit_label(label);
00080 } else {
00081 BC_Toggle::button_press_event();
00082 }
00083 if (label)
00084 set_tooltip(this->label->textstr);
00085 }
00086
00087 int LabelGUI::handle_event()
00088 {
00089 timebar->select_label(position);
00090 return 1;
00091 }
00092
00093
00094
00095
00096
00097
00098
00099
00100 InPointGUI::InPointGUI(MWindow *mwindow,
00101 TimeBar *timebar,
00102 int64_t pixel,
00103 double position)
00104 : LabelGUI(mwindow,
00105 timebar,
00106 pixel,
00107 get_y(mwindow, timebar),
00108 position,
00109 mwindow->theme->in_point)
00110 {
00111
00112 }
00113 InPointGUI::~InPointGUI()
00114 {
00115 }
00116 int InPointGUI::get_y(MWindow *mwindow, TimeBar *timebar)
00117 {
00118 int result;
00119 result = timebar->get_h() -
00120 mwindow->theme->in_point[0]->get_h();
00121 return result;
00122 }
00123
00124
00125 OutPointGUI::OutPointGUI(MWindow *mwindow,
00126 TimeBar *timebar,
00127 int64_t pixel,
00128 double position)
00129 : LabelGUI(mwindow,
00130 timebar,
00131 pixel,
00132 get_y(mwindow, timebar),
00133 position,
00134 mwindow->theme->out_point)
00135 {
00136
00137 }
00138 OutPointGUI::~OutPointGUI()
00139 {
00140 }
00141 int OutPointGUI::get_y(MWindow *mwindow, TimeBar *timebar)
00142 {
00143 return timebar->get_h() -
00144 mwindow->theme->out_point[0]->get_h();
00145 }
00146
00147
00148 PresentationGUI::PresentationGUI(MWindow *mwindow,
00149 TimeBar *timebar,
00150 int64_t pixel,
00151 double position)
00152 : LabelGUI(mwindow, timebar, pixel, get_y(mwindow, timebar), position)
00153 {
00154 }
00155 PresentationGUI::~PresentationGUI()
00156 {
00157 }
00158
00159
00160
00161
00162
00163
00164
00165 TimeBar::TimeBar(MWindow *mwindow,
00166 BC_WindowBase *gui,
00167 int x,
00168 int y,
00169 int w,
00170 int h)
00171 : BC_SubWindow(x, y, w, h)
00172 {
00173
00174 this->gui = gui;
00175 this->mwindow = mwindow;
00176 label_edit = new LabelEdit(mwindow, mwindow->awindow, 0);
00177 }
00178
00179 TimeBar::~TimeBar()
00180 {
00181 if(in_point) delete in_point;
00182 if(out_point) delete out_point;
00183 if(label_edit) delete label_edit;
00184 labels.remove_all_objects();
00185 presentations.remove_all_objects();
00186 }
00187
00188 int TimeBar::create_objects()
00189 {
00190 in_point = 0;
00191 out_point = 0;
00192 current_operation = TIMEBAR_NONE;
00193 update();
00194 return 0;
00195 }
00196
00197
00198 int64_t TimeBar::position_to_pixel(double position)
00199 {
00200 get_edl_length();
00201 return (int64_t)(position / time_per_pixel);
00202 }
00203
00204
00205 void TimeBar::update_labels()
00206 {
00207 int output = 0;
00208 EDL *edl = get_edl();
00209
00210 if(edl)
00211 {
00212 for(Label *current = edl->labels->first;
00213 current;
00214 current = NEXT)
00215 {
00216 int64_t pixel = position_to_pixel(current->position);
00217
00218 if(pixel >= 0 && pixel < get_w())
00219 {
00220
00221 if(output >= labels.total)
00222 {
00223 LabelGUI *new_label;
00224 add_subwindow(new_label =
00225 new LabelGUI(mwindow,
00226 this,
00227 pixel,
00228 LabelGUI::get_y(mwindow, this),
00229 current->position));
00230 new_label->set_cursor(ARROW_CURSOR);
00231 new_label->set_tooltip(current->textstr);
00232 new_label->label = current;
00233 labels.append(new_label);
00234 }
00235 else
00236
00237 {
00238 LabelGUI *gui = labels.values[output];
00239 if(gui->pixel != pixel)
00240 {
00241 gui->pixel = pixel;
00242 gui->reposition();
00243 }
00244 else
00245 {
00246 gui->draw_face();
00247 }
00248
00249 labels.values[output]->position = current->position;
00250 labels.values[output]->set_tooltip(current->textstr);
00251 labels.values[output]->label = current;
00252 }
00253
00254 if(edl->local_session->get_selectionstart(1) <= current->position &&
00255 edl->local_session->get_selectionend(1) >= current->position)
00256 labels.values[output]->update(1);
00257 else
00258 if(labels.values[output]->get_value())
00259 labels.values[output]->update(0);
00260
00261 output++;
00262 }
00263 }
00264 }
00265
00266
00267 while(labels.total > output)
00268 {
00269 labels.remove_object();
00270 }
00271 }
00272
00273 void TimeBar::update_highlights()
00274 {
00275 for(int i = 0; i < labels.total; i++)
00276 {
00277 LabelGUI *label = labels.values[i];
00278 if(mwindow->edl->equivalent(label->position,
00279 mwindow->edl->local_session->get_selectionstart(1)) ||
00280 mwindow->edl->equivalent(label->position,
00281 mwindow->edl->local_session->get_selectionend(1)))
00282 {
00283 if(!label->get_value()) label->update(1);
00284 }
00285 else
00286 if(label->get_value()) label->update(0);
00287 }
00288
00289 if(mwindow->edl->equivalent(mwindow->edl->local_session->get_inpoint(),
00290 mwindow->edl->local_session->get_selectionstart(1)) ||
00291 mwindow->edl->equivalent(mwindow->edl->local_session->get_inpoint(),
00292 mwindow->edl->local_session->get_selectionend(1)))
00293 {
00294 if(in_point) in_point->update(1);
00295 }
00296 else
00297 if(in_point) in_point->update(0);
00298
00299 if(mwindow->edl->equivalent(mwindow->edl->local_session->get_outpoint(),
00300 mwindow->edl->local_session->get_selectionstart(1)) ||
00301 mwindow->edl->equivalent(mwindow->edl->local_session->get_outpoint(),
00302 mwindow->edl->local_session->get_selectionend(1)))
00303 {
00304 if(out_point) out_point->update(1);
00305 }
00306 else
00307 if(out_point) out_point->update(0);
00308 }
00309
00310 void TimeBar::update_points()
00311 {
00312 EDL *edl = get_edl();
00313 int64_t pixel;
00314
00315 if(edl) pixel = position_to_pixel(edl->local_session->get_inpoint());
00316
00317
00318 if(in_point)
00319 {
00320 if(edl &&
00321 edl->local_session->inpoint_valid() &&
00322 pixel >= 0 &&
00323 pixel < get_w())
00324 {
00325 if(!EQUIV(edl->local_session->get_inpoint(), in_point->position) ||
00326 in_point->pixel != pixel)
00327 {
00328 in_point->pixel = pixel;
00329 in_point->position = edl->local_session->get_inpoint();
00330 in_point->reposition();
00331 }
00332 else
00333 {
00334 in_point->draw_face();
00335 }
00336 }
00337 else
00338 {
00339 delete in_point;
00340 in_point = 0;
00341 }
00342 }
00343 else
00344 if(edl && edl->local_session->inpoint_valid() &&
00345 pixel >= 0 && pixel < get_w())
00346 {
00347 add_subwindow(in_point = new InPointGUI(mwindow,
00348 this,
00349 pixel,
00350 edl->local_session->get_inpoint()));
00351 in_point->set_cursor(ARROW_CURSOR);
00352 }
00353
00354 if(edl) pixel = position_to_pixel(edl->local_session->get_outpoint());
00355
00356 if(out_point)
00357 {
00358 if(edl &&
00359 edl->local_session->outpoint_valid() &&
00360 pixel >= 0 &&
00361 pixel < get_w())
00362 {
00363 if(!EQUIV(edl->local_session->get_outpoint(), out_point->position) ||
00364 out_point->pixel != pixel)
00365 {
00366 out_point->pixel = pixel;
00367 out_point->position = edl->local_session->get_outpoint();
00368 out_point->reposition();
00369 }
00370 else
00371 {
00372 out_point->draw_face();
00373 }
00374 }
00375 else
00376 {
00377 delete out_point;
00378 out_point = 0;
00379 }
00380 }
00381 else
00382 if(edl &&
00383 edl->local_session->outpoint_valid() &&
00384 pixel >= 0 && pixel < get_w())
00385 {
00386 add_subwindow(out_point = new OutPointGUI(mwindow,
00387 this,
00388 pixel,
00389 edl->local_session->get_outpoint()));
00390 out_point->set_cursor(ARROW_CURSOR);
00391 }
00392 }
00393
00394 void TimeBar::update_presentations()
00395 {
00396 }
00397
00398
00399 void TimeBar::update(int do_range, int do_others)
00400 {
00401 draw_time();
00402
00403 update_labels();
00404 update_points();
00405 update_presentations();
00406 flash();
00407 }
00408
00409
00410
00411 int TimeBar::delete_project()
00412 {
00413
00414 return 0;
00415 }
00416
00417 int TimeBar::save(FileXML *xml)
00418 {
00419
00420 return 0;
00421 }
00422
00423
00424
00425
00426 void TimeBar::draw_time()
00427 {
00428 }
00429
00430 EDL* TimeBar::get_edl()
00431 {
00432 return mwindow->edl;
00433 }
00434
00435
00436
00437 void TimeBar::draw_range()
00438 {
00439 int x1 = 0, x2 = 0;
00440 if(get_edl())
00441 {
00442 get_preview_pixels(x1, x2);
00443
00444
00445 draw_3segmenth(0, 0, x1, mwindow->theme->timebar_view_data);
00446 draw_top_background(get_parent(), x1, 0, x2 - x1, get_h());
00447 draw_3segmenth(x2, 0, get_w() - x2, mwindow->theme->timebar_view_data);
00448
00449 set_color(BLACK);
00450 draw_line(x1, 0, x1, get_h());
00451 draw_line(x2, 0, x2, get_h());
00452
00453 EDL *edl;
00454 if(edl = get_edl())
00455 {
00456 int64_t pixel = position_to_pixel(
00457 edl->local_session->get_selectionstart(1));
00458
00459
00460 set_color(RED);
00461 draw_line(pixel, 0, pixel, get_h());
00462 }
00463 }
00464 else
00465 draw_top_background(get_parent(), 0, 0, get_w(), get_h());
00466 }
00467
00468 void TimeBar::select_label(double position)
00469 {
00470 }
00471
00472
00473
00474 int TimeBar::draw()
00475 {
00476 return 0;
00477 }
00478
00479 void TimeBar::get_edl_length()
00480 {
00481 edl_length = 0;
00482
00483 if(get_edl())
00484 {
00485
00486 edl_length = get_edl()->tracks->total_playable_length();
00487 }
00488
00489
00490 if(!EQUIV(edl_length, 0))
00491 {
00492
00493 time_per_pixel = edl_length / get_w();
00494
00495 }
00496 else
00497 {
00498 time_per_pixel = 0;
00499 }
00500
00501 }
00502
00503 int TimeBar::get_preview_pixels(int &x1, int &x2)
00504 {
00505 x1 = 0;
00506 x2 = 0;
00507
00508 get_edl_length();
00509
00510 if(get_edl())
00511 {
00512 if(!EQUIV(edl_length, 0))
00513 {
00514 if(get_edl()->local_session->preview_end <= 0 ||
00515 get_edl()->local_session->preview_end > edl_length)
00516 get_edl()->local_session->preview_end = edl_length;
00517 if(get_edl()->local_session->preview_start >
00518 get_edl()->local_session->preview_end)
00519 get_edl()->local_session->preview_start = 0;
00520 x1 = (int)(get_edl()->local_session->preview_start / time_per_pixel);
00521 x2 = (int)(get_edl()->local_session->preview_end / time_per_pixel);
00522 }
00523 else
00524 {
00525 x1 = 0;
00526 x2 = get_w();
00527 }
00528 }
00529
00530
00531
00532
00533
00534 return 0;
00535 }
00536
00537
00538 int TimeBar::test_preview(int buttonpress)
00539 {
00540 int result = 0;
00541 int x1, x2;
00542
00543 get_preview_pixels(x1, x2);
00544
00545
00546 if(get_edl())
00547 {
00548
00549 if(cursor_inside() &&
00550 get_cursor_x() >= x1 - HANDLE_W &&
00551 get_cursor_x() < x1 + HANDLE_W &&
00552
00553 x2 > HANDLE_W)
00554 {
00555 if(buttonpress)
00556 {
00557 current_operation = TIMEBAR_DRAG_LEFT;
00558 start_position = get_edl()->local_session->preview_start;
00559 start_cursor_x = get_cursor_x();
00560 result = 1;
00561 }
00562 else
00563 if(get_cursor() != LEFT_CURSOR)
00564 {
00565 result = 1;
00566 set_cursor(LEFT_CURSOR);
00567 }
00568 }
00569 else
00570
00571 if(cursor_inside() &&
00572 get_cursor_x() >= x2 - HANDLE_W &&
00573 get_cursor_x() < x2 + HANDLE_W &&
00574
00575 x1 < get_w() - HANDLE_W)
00576 {
00577 if(buttonpress)
00578 {
00579 current_operation = TIMEBAR_DRAG_RIGHT;
00580 start_position = get_edl()->local_session->preview_end;
00581 start_cursor_x = get_cursor_x();
00582 result = 1;
00583 }
00584 else
00585 if(get_cursor() != RIGHT_CURSOR)
00586 {
00587 result = 1;
00588 set_cursor(RIGHT_CURSOR);
00589 }
00590 }
00591 else
00592 if(cursor_inside() &&
00593 get_cursor_x() >= x1 &&
00594 get_cursor_x() < x2)
00595 {
00596 if(buttonpress)
00597 {
00598 current_operation = TIMEBAR_DRAG_CENTER;
00599 starting_start_position = get_edl()->local_session->preview_start;
00600 starting_end_position = get_edl()->local_session->preview_end;
00601 start_cursor_x = get_cursor_x();
00602 result = 1;
00603 }
00604 else
00605 {
00606 result = 1;
00607 set_cursor(HSEPARATE_CURSOR);
00608 }
00609 }
00610 else
00611 {
00612
00613 if(cursor_inside() && buttonpress)
00614 result = 1;
00615
00616 if(get_cursor() == LEFT_CURSOR ||
00617 get_cursor() == RIGHT_CURSOR)
00618 {
00619 result = 1;
00620 set_cursor(ARROW_CURSOR);
00621 }
00622 }
00623 }
00624
00625
00626
00627 return result;
00628 }
00629
00630 int TimeBar::move_preview(int &redraw)
00631 {
00632 int result = 0;
00633
00634 if(current_operation == TIMEBAR_DRAG_LEFT)
00635 {
00636 get_edl()->local_session->preview_start =
00637 start_position +
00638 time_per_pixel * (get_cursor_x() - start_cursor_x);
00639 CLAMP(get_edl()->local_session->preview_start,
00640 0,
00641 get_edl()->local_session->preview_end);
00642 result = 1;
00643 }
00644 else
00645 if(current_operation == TIMEBAR_DRAG_RIGHT)
00646 {
00647 get_edl()->local_session->preview_end =
00648 start_position +
00649 time_per_pixel * (get_cursor_x() - start_cursor_x);
00650 CLAMP(get_edl()->local_session->preview_end,
00651 get_edl()->local_session->preview_start,
00652 edl_length);
00653 result = 1;
00654 }
00655 else
00656 if(current_operation == TIMEBAR_DRAG_CENTER)
00657 {
00658 get_edl()->local_session->preview_start =
00659 starting_start_position +
00660 time_per_pixel * (get_cursor_x() - start_cursor_x);
00661 get_edl()->local_session->preview_end =
00662 starting_end_position +
00663 time_per_pixel * (get_cursor_x() - start_cursor_x);
00664 if(get_edl()->local_session->preview_start < 0)
00665 {
00666 get_edl()->local_session->preview_end -= get_edl()->local_session->preview_start;
00667 get_edl()->local_session->preview_start = 0;
00668 }
00669 else
00670 if(get_edl()->local_session->preview_end > edl_length)
00671 {
00672 get_edl()->local_session->preview_start -= get_edl()->local_session->preview_end - edl_length;
00673 get_edl()->local_session->preview_end = edl_length;
00674 }
00675 result = 1;
00676 }
00677
00678
00679
00680 if(result)
00681 {
00682 update_preview();
00683 redraw = 1;
00684 }
00685
00686 return result;
00687 }
00688
00689 void TimeBar::update_preview()
00690 {
00691 }
00692
00693 int TimeBar::samplemovement()
00694 {
00695 return 0;
00696 }
00697
00698 void TimeBar::stop_playback()
00699 {
00700 }
00701
00702 int TimeBar::button_press_event()
00703 {
00704 if(is_event_win() && cursor_inside())
00705 {
00706
00707 if(ctrl_down())
00708 {
00709 if(get_buttonpress() == 1)
00710 mwindow->next_time_format();
00711 else
00712 if(get_buttonpress() == 2)
00713 mwindow->prev_time_format();
00714 return 1;
00715 }
00716 else
00717 if(test_preview(1))
00718 {
00719 }
00720 else
00721 {
00722 stop_playback();
00723
00724
00725 if(get_double_click())
00726 {
00727 double position = (double)get_cursor_x() *
00728 mwindow->edl->local_session->zoom_sample /
00729 mwindow->edl->session->sample_rate +
00730 (double)mwindow->edl->local_session->view_start *
00731 mwindow->edl->local_session->zoom_sample /
00732 mwindow->edl->session->sample_rate;
00733
00734 select_region(position);
00735 return 1;
00736 }
00737 else
00738
00739 if(is_event_win() && cursor_inside())
00740 {
00741 update_cursor();
00742 mwindow->gui->canvas->activate();
00743 return 1;
00744 }
00745 }
00746 }
00747 return 0;
00748 }
00749
00750 int TimeBar::repeat_event(int64_t duration)
00751 {
00752 if(!mwindow->gui->canvas->drag_scroll) return 0;
00753 if(duration != BC_WindowBase::get_resources()->scroll_repeat) return 0;
00754
00755 int distance = 0;
00756 int x_movement = 0;
00757 int relative_cursor_x = mwindow->gui->canvas->get_relative_cursor_x();
00758 if(current_operation == TIMEBAR_DRAG)
00759 {
00760 if(relative_cursor_x >= mwindow->gui->canvas->get_w())
00761 {
00762 distance = relative_cursor_x - mwindow->gui->canvas->get_w();
00763 x_movement = 1;
00764 }
00765 else
00766 if(relative_cursor_x < 0)
00767 {
00768 distance = relative_cursor_x;
00769 x_movement = 1;
00770 }
00771
00772
00773
00774 if(x_movement)
00775 {
00776 update_cursor();
00777 mwindow->samplemovement(mwindow->edl->local_session->view_start +
00778 distance);
00779 }
00780 return 1;
00781 }
00782 return 0;
00783 }
00784
00785 int TimeBar::cursor_motion_event()
00786 {
00787 int result = 0;
00788 int redraw = 0;
00789
00790 switch(current_operation)
00791 {
00792 case TIMEBAR_DRAG:
00793 {
00794 update_cursor();
00795
00796 int relative_cursor_x = mwindow->gui->canvas->get_relative_cursor_x();
00797 if(relative_cursor_x >= mwindow->gui->canvas->get_w() ||
00798 relative_cursor_x < 0)
00799 {
00800 mwindow->gui->canvas->start_dragscroll();
00801 }
00802 else
00803 if(relative_cursor_x < mwindow->gui->canvas->get_w() &&
00804 relative_cursor_x >= 0)
00805 {
00806 mwindow->gui->canvas->stop_dragscroll();
00807 }
00808 result = 1;
00809
00810 break;
00811 }
00812
00813
00814 case TIMEBAR_DRAG_LEFT:
00815 case TIMEBAR_DRAG_RIGHT:
00816 case TIMEBAR_DRAG_CENTER:
00817 result = move_preview(redraw);
00818 break;
00819
00820 default:
00821
00822 result = test_preview(0);
00823
00824 break;
00825 }
00826
00827 if(redraw)
00828 {
00829 update();
00830 }
00831
00832 return result;
00833 }
00834
00835 int TimeBar::button_release_event()
00836 {
00837
00838 int result = 0;
00839 switch(current_operation)
00840 {
00841 case TIMEBAR_DRAG:
00842 mwindow->undo->update_undo(_("select"), LOAD_SESSION, 0, 0);
00843 mwindow->gui->canvas->stop_dragscroll();
00844 current_operation = TIMEBAR_NONE;
00845 result = 1;
00846 break;
00847
00848 default:
00849 if(current_operation != TIMEBAR_NONE)
00850 {
00851 current_operation = TIMEBAR_NONE;
00852 result = 1;
00853 }
00854 break;
00855 }
00856 return result;
00857 }
00858
00859
00860 void TimeBar::update_cursor()
00861 {
00862 double position = (double)get_cursor_x() *
00863 mwindow->edl->local_session->zoom_sample /
00864 mwindow->edl->session->sample_rate +
00865 (double)mwindow->edl->local_session->view_start *
00866 mwindow->edl->local_session->zoom_sample /
00867 mwindow->edl->session->sample_rate;
00868
00869 position = mwindow->edl->align_to_frame(position, 0);
00870 position = MAX(0, position);
00871 current_operation = TIMEBAR_DRAG;
00872
00873 mwindow->select_point(position);
00874 update_highlights();
00875 }
00876
00877
00878 int TimeBar::select_region(double position)
00879 {
00880 Label *start = 0, *end = 0, *current;
00881 for(current = mwindow->edl->labels->first; current; current = NEXT)
00882 {
00883 if(current->position > position)
00884 {
00885 end = current;
00886 break;
00887 }
00888 }
00889
00890 for(current = mwindow->edl->labels->last ; current; current = PREVIOUS)
00891 {
00892 if(current->position <= position)
00893 {
00894 start = current;
00895 break;
00896 }
00897 }
00898
00899
00900 if(end != start)
00901 {
00902 if(!start)
00903 mwindow->edl->local_session->set_selectionstart(0);
00904 else
00905 mwindow->edl->local_session->set_selectionstart(start->position);
00906
00907 if(!end)
00908 mwindow->edl->local_session->set_selectionend(mwindow->edl->tracks->total_length());
00909 else
00910 mwindow->edl->local_session->set_selectionend(end->position);
00911 }
00912 else
00913 if(end || start)
00914 {
00915 mwindow->edl->local_session->set_selectionstart(start->position);
00916 mwindow->edl->local_session->set_selectionend(start->position);
00917 }
00918
00919
00920 mwindow->cwindow->update(1, 0, 0);
00921 mwindow->gui->cursor->hide(0);
00922 mwindow->gui->cursor->draw(1);
00923 mwindow->gui->canvas->flash();
00924 mwindow->gui->canvas->activate();
00925 mwindow->gui->zoombar->update();
00926 mwindow->undo->update_undo(_("select"), LOAD_SESSION, 0, 0);
00927 update_highlights();
00928 return 0;
00929 }
00930
00931
00932
00933
00934 int TimeBar::delete_arrows()
00935 {
00936 return 0;
00937 }
00938
00939