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);
181 class EditCopy : public BC_Button
184 EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y);
187 int keypress_event();
194 class EditAppend : public BC_Button
197 EditAppend(MWindow *mwindow, EditPanel *panel, int x, int y);
206 class EditInsert : public BC_Button
209 EditInsert(MWindow *mwindow, EditPanel *panel, int x, int y);
218 class EditPaste : public BC_Button
221 EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y);
224 int keypress_event();
231 class EditTransition : public BC_Button
234 EditTransition(MWindow *mwindow, EditPanel *panel, int x, int y);
241 class EditPresentation : public BC_Button
244 EditPresentation(MWindow *mwindow, EditPanel *panel, int x, int y);
251 class EditUndo : public BC_Button
254 EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y);
256 int keypress_event();
262 class EditRedo : public BC_Button
265 EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y);
267 int keypress_event();
273 class EditLabelbutton : public BC_Button
276 EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int y);
278 int keypress_event();
284 class EditFit : public BC_Button
287 EditFit(MWindow *mwindow, EditPanel *panel, int x, int y);
289 int keypress_event();
295 class EditFitAutos : public BC_Button
298 EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y);
300 int keypress_event();
307 class EditPrevLabel : public BC_Button
310 EditPrevLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
313 int keypress_event();
320 class EditNextLabel : public BC_Button
323 EditNextLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
326 int keypress_event();
333 class EditPrevEdit : public BC_Button
336 EditPrevEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
339 int keypress_event();
346 class EditNextEdit : public BC_Button
349 EditNextEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
352 int keypress_event();
360 class ArrowButton : public BC_Toggle
363 ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y);
369 class IBeamButton : public BC_Toggle
372 IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y);
378 class KeyFrameButton : public BC_Toggle
381 KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
387 class LockLabelsButton : public BC_Toggle
390 LockLabelsButton(MWindow *mwindow, int x, int y);
399 EditPanel(MWindow *mwindow, BC_WindowBase *subwindow,
400 int window_id, int x, int y,
401 int editing_mode, // From edl.inc
402 int use_editing_mode,
404 int use_splice, // Extra buttons
408 int use_copy, // Use copy when in EDITING_ARROW
422 void set_meters(MeterPanel *meter_panel);
423 static int calculate_w(MWindow *mwindow, int use_keyframe, int total_buttons);
424 static int calculate_h(MWindow *mwindow);
426 void create_buttons();
427 void stop_transport(const char *lock_msg);
428 void reposition_buttons(int x, int y);
429 void create_objects();
431 virtual void copy_selection();
432 virtual void splice_selection();
433 virtual void overwrite_selection();
434 virtual void set_inpoint();
435 virtual void set_outpoint();
436 virtual void unset_inoutpoint();
437 virtual void to_clip() = 0;
438 virtual void toggle_label();
439 virtual void prev_label(int cut);
440 virtual void next_label(int cut);
441 virtual void prev_edit(int cut);
442 virtual void next_edit(int cut);
443 virtual double get_position();
444 virtual void set_position(double position);
447 BC_WindowBase *subwindow;
448 MeterPanel *meter_panel;
453 int use_editing_mode;
473 EditFitAutos *fit_autos;
474 EditInPoint *inpoint;
475 EditOutPoint *outpoint;
476 // EditDelInPoint *delinpoint;
477 // EditDelOutPoint *deloutpoint;
479 EditOverwrite *overwrite;
481 EditExtract *extract;
484 EditCommercial *commercial;
485 EditManualGoto *mangoto;
486 EditClick2Play *click2play;
489 EditLabelbutton *labelbutton;
490 EditPrevLabel *prevlabel;
491 EditNextLabel *nextlabel;
492 EditPrevEdit *prevedit;
493 EditNextEdit *nextedit;
499 KeyFrameButton *keyframe;
500 LockLabelsButton *locklabels;
502 int is_mwindow() { return window_id == MWINDOW_ID; }
503 int is_cwindow() { return window_id == CWINDOW_ID; }
504 int is_vwindow() { return window_id == VWINDOW_ID; }