00001 #ifndef PATCH_H
00002 #define PATCH_H
00003
00004 class PlayPatchOld;
00005 class RecordPatchOld;
00006 class TitlePatchOld;
00007 class AutoPatchOld;
00008 class DrawPatchOld;
00009
00010 #include "guicast.h"
00011 #include "filexml.inc"
00012 #include "mwindow.inc"
00013 #include "module.inc"
00014 #include "patch.inc"
00015 #include "patchbay.inc"
00016
00017
00018
00019
00020 #define PATCH_ROW2 23
00021 #define PATCH_TITLE 3
00022 #define PATCH_PLAY 7
00023 #define PATCH_REC 27
00024 #define PATCH_AUTO 47
00025 #define PATCH_AUTO_TITLE 67
00026 #define PATCH_DRAW 72
00027 #define PATCH_DRAW_TITLE 97
00028
00029
00030 class Patch : public ListItem<Patch>
00031 {
00032 public:
00033 Patch() {};
00034 Patch(MWindow *mwindow, PatchBay *patchbay, int data_type);
00035 ~Patch();
00036
00037 int save(FileXML *xml);
00038 int load(FileXML *xml);
00039
00040 int create_objects(char *text, int pixel);
00041 int set_pixel(int pixel);
00042 int set_title(char *new_title);
00043 int flip_vertical();
00044 int pixelmovement(int distance);
00045
00046 int pixel;
00047 int data_type;
00048 int record;
00049 int play;
00050 int automate;
00051 int draw;
00052 char title[1024];
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 PatchBay *patches;
00069 MWindow *mwindow;
00070
00071 RecordPatchOld *recordpatch;
00072 PlayPatchOld *playpatch;
00073 TitlePatchOld *title_text;
00074 AutoPatchOld *autopatch;
00075 DrawPatchOld *drawpatch;
00076 Module* get_module();
00077 };
00078
00079 class PlayPatchOld : public BC_Toggle
00080 {
00081 public:
00082 PlayPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
00083 int handle_event();
00084 int cursor_moved_over();
00085 int button_release();
00086 PatchBay *patches;
00087 Patch *patch;
00088 };
00089
00090 class RecordPatchOld : public BC_Toggle
00091 {
00092 public:
00093 RecordPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
00094 int handle_event();
00095 int cursor_moved_over();
00096 int button_release();
00097 Patch *patch;
00098 PatchBay *patches;
00099 };
00100
00101 class TitlePatchOld : public BC_TextBox
00102 {
00103 public:
00104 TitlePatchOld(MWindow *mwindow, Patch *patch, char *text, int x, int y);
00105 int handle_event();
00106 Patch *patch;
00107 PatchBay *patches;
00108 Module *module;
00109 };
00110
00111 class AutoPatchOld : public BC_Toggle
00112 {
00113 public:
00114 AutoPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
00115 int handle_event();
00116 int cursor_moved_over();
00117 int button_release();
00118 PatchBay *patches;
00119 Patch *patch;
00120 };
00121
00122 class DrawPatchOld : public BC_Toggle
00123 {
00124 public:
00125 DrawPatchOld(MWindow *mwindow, Patch *patch, int x, int y);
00126 int handle_event();
00127 int cursor_moved_over();
00128 PatchBay *patches;
00129 Patch *patch;
00130 };
00131
00132 #endif