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
25 #include "bcmenuitem.h"
26 #include "bcmenupopup.h"
27 #include "floatauto.inc"
30 #include "vpatchgui.inc"
33 class VPatchGUI : public PatchGUI
36 VPatchGUI(MWindow *mwindow,
43 void create_objects();
44 int reposition(int x, int y);
45 int update(int x, int y);
46 void update_faders(float v);
53 class VFadePatch : public BC_ISlider
56 VFadePatch(VPatchGUI *patch, int x, int y, int w, int64_t v);
61 class VKeyFadePatch : public BC_SubWindow
64 VKeyFadePatch(MWindow *mwindow, VPatchGUI *gui,
65 int bump, int x, int y);
67 void create_objects();
68 void set_edge(int edge);
69 void set_span(int span);
70 void update(int64_t v);
74 VKeyFadeOK *vkey_fade_ok;
75 VKeyFadeText *vkey_fade_text;
76 VKeyFadeSlider *vkey_fade_slider;
77 VKeyPatchAutoEdge *auto_edge;
78 VKeyPatchAutoSpan *auto_span;
81 class VKeyFadeOK : public BC_Button
84 VKeyFadeOK(VKeyFadePatch *vkey_fade_patch, int x, int y, VFrame **images);
87 VKeyFadePatch *vkey_fade_patch;
90 class VKeyFadeText : public BC_TextBox
93 VKeyFadeText(VKeyFadePatch *vkey_fade_patch, int x, int y, int w, int64_t v);
96 VKeyFadePatch *vkey_fade_patch;
99 class VKeyFadeSlider : public VFadePatch
102 VKeyFadeSlider(VKeyFadePatch *akey_fade_patch, int x, int y, int w, int64_t v);
105 VKeyFadePatch *vkey_fade_patch;
108 class VModePatch : public BC_PopupMenu
111 VModePatch(MWindow *mwindow, VPatchGUI *patch, int x, int y);
112 VModePatch(MWindow *mwindow, VPatchGUI *patch);
115 void create_objects(); // add initial items
116 static const char* mode_to_text(int mode);
117 void update(int mode);
124 class VModePatchItem : public BC_MenuItem
127 VModePatchItem(VModePatch *popup, const char *text, int mode);
134 class VModePatchSubMenu : public BC_SubMenu
137 VModePatchSubMenu(VModePatchItem *mode_item);
138 ~VModePatchSubMenu();
140 VModePatchItem *mode_item;
143 class VModeSubMenuItem : public BC_MenuItem
146 VModeSubMenuItem(VModePatchSubMenu *submenu, const char *text, int mode);
150 VModePatchSubMenu *submenu;
154 class VKeyModePatch : public VModePatch
157 VKeyModePatch(MWindow *mwindow, VPatchGUI *patch);
161 class VMixPatch : public MixPatch
164 VMixPatch(MWindow *mwindow, VPatchGUI *patch, int x, int y);
168 class VKeyPatchAutoEdge : public BC_Toggle
171 VKeyPatchAutoEdge(MWindow *mwindow, VKeyFadePatch *patch, int x, int y);
174 VKeyFadePatch *patch;
177 class VKeyPatchAutoSpan : public BC_Toggle
180 VKeyPatchAutoSpan(MWindow *mwindow, VKeyFadePatch *patch, int x, int y);
183 VKeyFadePatch *patch;