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"
49 PatchGUI(MWindow *mwindow,
56 virtual void create_objects();
57 virtual int reposition(int x, int y);
58 void toggle_behavior(int type,
62 virtual int update(int x, int y);
63 virtual void synchronize_fade(float change) {};
64 void synchronize_faders(float change, int audio, int video);
65 char* calculate_nudge_text(int *changed);
66 int64_t calculate_nudge(const char *string);
71 // Used by update routines so non-existent track doesn't need to be dereferenced
72 // to know it doesn't match the current EDL.
76 // Don't synchronize the fader if this is true.
82 // AutoPatch *automate;
90 char string_return[BCTEXTLEN];
95 class PlayPatch : public BC_Toggle
98 PlayPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
99 int button_press_event();
100 int button_release_event();
105 class RecordPatch : public BC_Toggle
108 RecordPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
109 int button_press_event();
110 int button_release_event();
115 class TitlePatch : public BC_TextBox
118 TitlePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w);
120 void update(const char *text);
125 class AutoPatch : public BC_Toggle
128 AutoPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
129 int button_press_event();
130 int button_release_event();
135 class GangPatch : public BC_Toggle
138 GangPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
139 int button_press_event();
140 int button_release_event();
145 class DrawPatch : public BC_Toggle
148 DrawPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
149 int button_press_event();
150 int button_release_event();
155 class MutePatch : public BC_Toggle
158 MutePatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
159 int button_press_event();
160 int button_release_event();
165 class ZoomPatch : public BC_Tumbler
168 ZoomPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
169 int handle_up_event();
170 int handle_down_event();
175 class ExpandPatch : public BC_Toggle
178 ExpandPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);
179 int button_press_event();
180 int button_release_event();
185 class NudgePatch : public BC_TextBox
188 NudgePatch(MWindow *mwindow, PatchGUI *patch, int x, int y, int w);
190 int button_press_event();
192 void set_value(int64_t value);
193 int64_t calculate_increment();
199 class MixPatch : public BC_Toggle
202 MixPatch(MWindow *mwindow, PatchGUI *patch, int x, int y);