r870: Merge 2.1:
[cinelerra_cv.git] / cinelerra / patchbay.h
blob5f5fbc8f2a0d4b5a27b7343899f37c7483a34b5d
1 #ifndef PATCHBAY_H
2 #define PATCHBAY_H
4 #include "guicast.h"
5 #include "filexml.inc"
6 #include "mwindow.inc"
7 #include "mwindowgui.inc"
8 #include "overlayframe.inc"
9 #include "patch.h"
10 #include "patchbay.inc"
11 #include "patchgui.inc"
13 class NudgePopupSeconds;
14 class NudgePopupNative;
15 class NudgePopup;
17 class PatchBay : public BC_SubWindow
19 public:
20 PatchBay(MWindow *mwindow, MWindowGUI *gui);
21 ~PatchBay();
23 int delete_all_patches();
24 int create_objects();
25 void resize_event();
26 int button_press_event();
27 int cursor_motion_event();
28 BC_Pixmap* mode_to_icon(int mode);
29 int icon_to_mode(BC_Pixmap *icon);
30 // Get the patch that matches the track.
31 PatchGUI* get_patch_of(Track *track);
33 // Synchronize with Master EDL
34 int update();
35 void update_meters(ArrayList<double> *module_levels);
36 void stop_meters();
37 void synchronize_nudge(int64_t value, Track *skip);
38 void synchronize_faders(float value, int data_type, Track *skip);
39 void change_meter_format(int mode, int min, int max);
40 void reset_meters();
42 ArrayList<PatchGUI*> patches;
49 // =========================================== drawing
51 int resize_event(int top, int bottom);
52 Track *is_over_track(); // called from trackcanvas!
54 MWindow *mwindow;
55 MWindowGUI *gui;
57 int button_down, new_status, drag_operation, reconfigure_trigger;
58 BC_Pixmap *mode_icons[TRANSFER_TYPES];
60 NudgePopup *nudge_popup;
64 class NudgePopup : public BC_PopupMenu
66 public:
67 NudgePopup(MWindow *mwindow, PatchBay *patchbay);
68 ~NudgePopup();
70 void create_objects();
71 void activate_menu(PatchGUI *gui);
73 MWindow *mwindow;
74 PatchBay *patchbay;
75 NudgePopupSeconds *seconds_item;
76 NudgePopupNative *native_item;
80 class NudgePopupSeconds : public BC_MenuItem
82 public:
83 NudgePopupSeconds(NudgePopup *popup);
84 int handle_event();
85 NudgePopup *popup;
89 class NudgePopupNative : public BC_MenuItem
91 public:
92 NudgePopupNative(NudgePopup *popup);
93 int handle_event();
94 NudgePopup *popup;
97 #endif