4 * Copyright (C) 2008 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
26 #include "editpanel.inc"
27 #include "meterpanel.inc"
28 #include "mwindow.inc"
29 #include "manualgoto.inc"
34 class EditInPoint : public BC_Button
37 EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
45 class EditOutPoint : public BC_Button
48 EditOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
56 class EditDelInPoint : public BC_Button
59 EditDelInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
67 class EditDelOutPoint : public BC_Button
70 EditDelOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
78 class EditSplice : public BC_Button
81 EditSplice(MWindow *mwindow, EditPanel *panel, int x, int y);
89 class EditOverwrite : public BC_Button
92 EditOverwrite(MWindow *mwindow, EditPanel *panel, int x, int y);
100 class EditLift : public BC_Button
103 EditLift(MWindow *mwindow, EditPanel *panel, int x, int y);
110 class EditExtract : public BC_Button
113 EditExtract(MWindow *mwindow, EditPanel *panel, int x, int y);
120 class EditToClip : public BC_Button
123 EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y);
126 int keypress_event();
131 class EditManualGoto : public BC_Button
134 EditManualGoto(MWindow *mwindow, EditPanel *panel, int x, int y);
137 int keypress_event();
143 class EditCut : public BC_Button
146 EditCut(MWindow *mwindow, EditPanel *panel, int x, int y);
149 int keypress_event();
156 class EditCommercial : public BC_Button
159 EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y);
162 int keypress_event();
169 class EditClick2Play : public BC_Toggle
172 EditClick2Play(MWindow *mwindow, EditPanel *panel, int x, int y);
176 int keypress_event();
182 class EditCopy : public BC_Button
185 EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y);
188 int keypress_event();
195 class EditAppend : public BC_Button
198 EditAppend(MWindow *mwindow, EditPanel *panel, int x, int y);
207 class EditInsert : public BC_Button
210 EditInsert(MWindow *mwindow, EditPanel *panel, int x, int y);
219 class EditPaste : public BC_Button
222 EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y);
225 int keypress_event();
232 class EditTransition : public BC_Button
235 EditTransition(MWindow *mwindow, EditPanel *panel, int x, int y);
242 class EditPresentation : public BC_Button
245 EditPresentation(MWindow *mwindow, EditPanel *panel, int x, int y);
252 class EditUndo : public BC_Button
255 EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y);
257 int keypress_event();
263 class EditRedo : public BC_Button
266 EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y);
268 int keypress_event();
274 class EditLabelbutton : public BC_Button
277 EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int y);
279 int keypress_event();
285 class EditFit : public BC_Button
288 EditFit(MWindow *mwindow, EditPanel *panel, int x, int y);
290 int keypress_event();
296 class EditFitAutos : public BC_Button
299 EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y);
301 int keypress_event();
308 class EditPrevLabel : public BC_Button
311 EditPrevLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
314 int keypress_event();
321 class EditNextLabel : public BC_Button
324 EditNextLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
327 int keypress_event();
334 class EditPrevEdit : public BC_Button
337 EditPrevEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
340 int keypress_event();
347 class EditNextEdit : public BC_Button
350 EditNextEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
353 int keypress_event();
361 class ArrowButton : public BC_Toggle
364 ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y);
370 class IBeamButton : public BC_Toggle
373 IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y);
379 class KeyFrameButton : public BC_Toggle
382 KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
384 int keypress_event();
389 class LockLabelsButton : public BC_Toggle
392 LockLabelsButton(MWindow *mwindow, int x, int y);
401 EditPanel(MWindow *mwindow, BC_WindowBase *subwindow,
402 int window_id, int x, int y,
403 int editing_mode, // From edl.inc
404 int use_editing_mode,
406 int use_splice, // Extra buttons
410 int use_copy, // Use copy when in EDITING_ARROW
424 void set_meters(MeterPanel *meter_panel);
425 static int calculate_w(MWindow *mwindow, int use_keyframe, int total_buttons);
426 static int calculate_h(MWindow *mwindow);
428 void create_buttons();
429 void stop_transport(const char *lock_msg);
430 void reposition_buttons(int x, int y);
431 void create_objects();
433 virtual void copy_selection();
434 virtual void splice_selection();
435 virtual void overwrite_selection();
436 virtual void set_inpoint();
437 virtual void set_outpoint();
438 virtual void unset_inoutpoint();
439 virtual void to_clip() = 0;
440 virtual void toggle_label();
441 virtual void prev_label(int cut);
442 virtual void next_label(int cut);
443 virtual void prev_edit(int cut);
444 virtual void next_edit(int cut);
445 virtual double get_position();
446 virtual void set_position(double position);
449 BC_WindowBase *subwindow;
450 MeterPanel *meter_panel;
455 int use_editing_mode;
475 EditFitAutos *fit_autos;
476 EditInPoint *inpoint;
477 EditOutPoint *outpoint;
478 // EditDelInPoint *delinpoint;
479 // EditDelOutPoint *deloutpoint;
481 EditOverwrite *overwrite;
483 EditExtract *extract;
486 EditCommercial *commercial;
487 EditManualGoto *mangoto;
488 EditClick2Play *click2play;
491 EditLabelbutton *labelbutton;
492 EditPrevLabel *prevlabel;
493 EditNextLabel *nextlabel;
494 EditPrevEdit *prevedit;
495 EditNextEdit *nextedit;
501 KeyFrameButton *keyframe;
502 LockLabelsButton *locklabels;
504 int is_mwindow() { return window_id == MWINDOW_ID; }
505 int is_cwindow() { return window_id == CWINDOW_ID; }
506 int is_vwindow() { return window_id == VWINDOW_ID; }