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 "filexml.inc"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "overlayframe.inc"
31 #include "patchbay.inc"
32 #include "patchgui.inc"
33 #include "timelinepane.inc"
35 class NudgePopupSeconds;
36 class NudgePopupNative;
39 class PatchBay : public BC_SubWindow
42 PatchBay(MWindow *mwindow, MWindowGUI *gui);
43 PatchBay(MWindow *mwindow, TimelinePane *pane, int x, int y, int w, int h);
46 int delete_all_patches();
47 void create_objects();
49 void resize_event(int x, int y, int w, int h);
50 int button_press_event();
51 int cursor_motion_event();
52 BC_Pixmap* mode_to_icon(int mode);
53 int icon_to_mode(BC_Pixmap *icon);
54 // Get the patch that matches the track.
55 PatchGUI* get_patch_of(Track *track);
57 // Synchronize with Master EDL
59 void update_meters(ArrayList<double> *module_levels);
61 void synchronize_nudge(int64_t value, Track *skip);
62 void synchronize_faders(float value, int data_type, Track *skip, int edge, int span);
63 void set_meter_format(int mode, int min, int max);
66 ArrayList<PatchGUI*> patches;
73 // =========================================== drawing
75 int resize_event(int top, int bottom);
81 int new_status, drag_operation;
82 BC_Pixmap *mode_icons[TRANSFER_TYPES];
84 NudgePopup *nudge_popup;
88 class NudgePopup : public BC_PopupMenu
91 NudgePopup(MWindow *mwindow, PatchBay *patchbay);
94 void create_objects();
95 void activate_menu(PatchGUI *gui);
99 NudgePopupSeconds *seconds_item;
100 NudgePopupNative *native_item;
104 class NudgePopupSeconds : public BC_MenuItem
107 NudgePopupSeconds(NudgePopup *popup);
113 class NudgePopupNative : public BC_MenuItem
116 NudgePopupNative(NudgePopup *popup);