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 EditToClip : public BC_Button
103 EditToClip(MWindow *mwindow, EditPanel *panel, int x, int y);
106 int keypress_event();
111 class EditManualGoto : public BC_Button
114 EditManualGoto(MWindow *mwindow, EditPanel *panel, int x, int y);
117 int keypress_event();
123 class EditCut : public BC_Button
126 EditCut(MWindow *mwindow, EditPanel *panel, int x, int y);
129 int keypress_event();
136 class EditCommercial : public BC_Button
139 EditCommercial(MWindow *mwindow, EditPanel *panel, int x, int y);
142 int keypress_event();
149 class EditClick2Play : public BC_Toggle
152 EditClick2Play(MWindow *mwindow, EditPanel *panel, int x, int y);
156 int keypress_event();
162 class EditCopy : public BC_Button
165 EditCopy(MWindow *mwindow, EditPanel *panel, int x, int y);
168 int keypress_event();
175 class EditPaste : public BC_Button
178 EditPaste(MWindow *mwindow, EditPanel *panel, int x, int y);
181 int keypress_event();
188 class EditUndo : public BC_Button
191 EditUndo(MWindow *mwindow, EditPanel *panel, int x, int y);
193 int keypress_event();
199 class EditRedo : public BC_Button
202 EditRedo(MWindow *mwindow, EditPanel *panel, int x, int y);
204 int keypress_event();
210 class EditLabelbutton : public BC_Button
213 EditLabelbutton(MWindow *mwindow, EditPanel *panel, int x, int y);
215 int keypress_event();
221 class EditFit : public BC_Button
224 EditFit(MWindow *mwindow, EditPanel *panel, int x, int y);
226 int keypress_event();
232 class EditFitAutos : public BC_Button
235 EditFitAutos(MWindow *mwindow, EditPanel *panel, int x, int y);
237 int keypress_event();
244 class EditPrevLabel : public BC_Button
247 EditPrevLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
250 int keypress_event();
257 class EditNextLabel : public BC_Button
260 EditNextLabel(MWindow *mwindow, EditPanel *panel, int x, int y);
263 int keypress_event();
270 class EditPrevEdit : public BC_Button
273 EditPrevEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
276 int keypress_event();
283 class EditNextEdit : public BC_Button
286 EditNextEdit(MWindow *mwindow, EditPanel *panel, int x, int y);
289 int keypress_event();
297 class ArrowButton : public BC_Toggle
300 ArrowButton(MWindow *mwindow, EditPanel *panel, int x, int y);
306 class IBeamButton : public BC_Toggle
309 IBeamButton(MWindow *mwindow, EditPanel *panel, int x, int y);
315 class KeyFrameButton : public BC_Toggle
318 KeyFrameButton(MWindow *mwindow, EditPanel *panel, int x, int y);
320 int keypress_event();
325 class LockLabelsButton : public BC_Toggle
328 LockLabelsButton(MWindow *mwindow, EditPanel *panel, int x, int y);
338 EditPanel(MWindow *mwindow, BC_WindowBase *subwindow,
339 int window_id, int x, int y,
340 int editing_mode, // From edl.inc
341 int use_editing_mode,
343 int use_splice, // Extra buttons
345 int use_copy, // Use copy when in EDITING_ARROW
359 void set_meters(MeterPanel *meter_panel);
360 static int calculate_w(MWindow *mwindow, int use_keyframe, int total_buttons);
361 static int calculate_h(MWindow *mwindow);
363 void create_buttons();
364 void stop_transport(const char *lock_msg);
365 void reposition_buttons(int x, int y);
366 void create_objects();
369 virtual double get_position() = 0;
370 virtual void set_position(double position) = 0;
371 virtual void set_click_to_play(int v) = 0;
373 virtual void panel_stop_transport() = 0;
374 virtual void panel_toggle_label() = 0;
375 virtual void panel_next_label(int cut) = 0;
376 virtual void panel_prev_label(int cut) = 0;
377 virtual void panel_prev_edit(int cut) = 0;
378 virtual void panel_next_edit(int cut) = 0;
379 virtual void panel_copy_selection() = 0;
380 virtual void panel_overwrite_selection() = 0;
381 virtual void panel_splice_selection() = 0;
382 virtual void panel_set_inpoint() = 0;
383 virtual void panel_set_outpoint() = 0;
384 virtual void panel_unset_inoutpoint() = 0;
385 virtual void panel_to_clip() = 0;
386 virtual void panel_cut() = 0;
387 virtual void panel_paste() = 0;
388 virtual void panel_fit_selection() = 0;
389 virtual void panel_fit_autos(int all) = 0;
390 virtual void panel_set_editing_mode(int mode) = 0;
391 virtual void panel_set_auto_keyframes(int v) = 0;
392 virtual void panel_set_labels_follow_edits(int v) = 0;
395 BC_WindowBase *subwindow;
396 MeterPanel *meter_panel;
401 int use_editing_mode;
419 EditFitAutos *fit_autos;
420 EditInPoint *inpoint;
421 EditOutPoint *outpoint;
422 // EditDelInPoint *delinpoint;
423 // EditDelOutPoint *deloutpoint;
425 EditOverwrite *overwrite;
428 EditCommercial *commercial;
429 EditManualGoto *mangoto;
430 EditClick2Play *click2play;
433 EditLabelbutton *labelbutton;
434 EditPrevLabel *prevlabel;
435 EditNextLabel *nextlabel;
436 EditPrevEdit *prevedit;
437 EditNextEdit *nextedit;
443 KeyFrameButton *keyframe;
444 LockLabelsButton *locklabels;
446 int is_mwindow() { return window_id == MWINDOW_ID; }
447 int is_cwindow() { return window_id == CWINDOW_ID; }
448 int is_vwindow() { return window_id == VWINDOW_ID; }