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
32 #include "filexml.inc"
33 #include "mwindow.inc"
36 #include "patchbay.inc"
39 // coordinates for widgets
46 #define PATCH_AUTO_TITLE 67
48 #define PATCH_DRAW_TITLE 97
51 class Patch : public ListItem<Patch>
55 Patch(MWindow *mwindow, PatchBay *patchbay, int data_type);
58 int save(FileXML *xml);
59 int load(FileXML *xml);
61 void create_objects(char *text, int pixel); // linked list doesn't allow parameters in append()
62 int set_pixel(int pixel);
63 int set_title(char *new_title);
65 int pixelmovement(int distance);
67 int pixel; // distance from top of track window
92 RecordPatchOld *recordpatch;
93 PlayPatchOld *playpatch;
94 TitlePatchOld *title_text;
95 AutoPatchOld *autopatch;
96 DrawPatchOld *drawpatch;
97 Module* get_module(); // return module of corresponding patch
100 class PlayPatchOld : public BC_Toggle
103 PlayPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
105 int cursor_moved_over();
106 int button_release();
111 class RecordPatchOld : public BC_Toggle
114 RecordPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
116 int cursor_moved_over();
117 int button_release();
122 class TitlePatchOld : public BC_TextBox
125 TitlePatchOld(MWindow *mwindow, Patch *patch, char *text, int x, int y);
132 class AutoPatchOld : public BC_Toggle
135 AutoPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
137 int cursor_moved_over();
138 int button_release();
143 class DrawPatchOld : public BC_Toggle
146 DrawPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
148 int cursor_moved_over();