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"
32 class EditInPoint : public BC_Button
35 EditInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
43 class EditOutPoint : public BC_Button
46 EditOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
54 class EditDelInPoint : public BC_Button
57 EditDelInPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
65 class EditDelOutPoint : public BC_Button
68 EditDelOutPoint(MWindow *mwindow, EditPanel *panel, int x, int y);
76 class EditSplice : public BC_Button
79 EditSplice(MWindow *mwindow, EditPanel *panel, int x, int y);
87 class EditOverwrite : public BC_Button
90 EditOverwrite(MWindow *mwindow, EditPanel *panel, int x, int y);
98 class EditLift : public BC_Button
101 EditLift(MWindow *mwindow, EditPanel *panel, int x, int y);
108 class EditExtract : public BC_Button
111 EditExtract(MWindow *mwindow, EditPanel *panel, int x, int y);
118 class EditToClip : public BC_Button
121 EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y);
124 int keypress_event();
129 class EditCut : public BC_Button
132 EditCut(MWindow *mwindow, EditPanel *panel, int x, int y);
135 int keypress_event();
142 class EditCommercial : public BC_Button
145 EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y);
148 int keypress_event();
155 class EditCopy : public BC_Button
158 EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y);
161 int keypress_event();
168 class EditAppend : public BC_Button
171 EditAppend(MWindow *mwindow, EditPanel *panel, int x, int y);
180 class EditInsert : public BC_Button
183 EditInsert(MWindow *mwindow, EditPanel *panel, int x, int y);
192 class EditPaste : public BC_Button
195 EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y);
198 int keypress_event();
205 class EditTransition : public BC_Button
208 EditTransition(MWindow *mwindow, EditPanel *panel, int x, int y);
215 class EditPresentation : public BC_Button
218 EditPresentation(MWindow *mwindow, EditPanel *panel, int x, int y);
225 class EditUndo : public BC_Button
228 EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y);
230 int keypress_event();
236 class EditRedo : public BC_Button
239 EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y);
241 int keypress_event();
247 class EditLabelbutton : public BC_Button
250 EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int y);
252 int keypress_event();
258 class EditFit : public BC_Button
261 EditFit(MWindow *mwindow, EditPanel *panel, int x, int y);
263 int keypress_event();
269 class EditFitAutos : public BC_Button
272 EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y);
274 int keypress_event();
281 class EditPrevLabel : public BC_Button
284 EditPrevLabel(MWindow *mwindow,
291 int keypress_event();
299 class EditNextLabel : public BC_Button
302 EditNextLabel(MWindow *mwindow,
309 int keypress_event();
317 class EditPrevEdit : public BC_Button
320 EditPrevEdit(MWindow *mwindow,
327 int keypress_event();
335 class EditNextEdit : public BC_Button
338 EditNextEdit(MWindow *mwindow,
345 int keypress_event();
354 class ArrowButton : public BC_Toggle
357 ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y);
363 class IBeamButton : public BC_Toggle
366 IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y);
372 class KeyFrameButton : public BC_Toggle
375 KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
385 EditPanel(MWindow *mwindow,
386 BC_WindowBase *subwindow,
389 int editing_mode, // From edl.inc
390 int use_editing_mode,
392 int use_splice, // Extra buttons
396 int use_copy, // Use copy when in EDITING_ARROW
408 void set_meters(MeterPanel *meter_panel);
409 static int calculate_w(MWindow *mwindow, int use_keyframe, int total_buttons);
410 static int calculate_h(MWindow *mwindow);
412 void delete_buttons();
413 void create_buttons();
414 void reposition_buttons(int x, int y);
415 void create_objects();
417 virtual void copy_selection();
418 virtual void splice_selection();
419 virtual void overwrite_selection();
420 virtual void set_inpoint();
421 virtual void set_outpoint();
422 virtual void clear_inpoint();
423 virtual void clear_outpoint();
424 virtual void to_clip();
425 virtual void toggle_label();
426 virtual void prev_label();
427 virtual void next_label();
428 virtual void prev_edit();
429 virtual void next_edit();
432 BC_WindowBase *subwindow;
433 MeterPanel *meter_panel;
435 int use_editing_mode;
455 EditFitAutos *fit_autos;
456 EditInPoint *inpoint;
457 EditOutPoint *outpoint;
458 // EditDelInPoint *delinpoint;
459 // EditDelOutPoint *deloutpoint;
461 EditOverwrite *overwrite;
463 EditExtract *extract;
466 EditCommercial *commercial;
469 EditLabelbutton *labelbutton;
470 EditPrevLabel *prevlabel;
471 EditNextLabel *nextlabel;
472 EditPrevEdit *prevedit;
473 EditNextEdit *nextedit;
479 KeyFrameButton *keyframe;