00001 #include "awindow.h"
00002 #include "awindowgui.h"
00003 #include "bcsignals.h"
00004 #include "clipedit.h"
00005 #include "cplayback.h"
00006 #include "cwindow.h"
00007 #include "editpanel.h"
00008 #include "edl.h"
00009 #include "edlsession.h"
00010 #include "filexml.h"
00011 #include "keys.h"
00012 #include "language.h"
00013 #include "localsession.h"
00014 #include "mainclock.h"
00015 #include "mainundo.h"
00016 #include "mbuttons.h"
00017 #include "meterpanel.h"
00018 #include "mwindow.h"
00019 #include "mwindowgui.h"
00020 #include "playbackengine.h"
00021 #include "theme.h"
00022 #include "timebar.h"
00023 #include "trackcanvas.h"
00024 #include "transportque.h"
00025 #include "zoombar.h"
00026 #include "manualgoto.h"
00027
00028
00029
00030 EditPanel::EditPanel(MWindow *mwindow,
00031 BC_WindowBase *subwindow,
00032 int x,
00033 int y,
00034 int editing_mode,
00035 int use_editing_mode,
00036 int use_keyframe,
00037 int use_splice,
00038 int use_overwrite,
00039 int use_lift,
00040 int use_extract,
00041 int use_copy,
00042 int use_paste,
00043 int use_undo,
00044 int use_fit,
00045 int use_locklabels,
00046 int use_labels,
00047 int use_toclip,
00048 int use_meters,
00049 int is_mwindow,
00050 int use_cut)
00051 {
00052 this->editing_mode = editing_mode;
00053 this->use_editing_mode = use_editing_mode;
00054 this->use_keyframe = use_keyframe;
00055 this->use_splice = use_splice;
00056 this->use_overwrite = use_overwrite;
00057 this->use_lift = 0;
00058 this->use_extract = 0;
00059 this->use_copy = use_copy;
00060 this->use_paste = use_paste;
00061 this->use_undo = use_undo;
00062 this->mwindow = mwindow;
00063 this->subwindow = subwindow;
00064 this->use_fit = use_fit;
00065 this->use_labels = use_labels;
00066 this->use_locklabels = use_locklabels;
00067 this->use_toclip = use_toclip;
00068 this->use_meters = use_meters;
00069 this->is_mwindow = is_mwindow;
00070 this->use_cut = use_cut;
00071
00072 this->x = x;
00073 this->y = y;
00074 this->meter_panel = 0;
00075 arrow = 0;
00076 ibeam = 0;
00077 keyframe = 0;
00078 fit = 0;
00079 fit_autos = 0;
00080 locklabels = 0;
00081 }
00082
00083 EditPanel::~EditPanel()
00084 {
00085 }
00086
00087 void EditPanel::set_meters(MeterPanel *meter_panel)
00088 {
00089 this->meter_panel = meter_panel;
00090 }
00091
00092
00093 void EditPanel::update()
00094 {
00095 int new_editing_mode = mwindow->edl->session->editing_mode;
00096 if(arrow) arrow->update(new_editing_mode == EDITING_ARROW);
00097 if(ibeam) ibeam->update(new_editing_mode == EDITING_IBEAM);
00098 if(keyframe) keyframe->update(mwindow->edl->session->auto_keyframes);
00099 if(locklabels) locklabels->set_value(mwindow->edl->session->labels_follow_edits);
00100 subwindow->flush();
00101 }
00102
00103 void EditPanel::delete_buttons()
00104 {
00105 if(use_editing_mode)
00106 {
00107 if(arrow) delete arrow;
00108 if(ibeam) delete ibeam;
00109 }
00110
00111 if(use_keyframe)
00112 delete keyframe;
00113
00114 if(use_locklabels)
00115 delete locklabels;
00116
00117 if(inpoint) delete inpoint;
00118 if(outpoint) delete outpoint;
00119 if(use_copy) delete copy;
00120 if(use_splice) delete splice;
00121 if(use_overwrite) delete overwrite;
00122 if(use_lift) delete lift;
00123 if(use_extract) delete extract;
00124 if(cut) delete cut;
00125 if(copy) delete copy;
00126 if(use_paste) delete paste;
00127
00128 if(use_labels)
00129 {
00130 delete labelbutton;
00131 delete prevlabel;
00132 delete nextlabel;
00133 }
00134
00135 if(use_fit)
00136 {
00137 delete fit;
00138 delete fit_autos;
00139 }
00140 if(use_undo)
00141 {
00142 delete undo;
00143 delete redo;
00144 }
00145 }
00146
00147 void EditPanel::create_buttons()
00148 {
00149 x1 = x, y1 = y;
00150
00151
00152 SET_TRACE
00153 if(use_editing_mode)
00154 {
00155 subwindow->add_subwindow(arrow = new ArrowButton(mwindow, this, x1, y1));
00156 x1 += arrow->get_w();
00157 subwindow->add_subwindow(ibeam = new IBeamButton(mwindow, this, x1, y1));
00158 x1 += ibeam->get_w();
00159 x1 += mwindow->theme->toggle_margin;
00160 }
00161
00162 if(use_keyframe)
00163 {
00164 subwindow->add_subwindow(keyframe = new KeyFrameButton(mwindow, x1, y1));
00165 x1 += keyframe->get_w();
00166 }
00167
00168 if(use_locklabels)
00169 {
00170 subwindow->add_subwindow(locklabels = new LockLabelsButton(mwindow,
00171 x1,
00172 y1));
00173 x1 += locklabels->get_w();
00174 }
00175 if(use_keyframe || use_locklabels)
00176 x1 += mwindow->theme->toggle_margin;
00177
00178
00179 subwindow->add_subwindow(inpoint = new EditInPoint(mwindow, this, x1, y1));
00180 x1 += inpoint->get_w();
00181 subwindow->add_subwindow(outpoint = new EditOutPoint(mwindow, this, x1, y1));
00182 x1 += outpoint->get_w();
00183 if(use_splice)
00184 {
00185 subwindow->add_subwindow(splice = new EditSplice(mwindow, this, x1, y1));
00186 x1 += splice->get_w();
00187 }
00188 if(use_overwrite)
00189 {
00190 subwindow->add_subwindow(overwrite = new EditOverwrite(mwindow, this, x1, y1));
00191 x1 += overwrite->get_w();
00192 }
00193 if(use_lift)
00194 {
00195 subwindow->add_subwindow(lift = new EditLift(mwindow, this, x1, y1));
00196 x1 += lift->get_w();
00197 }
00198 if(use_extract)
00199 {
00200 subwindow->add_subwindow(extract = new EditExtract(mwindow, this, x1, y1));
00201 x1 += extract->get_w();
00202 }
00203 if(use_toclip)
00204 {
00205 subwindow->add_subwindow(clip = new EditToClip(mwindow, this, x1, y1));
00206 x1 += clip->get_w();
00207 }
00208
00209 if(use_cut)
00210 {
00211 subwindow->add_subwindow(cut = new EditCut(mwindow, this, x1, y1));
00212 x1 += cut->get_w();
00213 }
00214 if(use_copy)
00215 {
00216 subwindow->add_subwindow(copy = new EditCopy(mwindow, this, x1, y1));
00217 x1 += copy->get_w();
00218 }
00219 if(use_paste)
00220 {
00221 subwindow->add_subwindow(paste = new EditPaste(mwindow, this, x1, y1));
00222 x1 += paste->get_w();
00223 }
00224
00225 if(use_meters)
00226 {
00227 if(!meter_panel)
00228 {
00229 printf("EditPanel::create_objects: meter_panel == 0\n");
00230 }
00231 subwindow->add_subwindow(meters = new MeterShow(mwindow, meter_panel, x1, y1));
00232 x1 += meters->get_w();
00233 }
00234
00235 if(use_labels)
00236 {
00237 subwindow->add_subwindow(labelbutton = new EditLabelbutton(mwindow,
00238 this,
00239 x1,
00240 y1));
00241 x1 += labelbutton->get_w();
00242 subwindow->add_subwindow(prevlabel = new EditPrevLabel(mwindow,
00243 this,
00244 x1,
00245 y1,
00246 is_mwindow));
00247 x1 += prevlabel->get_w();
00248 subwindow->add_subwindow(nextlabel = new EditNextLabel(mwindow,
00249 this,
00250 x1,
00251 y1,
00252 is_mwindow));
00253 x1 += nextlabel->get_w();
00254 }
00255
00256 if(use_fit)
00257 {
00258 subwindow->add_subwindow(fit = new EditFit(mwindow, this, x1, y1));
00259 x1 += fit->get_w();
00260 subwindow->add_subwindow(fit_autos = new EditFitAutos(mwindow, this, x1, y1));
00261 x1 += fit_autos->get_w();
00262 }
00263
00264 if(use_undo)
00265 {
00266 subwindow->add_subwindow(undo = new EditUndo(mwindow, this, x1, y1));
00267 x1 += undo->get_w();
00268 subwindow->add_subwindow(redo = new EditRedo(mwindow, this, x1, y1));
00269 x1 += redo->get_w();
00270 }
00271 subwindow->add_subwindow(mangoto = new EditManualGoto(mwindow, this, x1, y1));
00272 x1 += mangoto->get_w();
00273
00274 SET_TRACE
00275 }
00276
00277
00278
00279 void EditPanel::toggle_label()
00280 {
00281 mwindow->toggle_label(is_mwindow);
00282 }
00283
00284 void EditPanel::prev_label()
00285 {
00286 int shift_down = subwindow->shift_down();
00287 if(is_mwindow)
00288 {
00289 mwindow->gui->unlock_window();
00290 }
00291 else
00292 subwindow->unlock_window();
00293
00294 mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
00295
00296 if(!is_mwindow)
00297 subwindow->lock_window("EditPanel::prev_label 1");
00298
00299 mwindow->gui->lock_window("EditPanel::prev_label 2");
00300
00301 mwindow->prev_label(shift_down);
00302
00303 if(!is_mwindow)
00304 mwindow->gui->unlock_window();
00305 }
00306
00307 void EditPanel::next_label()
00308 {
00309 int shift_down = subwindow->shift_down();
00310 if(is_mwindow)
00311 {
00312 mwindow->gui->unlock_window();
00313 }
00314 else
00315 subwindow->unlock_window();
00316
00317 mwindow->gui->mbuttons->transport->handle_transport(STOP, 1, 0, 0);
00318
00319 if(!is_mwindow)
00320 subwindow->lock_window("EditPanel::next_label 1");
00321
00322 mwindow->gui->lock_window("EditPanel::next_label 2");
00323
00324 mwindow->next_label(shift_down);
00325
00326 if(!is_mwindow)
00327 mwindow->gui->unlock_window();
00328 }
00329
00330
00331
00332
00333 void EditPanel::reposition_buttons(int x, int y)
00334 {
00335 this->x = x;
00336 this->y = y;
00337 x1 = x, y1 = y;
00338
00339 if(use_editing_mode)
00340 {
00341 arrow->reposition_window(x1, y1);
00342 x1 += arrow->get_w();
00343 ibeam->reposition_window(x1, y1);
00344 x1 += ibeam->get_w();
00345 x1 += mwindow->theme->toggle_margin;
00346 }
00347
00348 if(use_keyframe)
00349 {
00350 keyframe->reposition_window(x1, y1);
00351 x1 += keyframe->get_w();
00352 }
00353
00354 if(use_locklabels)
00355 {
00356 locklabels->reposition_window(x1,y1);
00357 x1 += locklabels->get_w();
00358 }
00359
00360 if(use_keyframe || use_locklabels)
00361 x1 += mwindow->theme->toggle_margin;
00362
00363 inpoint->reposition_window(x1, y1);
00364 x1 += inpoint->get_w();
00365 outpoint->reposition_window(x1, y1);
00366 x1 += outpoint->get_w();
00367 if(use_splice)
00368 {
00369 splice->reposition_window(x1, y1);
00370 x1 += splice->get_w();
00371 }
00372 if(use_overwrite)
00373 {
00374 overwrite->reposition_window(x1, y1);
00375 x1 += overwrite->get_w();
00376 }
00377 if(use_lift)
00378 {
00379 lift->reposition_window(x1, y1);
00380 x1 += lift->get_w();
00381 }
00382 if(use_extract)
00383 {
00384 extract->reposition_window(x1, y1);
00385 x1 += extract->get_w();
00386 }
00387 if(use_toclip)
00388 {
00389 clip->reposition_window(x1, y1);
00390 x1 += clip->get_w();
00391 }
00392 if(use_cut)
00393 {
00394 cut->reposition_window(x1, y1);
00395 x1 += cut->get_w();
00396 }
00397 if(use_copy)
00398 {
00399 copy->reposition_window(x1, y1);
00400 x1 += copy->get_w();
00401 }
00402 if(use_paste)
00403 {
00404 paste->reposition_window(x1, y1);
00405 x1 += paste->get_w();
00406 }
00407
00408 if(use_meters)
00409 {
00410 meters->reposition_window(x1, y1);
00411 x1 += meters->get_w();
00412 }
00413
00414 if(use_labels)
00415 {
00416 labelbutton->reposition_window(x1, y1);
00417 x1 += labelbutton->get_w();
00418 prevlabel->reposition_window(x1, y1);
00419 x1 += prevlabel->get_w();
00420 nextlabel->reposition_window(x1, y1);
00421 x1 += nextlabel->get_w();
00422 }
00423
00424 if(use_fit)
00425 {
00426 fit->reposition_window(x1, y1);
00427 x1 += fit->get_w();
00428 fit_autos->reposition_window(x1, y1);
00429 x1 += fit_autos->get_w();
00430 }
00431
00432 if(use_undo)
00433 {
00434 undo->reposition_window(x1, y1);
00435 x1 += undo->get_w();
00436 redo->reposition_window(x1, y1);
00437 x1 += redo->get_w();
00438 }
00439
00440 mangoto->reposition_window(x1, y1);
00441 x1 += mangoto->get_w();
00442 }
00443
00444
00445
00446 int EditPanel::create_objects()
00447 {
00448 create_buttons();
00449 return 0;
00450 }
00451
00452 int EditPanel::get_w()
00453 {
00454 return x1 - x;
00455 }
00456
00457
00458 void EditPanel::copy_selection()
00459 {
00460 mwindow->copy();
00461 }
00462
00463 void EditPanel::splice_selection()
00464 {
00465 }
00466
00467 void EditPanel::overwrite_selection()
00468 {
00469 }
00470
00471 void EditPanel::set_inpoint()
00472 {
00473 mwindow->set_inpoint(1);
00474 }
00475
00476 void EditPanel::set_outpoint()
00477 {
00478 mwindow->set_outpoint(1);
00479 }
00480
00481 void EditPanel::clear_inpoint()
00482 {
00483 mwindow->delete_inpoint();
00484 }
00485
00486 void EditPanel::clear_outpoint()
00487 {
00488 mwindow->delete_outpoint();
00489 }
00490
00491 void EditPanel::to_clip()
00492 {
00493 mwindow->to_clip();
00494 }
00495
00496
00497 EditInPoint::EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y)
00498 : BC_Button(x, y, mwindow->theme->get_image_set("inbutton"))
00499 {
00500 this->mwindow = mwindow;
00501 this->panel = panel;
00502 set_tooltip(_("In point ( [ )"));
00503 }
00504 EditInPoint::~EditInPoint()
00505 {
00506 }
00507 int EditInPoint::handle_event()
00508 {
00509 panel->set_inpoint();
00510 return 1;
00511 }
00512 int EditInPoint::keypress_event()
00513 {
00514 if(get_keypress() == '[')
00515 {
00516 panel->set_inpoint();
00517 return 1;
00518 }
00519 return 0;
00520 }
00521
00522 EditOutPoint::EditOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y)
00523 : BC_Button(x, y, mwindow->theme->get_image_set("outbutton"))
00524 {
00525 this->mwindow = mwindow;
00526 this->panel = panel;
00527 set_tooltip(_("Out point ( ] )"));
00528 }
00529 EditOutPoint::~EditOutPoint()
00530 {
00531 }
00532 int EditOutPoint::handle_event()
00533 {
00534 panel->set_outpoint();
00535 return 1;
00536 }
00537 int EditOutPoint::keypress_event()
00538 {
00539 if(get_keypress() == ']')
00540 {
00541 panel->set_outpoint();
00542 return 1;
00543 }
00544 return 0;
00545 }
00546
00547
00548 EditNextLabel::EditNextLabel(MWindow *mwindow,
00549 EditPanel *panel,
00550 int x,
00551 int y,
00552 int is_mwindow)
00553 : BC_Button(x, y, mwindow->theme->get_image_set("nextlabel"))
00554 {
00555 this->mwindow = mwindow;
00556 this->panel = panel;
00557 this->is_mwindow = is_mwindow;
00558 set_tooltip(_("Next label ( ctrl -> )"));
00559 }
00560 EditNextLabel::~EditNextLabel()
00561 {
00562 }
00563 int EditNextLabel::keypress_event()
00564 {
00565 if(get_keypress() == RIGHT && ctrl_down())
00566 return handle_event();
00567 return 0;
00568 }
00569 int EditNextLabel::handle_event()
00570 {
00571 panel->next_label();
00572 return 1;
00573 }
00574
00575 EditPrevLabel::EditPrevLabel(MWindow *mwindow,
00576 EditPanel *panel,
00577 int x,
00578 int y,
00579 int is_mwindow)
00580 : BC_Button(x, y, mwindow->theme->get_image_set("prevlabel"))
00581 {
00582 this->mwindow = mwindow;
00583 this->panel = panel;
00584 this->is_mwindow = is_mwindow;
00585 set_tooltip(_("Previous label ( ctrl <- )"));
00586 }
00587 EditPrevLabel::~EditPrevLabel()
00588 {
00589 }
00590 int EditPrevLabel::keypress_event()
00591 {
00592 if(get_keypress() == LEFT && ctrl_down())
00593 return handle_event();
00594 return 0;
00595 }
00596 int EditPrevLabel::handle_event()
00597 {
00598 panel->prev_label();
00599 return 1;
00600 }
00601
00602 EditLift::EditLift(MWindow *mwindow, EditPanel *panel, int x, int y)
00603 : BC_Button(x, y, mwindow->theme->lift_data)
00604 {
00605 this->mwindow = mwindow;
00606 this->panel = panel;
00607 set_tooltip(_("Lift"));
00608 }
00609 EditLift::~EditLift()
00610 {
00611 }
00612 int EditLift::handle_event()
00613 {
00614 return 1;
00615 }
00616
00617 EditOverwrite::EditOverwrite(MWindow *mwindow, EditPanel *panel, int x, int y)
00618 : BC_Button(x, y, mwindow->theme->overwrite_data)
00619 {
00620 this->mwindow = mwindow;
00621 this->panel = panel;
00622 set_tooltip(_("Overwrite ( b )"));
00623 }
00624 EditOverwrite::~EditOverwrite()
00625 {
00626 }
00627 int EditOverwrite::handle_event()
00628 {
00629 panel->overwrite_selection();
00630 return 1;
00631 }
00632 int EditOverwrite::keypress_event()
00633 {
00634 if(get_keypress() == 'b')
00635 {
00636 handle_event();
00637 return 1;
00638 }
00639 return 0;
00640 }
00641
00642 EditExtract::EditExtract(MWindow *mwindow, EditPanel *panel, int x, int y)
00643 : BC_Button(x, y, mwindow->theme->extract_data)
00644 {
00645 this->mwindow = mwindow;
00646 this->panel = panel;
00647 set_tooltip(_("Extract"));
00648 }
00649 EditExtract::~EditExtract()
00650 {
00651 }
00652 int EditExtract::handle_event()
00653 {
00654
00655 return 1;
00656 }
00657
00658 EditToClip::EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y)
00659 : BC_Button(x, y, mwindow->theme->get_image_set("toclip"))
00660 {
00661 this->mwindow = mwindow;
00662 this->panel = panel;
00663 set_tooltip(_("To clip ( i )"));
00664 }
00665 EditToClip::~EditToClip()
00666 {
00667 }
00668 int EditToClip::handle_event()
00669 {
00670 panel->to_clip();
00671 return 1;
00672 }
00673
00674 int EditToClip::keypress_event()
00675 {
00676 if(get_keypress() == 'i')
00677 {
00678 handle_event();
00679 return 1;
00680 }
00681 return 0;
00682 }
00683
00684 EditManualGoto::EditManualGoto(MWindow *mwindow, EditPanel *panel, int x, int y)
00685 : BC_Button(x, y, mwindow->theme->get_image_set("goto"))
00686 {
00687 this->mwindow = mwindow;
00688 this->panel = panel;
00689 mangoto = new ManualGoto(mwindow, panel->subwindow);
00690 set_tooltip(_("Manual goto ( g )"));
00691 }
00692 EditManualGoto::~EditManualGoto()
00693 {
00694 delete mangoto;
00695 }
00696 int EditManualGoto::handle_event()
00697 {
00698 mangoto->open_window();
00699 return 1;
00700 }
00701
00702 int EditManualGoto::keypress_event()
00703 {
00704 if(get_keypress() == 'g')
00705 {
00706 handle_event();
00707 return 1;
00708 }
00709 return 0;
00710 }
00711
00712
00713 EditSplice::EditSplice(MWindow *mwindow, EditPanel *panel, int x, int y)
00714 : BC_Button(x, y, mwindow->theme->splice_data)
00715 {
00716 this->mwindow = mwindow;
00717 this->panel = panel;
00718 set_tooltip(_("Splice ( v )"));
00719 }
00720 EditSplice::~EditSplice()
00721 {
00722 }
00723 int EditSplice::handle_event()
00724 {
00725 panel->splice_selection();
00726 return 1;
00727 }
00728 int EditSplice::keypress_event()
00729 {
00730 if(get_keypress() == 'v')
00731 {
00732 handle_event();
00733 return 1;
00734 }
00735 return 0;
00736 }
00737
00738 EditCut::EditCut(MWindow *mwindow, EditPanel *panel, int x, int y)
00739 : BC_Button(x, y, mwindow->theme->get_image_set("cut"))
00740 {
00741 this->mwindow = mwindow;
00742 this->panel = panel;
00743 set_tooltip(_("Cut ( x )"));
00744 }
00745 EditCut::~EditCut()
00746 {
00747 }
00748 int EditCut::keypress_event()
00749 {
00750 if(get_keypress() == 'x')
00751 return handle_event();
00752 return 0;
00753 }
00754
00755 int EditCut::handle_event()
00756 {
00757 if(!panel->is_mwindow) mwindow->gui->lock_window("EditCut::handle_event");
00758 mwindow->cut();
00759 if(!panel->is_mwindow) mwindow->gui->unlock_window();
00760 return 1;
00761 }
00762
00763 EditCopy::EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y)
00764 : BC_Button(x, y, mwindow->theme->get_image_set("copy"))
00765 {
00766 this->mwindow = mwindow;
00767 this->panel = panel;
00768 set_tooltip(_("Copy ( c )"));
00769 }
00770 EditCopy::~EditCopy()
00771 {
00772 }
00773
00774 int EditCopy::keypress_event()
00775 {
00776 if(get_keypress() == 'c')
00777 return handle_event();
00778 return 0;
00779 }
00780 int EditCopy::handle_event()
00781 {
00782 panel->copy_selection();
00783 return 1;
00784 }
00785
00786 EditAppend::EditAppend(MWindow *mwindow, EditPanel *panel, int x, int y)
00787 : BC_Button(x, y, mwindow->theme->append_data)
00788 {
00789 this->mwindow = mwindow;
00790 this->panel = panel;
00791 set_tooltip(_("Append to end of track"));
00792 }
00793 EditAppend::~EditAppend()
00794 {
00795 }
00796
00797
00798 int EditAppend::handle_event()
00799 {
00800 return 1;
00801 }
00802
00803
00804 EditInsert::EditInsert(MWindow *mwindow, EditPanel *panel, int x, int y)
00805 : BC_Button(x, y, mwindow->theme->insert_data)
00806 {
00807 this->mwindow = mwindow;
00808 this->panel = panel;
00809 set_tooltip(_("Insert before beginning of track"));
00810 }
00811 EditInsert::~EditInsert()
00812 {
00813 }
00814
00815
00816 int EditInsert::handle_event()
00817 {
00818
00819 return 1;
00820 }
00821
00822
00823 EditPaste::EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y)
00824 : BC_Button(x, y, mwindow->theme->get_image_set("paste"))
00825 {
00826 this->mwindow = mwindow;
00827 this->panel = panel;
00828 set_tooltip(_("Paste ( v )"));
00829 }
00830 EditPaste::~EditPaste()
00831 {
00832 }
00833
00834 int EditPaste::keypress_event()
00835 {
00836 if(get_keypress() == 'v')
00837 return handle_event();
00838 return 0;
00839 }
00840 int EditPaste::handle_event()
00841 {
00842 if(!panel->is_mwindow) mwindow->gui->lock_window("EditPaste::handle_event");
00843 mwindow->paste();
00844 if(!panel->is_mwindow) mwindow->gui->unlock_window();
00845 return 1;
00846 }
00847
00848
00849
00850 EditTransition::EditTransition(MWindow *mwindow, EditPanel *panel, int x, int y)
00851 : BC_Button(x, y, mwindow->theme->transition_data)
00852 {
00853 this->mwindow = mwindow;
00854 this->panel = panel;