improve delays created by vicon drawing locks, reset_cache segv fix, gang track toolt...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / patchbay.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef PATCHBAY_H
23 #define PATCHBAY_H
24
25 #include "guicast.h"
26 #include "filexml.inc"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "overlayframe.inc"
30 #include "patch.h"
31 #include "patchbay.inc"
32 #include "patchgui.inc"
33 #include "timelinepane.inc"
34
35 class NudgePopupSeconds;
36 class NudgePopupNative;
37 class NudgePopup;
38
39 class PatchBay : public BC_SubWindow
40 {
41 public:
42         PatchBay(MWindow *mwindow, MWindowGUI *gui);
43         PatchBay(MWindow *mwindow, TimelinePane *pane, int x, int y, int w, int h);
44         ~PatchBay();
45
46         int delete_all_patches();
47         void create_objects();
48         void resize_event();
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);
56
57 // Synchronize with Master EDL
58         int update();
59         void update_meters(ArrayList<double> *module_levels);
60         void stop_meters();
61         void synchronize_nudge(int64_t value, Track *skip);
62         void synchronize_faders(float value, int data_type, Track *skip);
63         void set_meter_format(int mode, int min, int max);
64         void reset_meters();
65
66         ArrayList<PatchGUI*> patches;
67
68
69
70
71
72
73 // =========================================== drawing
74
75         int resize_event(int top, int bottom);
76
77         MWindow *mwindow;
78         MWindowGUI *gui;
79         TimelinePane *pane;
80
81         int new_status, drag_operation;
82         BC_Pixmap *mode_icons[TRANSFER_TYPES];
83
84         NudgePopup *nudge_popup;
85 };
86
87
88 class NudgePopup : public BC_PopupMenu
89 {
90 public:
91         NudgePopup(MWindow *mwindow, PatchBay *patchbay);
92         ~NudgePopup();
93
94         void create_objects();
95         void activate_menu(PatchGUI *gui);
96
97         MWindow *mwindow;
98         PatchBay *patchbay;
99         NudgePopupSeconds *seconds_item;
100         NudgePopupNative *native_item;
101 };
102
103
104 class NudgePopupSeconds : public BC_MenuItem
105 {
106 public:
107         NudgePopupSeconds(NudgePopup *popup);
108         int handle_event();
109         NudgePopup *popup;
110 };
111
112
113 class NudgePopupNative : public BC_MenuItem
114 {
115 public:
116         NudgePopupNative(NudgePopup *popup);
117         int handle_event();
118         NudgePopup *popup;
119 };
120
121 #endif