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 "meterpanel.inc"
27 #include "mwindow.inc"
28 #include "manualgoto.inc"
33 class EditInPoint : public BC_Button
36 EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
44 class EditOutPoint : public BC_Button
47 EditOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
55 class EditDelInPoint : public BC_Button
58 EditDelInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
66 class EditDelOutPoint : public BC_Button
69 EditDelOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
77 class EditSplice : public BC_Button
80 EditSplice(MWindow *mwindow, EditPanel *panel, int x, int y);
88 class EditOverwrite : public BC_Button
91 EditOverwrite(MWindow *mwindow, EditPanel *panel, int x, int y);
99 class EditLift : public BC_Button
102 EditLift(MWindow *mwindow, EditPanel *panel, int x, int y);
109 class EditExtract : public BC_Button
112 EditExtract(MWindow *mwindow, EditPanel *panel, int x, int y);
119 class EditToClip : public BC_Button
122 EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y);
125 int keypress_event();
130 class EditManualGoto : public BC_Button
133 EditManualGoto(MWindow *mwindow, EditPanel *panel, int x, int y);
136 int keypress_event();
142 class EditCut : public BC_Button
145 EditCut(MWindow *mwindow, EditPanel *panel, int x, int y);
148 int keypress_event();
155 class EditCommercial : public BC_Button
158 EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y);
161 int keypress_event();
168 class EditCopy : public BC_Button
171 EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y);
174 int keypress_event();
181 class EditAppend : public BC_Button
184 EditAppend(MWindow *mwindow, EditPanel *panel, int x, int y);
193 class EditInsert : public BC_Button
196 EditInsert(MWindow *mwindow, EditPanel *panel, int x, int y);
205 class EditPaste : public BC_Button
208 EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y);
211 int keypress_event();
218 class EditTransition : public BC_Button
221 EditTransition(MWindow *mwindow, EditPanel *panel, int x, int y);
228 class EditPresentation : public BC_Button
231 EditPresentation(MWindow *mwindow, EditPanel *panel, int x, int y);
238 class EditUndo : public BC_Button
241 EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y);
243 int keypress_event();
249 class EditRedo : public BC_Button
252 EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y);
254 int keypress_event();
260 class EditLabelbutton : public BC_Button
263 EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int y);
265 int keypress_event();
271 class EditFit : public BC_Button
274 EditFit(MWindow *mwindow, EditPanel *panel, int x, int y);
276 int keypress_event();
282 class EditFitAutos : public BC_Button
285 EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y);
287 int keypress_event();
294 class EditPrevLabel : public BC_Button
297 EditPrevLabel(MWindow *mwindow,
304 int keypress_event();
312 class EditNextLabel : public BC_Button
315 EditNextLabel(MWindow *mwindow,
322 int keypress_event();
330 class EditPrevEdit : public BC_Button
333 EditPrevEdit(MWindow *mwindow,
340 int keypress_event();
348 class EditNextEdit : public BC_Button
351 EditNextEdit(MWindow *mwindow,
358 int keypress_event();
367 class ArrowButton : public BC_Toggle
370 ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y);
376 class IBeamButton : public BC_Toggle
379 IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y);
385 class KeyFrameButton : public BC_Toggle
388 KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
394 class LockLabelsButton : public BC_Toggle
397 LockLabelsButton(MWindow *mwindow, int x, int y);
406 EditPanel(MWindow *mwindow,
407 BC_WindowBase *subwindow,
410 int editing_mode, // From edl.inc
411 int use_editing_mode,
413 int use_splice, // Extra buttons
417 int use_copy, // Use copy when in EDITING_ARROW
430 void set_meters(MeterPanel *meter_panel);
431 static int calculate_w(MWindow *mwindow, int use_keyframe, int total_buttons);
432 static int calculate_h(MWindow *mwindow);
434 void create_buttons();
435 void reposition_buttons(int x, int y);
436 void create_objects();
438 virtual void copy_selection();
439 virtual void splice_selection();
440 virtual void overwrite_selection();
441 virtual void set_inpoint();
442 virtual void set_outpoint();
443 virtual void unset_inoutpoint();
444 virtual void to_clip() = 0;
445 virtual void toggle_label();
446 virtual void prev_label();
447 virtual void next_label();
448 virtual void prev_edit();
449 virtual void next_edit();
450 virtual double get_position();
451 virtual void set_position(double position);
454 BC_WindowBase *subwindow;
455 MeterPanel *meter_panel;
457 int use_editing_mode;
478 EditFitAutos *fit_autos;
479 EditInPoint *inpoint;
480 EditOutPoint *outpoint;
481 // EditDelInPoint *delinpoint;
482 // EditDelOutPoint *deloutpoint;
484 EditOverwrite *overwrite;
486 EditExtract *extract;
488 EditManualGoto *mangoto;
490 EditCommercial *commercial;
493 EditLabelbutton *labelbutton;
494 EditPrevLabel *prevlabel;
495 EditNextLabel *nextlabel;
496 EditPrevEdit *prevedit;
497 EditNextEdit *nextedit;
503 KeyFrameButton *keyframe;
504 LockLabelsButton *locklabels;