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 "mwindow.inc"
27 #include "patchbay.inc"
28 #include "intauto.inc"
50 PatchGUI(MWindow *mwindow,
57 virtual void create_objects();
58 virtual int reposition(int x, int y);
59 void toggle_behavior(int type,
63 virtual int update(int x, int y);
64 virtual void synchronize_fade(float change) {};
65 void synchronize_faders(float change, int audio, int video);
66 char* calculate_nudge_text(int *changed);
67 int64_t calculate_nudge(const char *string);
72 // Used by update routines so non-existent track doesn't need to be dereferenced
73 // to know it doesn't match the current EDL.
77 // Don't synchronize the fader if this is true.
83 // AutoPatch *automate;
92 char string_return[BCTEXTLEN];
97 class PlayPatch : public BC_Toggle
100 PlayPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
101 int button_press_event();
102 int button_release_event();
107 class RecordPatch : public BC_Toggle
110 RecordPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
111 int button_press_event();
112 int button_release_event();
117 class TitlePatch : public BC_TextBox
120 TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w);
122 void update(const char *text);
127 class AutoPatch : public BC_Toggle
130 AutoPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
131 int button_press_event();
132 int button_release_event();
137 class GangPatch : public BC_Toggle
140 GangPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
141 int button_press_event();
142 int button_release_event();
147 class DrawPatch : public BC_Toggle
150 DrawPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
151 int button_press_event();
152 int button_release_event();
157 class MutePatch : public BC_Toggle
160 MutePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
161 int button_press_event();
162 int button_release_event();
167 class ZoomPatch : public BC_Tumbler
170 ZoomPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
171 int handle_up_event();
172 int handle_down_event();
177 class MasterPatch : public BC_Toggle
180 MasterPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
186 class ExpandPatch : public BC_Toggle
189 ExpandPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
190 int button_press_event();
191 int button_release_event();
196 class NudgePatch : public BC_TextBox
199 NudgePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w);
201 int button_press_event();
203 void set_value(int64_t value);
204 int64_t calculate_increment();
210 class MixPatch : public BC_Toggle
213 MixPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);