r370: Heroine Virutal's official release 1.2.1
[cinelerra_cv/mob.git] / hvirtual / cinelerra / timebar.C
blob29ee3c8e6a33a55ea81cb9fc8cca8d7c917bc0cf
1 #include "clip.h"
2 #include "cplayback.h"
3 #include "cursors.h"
4 #include "cwindow.h"
5 #include "edl.h"
6 #include "edlsession.h"
7 #include "filexml.h"
8 #include "fonts.h"
9 #include "labels.h"
10 #include "localsession.h"
11 #include "maincursor.h"
12 #include "mbuttons.h"
13 #include "mwindow.h"
14 #include "mwindowgui.h"
15 #include "patchbay.h"
16 #include "preferences.h"
17 #include "recordlabel.h"
18 #include "localsession.h"
19 #include "mainsession.h"
20 #include "theme.h"
21 #include "timebar.h"
22 #include "trackcanvas.h"
23 #include "tracks.h"
24 #include "transportque.h"
25 #include "units.h"
26 #include "vframe.h"
27 #include "vwindow.h"
28 #include "vwindowgui.h"
29 #include "zoombar.h"
32 LabelGUI::LabelGUI(MWindow *mwindow, 
33         TimeBar *timebar, 
34         int64_t pixel, 
35         int y, 
36         double position,
37         VFrame **data)
38  : BC_Toggle(translate_pixel(mwindow, pixel), 
39                 y, 
40                 data ? data : mwindow->theme->label_toggle,
41                 0)
43         this->mwindow = mwindow;
44         this->timebar = timebar;
45         this->gui = 0;
46         this->pixel = pixel;
47         this->position = position;
50 LabelGUI::~LabelGUI()
54 int LabelGUI::get_y(MWindow *mwindow, TimeBar *timebar)
56 //      if(timebar)
57 //              return 0;
58 //      else
60                 return timebar->get_h() - 
61                         mwindow->theme->label_toggle[0]->get_h();
64 int LabelGUI::translate_pixel(MWindow *mwindow, int pixel)
66         int result = pixel - mwindow->theme->label_toggle[0]->get_w() / 2;
67         return result;
70 void LabelGUI::reposition()
72         reposition_window(translate_pixel(mwindow, pixel), BC_Toggle::get_y());
75 int LabelGUI::handle_event()
77 //      update(1);
78         timebar->select_label(position);
79         return 1;
89 InPointGUI::InPointGUI(MWindow *mwindow, 
90         TimeBar *timebar, 
91         int64_t pixel, 
92         double position)
93  : LabelGUI(mwindow, 
94         timebar, 
95         pixel, 
96         get_y(mwindow, timebar), 
97         position, 
98         mwindow->theme->in_point)
100 //printf("InPointGUI::InPointGUI %d %d\n", pixel, get_y(mwindow, timebar));
102 InPointGUI::~InPointGUI()
105 int InPointGUI::get_y(MWindow *mwindow, TimeBar *timebar)
107         int result;
108         result = timebar->get_h() - 
109                 mwindow->theme->in_point[0]->get_h();
110         return result;
114 OutPointGUI::OutPointGUI(MWindow *mwindow, 
115         TimeBar *timebar, 
116         int64_t pixel, 
117         double position)
118  : LabelGUI(mwindow, 
119         timebar, 
120         pixel, 
121         get_y(mwindow, timebar), 
122         position, 
123         mwindow->theme->out_point)
125 //printf("OutPointGUI::OutPointGUI %d %d\n", pixel, get_y(mwindow, timebar));
127 OutPointGUI::~OutPointGUI()
130 int OutPointGUI::get_y(MWindow *mwindow, TimeBar *timebar)
132         return timebar->get_h() - 
133                 mwindow->theme->out_point[0]->get_h();
137 PresentationGUI::PresentationGUI(MWindow *mwindow, 
138         TimeBar *timebar, 
139         int64_t pixel, 
140         double position)
141  : LabelGUI(mwindow, timebar, pixel, get_y(mwindow, timebar), position)
144 PresentationGUI::~PresentationGUI()
154 TimeBar::TimeBar(MWindow *mwindow, 
155         BC_WindowBase *gui,
156         int x, 
157         int y,
158         int w,
159         int h)
160  : BC_SubWindow(x, y, w, h)
162 //printf("TimeBar::TimeBar %d %d %d %d\n", x, y, w, h);
163         this->gui = gui;
164         this->mwindow = mwindow;
167 TimeBar::~TimeBar()
169         if(in_point) delete in_point;
170         if(out_point) delete out_point;
171         labels.remove_all_objects();
172         presentations.remove_all_objects();
175 int TimeBar::create_objects()
177         in_point = 0;
178         out_point = 0;
179         current_operation = TIMEBAR_NONE;
180         update();
181         return 0;
185 int64_t TimeBar::position_to_pixel(double position)
187         get_edl_length();
188         return (int64_t)(position / time_per_pixel);
192 void TimeBar::update_labels()
194         int output = 0;
195         EDL *edl = get_edl();
197 //printf("TimeBar::update_labels 1\n");
198         if(edl)
199         {
200                 for(Label *current = edl->labels->first;
201                         current;
202                         current = NEXT)
203                 {
204 //printf("TimeBar::update_labels 1 %p\n", current);
205                         int64_t pixel = position_to_pixel(current->position);
206 //printf("TimeBar::update_labels 2 %d\n", pixel);
208                         if(pixel >= 0 && pixel < get_w())
209                         {
210 //printf("TimeBar::update_labels 3\n");
211 // Create new label
212                                 if(output >= labels.total)
213                                 {
214                                         LabelGUI *new_label;
215                                         add_subwindow(new_label = 
216                                                 new LabelGUI(mwindow, 
217                                                         this, 
218                                                         pixel, 
219                                                         LabelGUI::get_y(mwindow, this), 
220                                                         current->position));
221                                         new_label->set_cursor(ARROW_CURSOR);
222                                         labels.append(new_label);
223                                 }
224                                 else
225 // Reposition old label
226                                 {
227                                         LabelGUI *gui = labels.values[output];
228                                         if(gui->pixel != pixel)
229                                         {
230                                                 gui->pixel = pixel;
231                                                 gui->reposition();
232 //printf("TimeBar::update_labels 4 %d\n", pixel);
233                                         }
234                                         else
235                                         {
236                                                 gui->draw_face();
237                                         }
239                                         labels.values[output]->position = current->position;
240                                 }
242                                 if(edl->local_session->selectionstart <= current->position &&
243                                         edl->local_session->selectionend >= current->position)
244                                         labels.values[output]->update(1);
245                                 else
246                                 if(labels.values[output]->get_value())
247                                         labels.values[output]->update(0);
249                                 output++;
250                         }
251                 }
252         }
254 // Delete excess labels
255         while(labels.total > output)
256         {
257 //printf("TimeBar::update_labels 9\n");
258                 labels.remove_object();
259         }
260 //printf("TimeBar::update_labels 10\n");
263 void TimeBar::update_highlights()
265         for(int i = 0; i < labels.total; i++)
266         {
267                 LabelGUI *label = labels.values[i];
268                 if(mwindow->edl->equivalent(label->position, mwindow->edl->local_session->selectionstart) ||
269                         mwindow->edl->equivalent(label->position, mwindow->edl->local_session->selectionend))
270                 {
271                         if(!label->get_value()) label->update(1);
272                 }
273                 else
274                         if(label->get_value()) label->update(0);
275         }
277         if(mwindow->edl->equivalent(mwindow->edl->local_session->in_point, mwindow->edl->local_session->selectionstart) ||
278                 mwindow->edl->equivalent(mwindow->edl->local_session->in_point, mwindow->edl->local_session->selectionend))
279         {
280                 if(in_point) in_point->update(1);
281         }
282         else
283                 if(in_point) in_point->update(0);
285         if(mwindow->edl->equivalent(mwindow->edl->local_session->out_point, mwindow->edl->local_session->selectionstart) ||
286                 mwindow->edl->equivalent(mwindow->edl->local_session->out_point, mwindow->edl->local_session->selectionend))
287         {
288                 if(out_point) out_point->update(1);
289         }
290         else
291                 if(out_point) out_point->update(0);
294 void TimeBar::update_points()
296         EDL *edl = get_edl();
297         int64_t pixel;
299         if(edl) pixel = position_to_pixel(edl->local_session->in_point);
300 //printf("TimeBar::update_points 1 %d\n", pixel);
303         if(in_point)
304         {
305                 if(edl && 
306                         edl->local_session->in_point >= 0 && 
307                         pixel >= 0 && 
308                         pixel < get_w())
309                 {
310                         if(edl->local_session->in_point != in_point->position ||
311                                 in_point->pixel != pixel)
312                         {
313                                 in_point->pixel = pixel;
314                                 in_point->position = edl->local_session->in_point;
315                                 in_point->reposition();
316                         }
317                         else
318                         {
319                                 in_point->draw_face();
320                         }
321                 }
322                 else
323                 {
324                         delete in_point;
325                         in_point = 0;
326                 }
327         }
328         else
329         if(edl && edl->local_session->in_point >= 0 && pixel >= 0 && pixel < get_w())
330         {
331 //printf("TimeBar::update_points 1 %p\n", edl);
332                 add_subwindow(in_point = new InPointGUI(mwindow, 
333                         this, 
334                         pixel, 
335                         edl->local_session->in_point));
336                 in_point->set_cursor(ARROW_CURSOR);
337 //printf("TimeBar::update_points 2\n");
338         }
340         if(edl) pixel = position_to_pixel(edl->local_session->out_point);
342 //printf("TimeBar::update_points 2 %d\n", pixel);
343         if(out_point)
344         {
345                 if(edl &&
346                         edl->local_session->out_point >= 0 && 
347                         pixel >= 0 && 
348                         pixel < get_w())
349                 {
350                         if(edl->local_session->out_point != out_point->position ||
351                                 out_point->pixel != pixel) 
352                         {
353                                 out_point->pixel = pixel;
354                                 out_point->position = edl->local_session->out_point;
355                                 out_point->reposition();
356                         }
357                         else
358                         {
359                                 out_point->draw_face();
360                         }
361                 }
362                 else
363                 {
364                         delete out_point;
365                         out_point = 0;
366                 }
367         }
368         else
369         if(edl && 
370                 edl->local_session->out_point >= 0 && 
371                 pixel >= 0 && pixel < get_w())
372         {
373                 add_subwindow(out_point = new OutPointGUI(mwindow, 
374                         this, 
375                         pixel, 
376                         edl->local_session->out_point));
377                 out_point->set_cursor(ARROW_CURSOR);
378         }
381 void TimeBar::update_presentations()
386 void TimeBar::update(int do_range, int do_others)
388         draw_time();
389 // Need to redo these when range is drawn to get the background updated.
390         update_labels();
391         update_points();
392         update_presentations();
393         flash();
398 int TimeBar::delete_project()
400 //      labels->delete_all();
401         return 0;
404 int TimeBar::save(FileXML *xml)
406 //      labels->save(xml);
407         return 0;
413 void TimeBar::draw_time()
417 EDL* TimeBar::get_edl()
419         return mwindow->edl;
424 void TimeBar::draw_range()
426         int x1 = 0, x2 = 0;
427         if(get_edl())
428         {
429                 get_preview_pixels(x1, x2);
431 //printf("TimeBar::draw_range %f %d %d\n", edl_length, x1, x2);
432                 draw_3segmenth(0, 0, x1, mwindow->theme->timebar_view_data);
433                 draw_top_background(get_parent(), x1, 0, x2 - x1, get_h());
434                 draw_3segmenth(x2, 0, get_w() - x2, mwindow->theme->timebar_view_data);
436                 set_color(BLACK);
437                 draw_line(x1, 0, x1, get_h());
438                 draw_line(x2, 0, x2, get_h());
439                 
440                 EDL *edl;
441                 if(edl = get_edl())
442                 {
443                         int64_t pixel = position_to_pixel(edl->local_session->selectionstart);
444 // Draw insertion point position if this timebar beint64_ts to a window which 
445 // has something other than the master EDL.
446 //printf("TimeBar::draw_range %f\n", edl->local_session->selectionstart);
447                         set_color(RED);
448                         draw_line(pixel, 0, pixel, get_h());
449                 }
450         }
451         else
452                 draw_top_background(get_parent(), 0, 0, get_w(), get_h());
455 void TimeBar::select_label(double position)
461 int TimeBar::draw()
463         return 0;
466 void TimeBar::get_edl_length()
468         edl_length = 0;
470         if(get_edl())
471         {
472 //printf("TimeBar::get_edl_length 1 %f\n", get_edl()->tracks->total_playable_length());
473                 edl_length = get_edl()->tracks->total_playable_length();
474         }
476 //printf("TimeBar::get_edl_length 2\n");
477         if(!EQUIV(edl_length, 0))
478         {
479 //printf("TimeBar::get_edl_length 3\n");
480                 time_per_pixel = edl_length / get_w();
481 //printf("TimeBar::get_edl_length 4\n");
482         }
483         else
484         {
485                 time_per_pixel = 0;
486         }
487 //printf("TimeBar::get_edl_length 5\n");
490 int TimeBar::get_preview_pixels(int &x1, int &x2)
492         x1 = 0;
493         x2 = 0;
495         get_edl_length();
497         if(get_edl())
498         {
499                 if(!EQUIV(edl_length, 0))
500                 {
501                         if(get_edl()->local_session->preview_end <= 0 ||
502                                 get_edl()->local_session->preview_end > edl_length)
503                                 get_edl()->local_session->preview_end = edl_length;
504                         if(get_edl()->local_session->preview_start > 
505                                 get_edl()->local_session->preview_end)
506                                 get_edl()->local_session->preview_start = 0;
507                         x1 = (int)(get_edl()->local_session->preview_start / time_per_pixel);
508                         x2 = (int)(get_edl()->local_session->preview_end / time_per_pixel);
509                 }
510                 else
511                 {
512                         x1 = 0;
513                         x2 = get_w();
514                 }
515         }
516 // printf("TimeBar::get_preview_pixels %f %f %d %d\n", 
517 //      get_edl()->local_session->preview_start,
518 //      get_edl()->local_session->preview_end,
519 //      x1, 
520 //      x2);
521         return 0;
525 int TimeBar::test_preview(int buttonpress)
527         int result = 0;
528         int x1, x2;
530         get_preview_pixels(x1, x2);
531 //printf("TimeBar::test_preview %d %d %d\n", x1, x2, get_cursor_x());
533         if(get_edl())
534         {
535 // Inside left handle
536                 if(cursor_inside() &&
537                         get_cursor_x() >= x1 - HANDLE_W &&
538                         get_cursor_x() < x1 + HANDLE_W &&
539 // Ignore left handle if both handles are up against the left side
540                         x2 > HANDLE_W)
541                 {
542                         if(buttonpress)
543                         {
544                                 current_operation = TIMEBAR_DRAG_LEFT;
545                                 start_position = get_edl()->local_session->preview_start;
546                                 start_cursor_x = get_cursor_x();
547                                 result = 1;
548                         }
549                         else
550                         if(get_cursor() != LEFT_CURSOR)
551                         {
552                                 result = 1;
553                                 set_cursor(LEFT_CURSOR);
554                         }
555                 }
556                 else
557 // Inside right handle
558                 if(cursor_inside() &&
559                         get_cursor_x() >= x2 - HANDLE_W &&
560                         get_cursor_x() < x2 + HANDLE_W &&
561 // Ignore right handle if both handles are up against the right side
562                         x1 < get_w() - HANDLE_W)
563                 {
564                         if(buttonpress)
565                         {
566                                 current_operation = TIMEBAR_DRAG_RIGHT;
567                                 start_position = get_edl()->local_session->preview_end;
568                                 start_cursor_x = get_cursor_x();
569                                 result = 1;
570                         }
571                         else
572                         if(get_cursor() != RIGHT_CURSOR)
573                         {
574                                 result = 1;
575                                 set_cursor(RIGHT_CURSOR);
576                         }
577                 }
578                 else
579                 if(cursor_inside() &&
580                         get_cursor_x() >= x1 &&
581                         get_cursor_x() < x2)
582                 {
583                         if(buttonpress)
584                         {
585                                 current_operation = TIMEBAR_DRAG_CENTER;
586                                 starting_start_position = get_edl()->local_session->preview_start;
587                                 starting_end_position = get_edl()->local_session->preview_end;
588                                 start_cursor_x = get_cursor_x();
589                                 result = 1;
590                         }
591                         else
592                         {
593                                 result = 1;
594                                 set_cursor(HSEPARATE_CURSOR);
595                         }
596                 }
597                 else
598                 {
599 // Trap all buttonpresses inside timebar
600                         if(cursor_inside() && buttonpress)
601                                 result = 1;
603                         if(get_cursor() == LEFT_CURSOR ||
604                                 get_cursor() == RIGHT_CURSOR)
605                         {
606                                 result = 1;
607                                 set_cursor(ARROW_CURSOR);
608                         }
609                 }
610         }
614         return result;
617 int TimeBar::move_preview(int &redraw)
619         int result = 0;
621         if(current_operation == TIMEBAR_DRAG_LEFT)
622         {
623                 get_edl()->local_session->preview_start = 
624                         start_position + 
625                         time_per_pixel * (get_cursor_x() - start_cursor_x);
626                 CLAMP(get_edl()->local_session->preview_start, 
627                         0, 
628                         get_edl()->local_session->preview_end);
629                 result = 1;
630         }
631         else
632         if(current_operation == TIMEBAR_DRAG_RIGHT)
633         {
634                 get_edl()->local_session->preview_end = 
635                         start_position + 
636                         time_per_pixel * (get_cursor_x() - start_cursor_x);
637                 CLAMP(get_edl()->local_session->preview_end, 
638                         get_edl()->local_session->preview_start, 
639                         edl_length);
640                 result = 1;
641         }
642         else
643         if(current_operation == TIMEBAR_DRAG_CENTER)
644         {
645                 get_edl()->local_session->preview_start = 
646                         starting_start_position +
647                         time_per_pixel * (get_cursor_x() - start_cursor_x);
648                 get_edl()->local_session->preview_end = 
649                         starting_end_position +
650                         time_per_pixel * (get_cursor_x() - start_cursor_x);
651                 if(get_edl()->local_session->preview_start < 0)
652                 {
653                         get_edl()->local_session->preview_end -= get_edl()->local_session->preview_start;
654                         get_edl()->local_session->preview_start = 0;
655                 }
656                 else
657                 if(get_edl()->local_session->preview_end > edl_length)
658                 {
659                         get_edl()->local_session->preview_start -= get_edl()->local_session->preview_end - edl_length;
660                         get_edl()->local_session->preview_end = edl_length;
661                 }
662                 result = 1;
663         }
665 //printf("TimeBar::move_preview %f %f\n", get_edl()->local_session->preview_start, get_edl()->local_session->preview_end);
667         if(result)
668         {
669                 update_preview();
670                 redraw = 1;
671         }
673         return result;
676 void TimeBar::update_preview()
680 int TimeBar::samplemovement()
682         return 0;
685 void TimeBar::stop_playback()
689 int TimeBar::button_press_event()
691 //printf("TimeBar::button_press_event 1\n");
692         if(is_event_win() && cursor_inside())
693         {
694 // Change time format
695                 if(ctrl_down())
696                 {
697                         mwindow->next_time_format();
698                         return 1;
699                 }
700                 else
701                 if(test_preview(1))
702                 {
703                 }
704                 else
705                 {
706                         stop_playback();
708 // Select region between two labels
709                         if(get_double_click())
710                         {
711                                 double position = (double)get_cursor_x() * 
712                                         mwindow->edl->local_session->zoom_sample / 
713                                         mwindow->edl->session->sample_rate + 
714                                         (double)mwindow->edl->local_session->view_start *
715                                         mwindow->edl->local_session->zoom_sample / 
716                                         mwindow->edl->session->sample_rate;
717 // Test labels
718                                 select_region(position);
719                                 return 1;
720                         }
721                         else
722         // Reposition highlight cursor
723                         if(is_event_win() && cursor_inside())
724                         {
725         //printf("TimeBar::button_press_event 4\n");
726                                 update_cursor();
727         //printf("TimeBar::button_press_event 5\n");
728                                 mwindow->gui->canvas->activate();
729         //printf("TimeBar::button_press_event 6\n");
730                                 return 1;
731                         }
732                 }
733         }
734         return 0;
737 int TimeBar::repeat_event(int64_t duration)
739         if(!mwindow->gui->canvas->drag_scroll) return 0;
740         if(duration != BC_WindowBase::get_resources()->scroll_repeat) return 0;
742         int distance = 0;
743         int x_movement = 0;
744         int relative_cursor_x = mwindow->gui->canvas->get_relative_cursor_x();
745         if(current_operation == TIMEBAR_DRAG)
746         {
747                 if(relative_cursor_x >= mwindow->gui->canvas->get_w())
748                 {
749                         distance = relative_cursor_x - mwindow->gui->canvas->get_w();
750                         x_movement = 1;
751                 }
752                 else
753                 if(relative_cursor_x < 0)
754                 {
755                         distance = relative_cursor_x;
756                         x_movement = 1;
757                 }
761                 if(x_movement)
762                 {
763                         update_cursor();
764                         mwindow->samplemovement(mwindow->edl->local_session->view_start + 
765                                 distance);
766                 }
767                 return 1;
768         }
769         return 0;
772 int TimeBar::cursor_motion_event()
774         int result = 0;
775         int redraw = 0;
777         switch(current_operation)
778         {
779                 case TIMEBAR_DRAG:
780                 {
781                         update_cursor();
782 //printf("TimeBar::cursor_motion_event 1\n");
783                         int relative_cursor_x = mwindow->gui->canvas->get_relative_cursor_x();
784                         if(relative_cursor_x >= mwindow->gui->canvas->get_w() || 
785                                 relative_cursor_x < 0)
786                         {
787                                 mwindow->gui->canvas->start_dragscroll();
788                         }
789                         else
790                         if(relative_cursor_x < mwindow->gui->canvas->get_w() && 
791                                 relative_cursor_x >= 0)
792                         {
793                                 mwindow->gui->canvas->stop_dragscroll();
794                         }
795                         result = 1;
796 //printf("TimeBar::cursor_motion_event 10\n");
797                         break;
798                 }
801                 case TIMEBAR_DRAG_LEFT:
802                 case TIMEBAR_DRAG_RIGHT:
803                 case TIMEBAR_DRAG_CENTER:
804                         result = move_preview(redraw);
805                         break;
807                 default:
808 //printf("TimeBar::cursor_motion_event 20\n");
809                         result = test_preview(0);
810 //printf("TimeBar::cursor_motion_event 30\n");
811                         break;
812         }
814         if(redraw)
815         {
816                 update();
817         }
819         return result;
822 int TimeBar::button_release_event()
824 //printf("TimeBar::button_release_event %d\n", current_operation);
825         int result = 0;
826         switch(current_operation)
827         {
828                 case TIMEBAR_DRAG:
829                         mwindow->gui->canvas->stop_dragscroll();
830                         current_operation = TIMEBAR_NONE;
831                         result = 1;
832                         break;
834                 default:
835                         if(current_operation != TIMEBAR_NONE)
836                         {
837                                 current_operation = TIMEBAR_NONE;
838                                 result = 1;
839                         }
840                         break;
841         }
842         return result;
845 // Update the selection cursor during a dragging operation
846 void TimeBar::update_cursor()
848         double position = (double)get_cursor_x() * 
849                 mwindow->edl->local_session->zoom_sample / 
850                 mwindow->edl->session->sample_rate + 
851                 (double)mwindow->edl->local_session->view_start * 
852                 mwindow->edl->local_session->zoom_sample / 
853                 mwindow->edl->session->sample_rate;
854         
855         position = mwindow->edl->align_to_frame(position, 0);
856         position = MAX(0, position);
857         current_operation = TIMEBAR_DRAG;
859         mwindow->select_point(position);
860         update_highlights();
864 int TimeBar::select_region(double position)
866         Label *start = 0, *end = 0, *current;
867         for(current = mwindow->edl->labels->first; current; current = NEXT)
868         {
869                 if(current->position > position)
870                 {
871                         end = current;
872                         break;
873                 }
874         }
876         for(current = mwindow->edl->labels->last ; current; current = PREVIOUS)
877         {
878                 if(current->position <= position)
879                 {
880                         start = current;
881                         break;
882                 }
883         }
885 // Select region
886         if(end != start)
887         {
888                 if(!start)
889                         mwindow->edl->local_session->selectionstart = 0;
890                 else
891                         mwindow->edl->local_session->selectionstart = start->position;
893                 if(!end)
894                         mwindow->edl->local_session->selectionend = mwindow->edl->tracks->total_length();
895                 else
896                         mwindow->edl->local_session->selectionend = end->position;
897         }
898         else
899         if(end || start)
900         {
901                 mwindow->edl->local_session->selectionstart = 
902                         mwindow->edl->local_session->selectionend = 
903                         start->position;
904         }
906 // Que the CWindow
907         mwindow->cwindow->update(1, 0, 0);
908         mwindow->gui->cursor->hide();
909         mwindow->gui->cursor->draw();
910         mwindow->gui->canvas->flash();
911         mwindow->gui->canvas->activate();
912         mwindow->gui->zoombar->update();
913         update_highlights();
914         return 0;
917 int TimeBar::copy(int64_t start, int64_t end, FileXML *xml)
919 //      labels->copy(start, end, xml);
920         return 0;
923 int TimeBar::paste(int64_t start, int64_t end, int64_t sample_length, FileXML *xml)
925 //      labels->paste(start, end, sample_length, xml);
926         return 0;
929 int TimeBar::paste_output(int64_t startproject, int64_t endproject, int64_t startsource, int64_t endsource, RecordLabels *new_labels)
931 //      labels->paste_output(startproject, endproject, startsource, endsource, new_labels);
932         return 0;
935 int TimeBar::clear(int64_t start, int64_t end)
937 //labels->clear(start, end);    
938         return 0;
941 int TimeBar::paste_silence(int64_t start, int64_t end)
943 //labels->paste_silence(start, end);    
944         return 0;
947 int TimeBar::modify_handles(int64_t oldposition, int64_t newposition, int currentend)
949 //labels->modify_handles(oldposition, newposition, currentend);         
950         return 0;
956 int TimeBar::delete_arrows()
958         return 0;