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
78 RecordPatchOld *recordpatch;
79 PlayPatchOld *playpatch;
80 TitlePatchOld *title_text;
81 AutoPatchOld *autopatch;
82 DrawPatchOld *drawpatch;
83 Module* get_module(); // return module of corresponding patch
86 class PlayPatchOld : public BC_Toggle
89 PlayPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
91 int cursor_moved_over();
97 class RecordPatchOld : public BC_Toggle
100 RecordPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
102 int cursor_moved_over();
103 int button_release();
108 class TitlePatchOld : public BC_TextBox
111 TitlePatchOld(MWindow *mwindow, Patch *patch, char *text, int x, int y);
118 class AutoPatchOld : public BC_Toggle
121 AutoPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
123 int cursor_moved_over();
124 int button_release();
129 class DrawPatchOld : public BC_Toggle
132 DrawPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
134 int cursor_moved_over();