X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fpatch.h;fp=cinelerra-5.1%2Fcinelerra%2Fpatch.h;h=377da24843b01c1876097cde577bfcb66afa1529;hb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;hp=0000000000000000000000000000000000000000;hpb=52fcc46226f9df46f9ce9d0566dc568455a7db0b;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/cinelerra/patch.h b/cinelerra-5.1/cinelerra/patch.h new file mode 100644 index 00000000..377da248 --- /dev/null +++ b/cinelerra-5.1/cinelerra/patch.h @@ -0,0 +1,139 @@ + +/* + * CINELERRA + * Copyright (C) 2008 Adam Williams + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef PATCH_H +#define PATCH_H + +class PlayPatchOld; +class RecordPatchOld; +class TitlePatchOld; +class AutoPatchOld; +class DrawPatchOld; + +#include "guicast.h" +#include "filexml.inc" +#include "mwindow.inc" +#include "module.inc" +#include "patch.inc" +#include "patchbay.inc" + + +// coordinates for widgets + +#define PATCH_ROW2 23 +#define PATCH_TITLE 3 +#define PATCH_PLAY 7 +#define PATCH_REC 27 +#define PATCH_AUTO 47 +#define PATCH_AUTO_TITLE 67 +#define PATCH_DRAW 72 +#define PATCH_DRAW_TITLE 97 + + +class Patch : public ListItem +{ +public: + Patch() {}; + Patch(MWindow *mwindow, PatchBay *patchbay, int data_type); + ~Patch(); + + int save(FileXML *xml); + int load(FileXML *xml); + + void create_objects(char *text, int pixel); // linked list doesn't allow parameters in append() + int set_pixel(int pixel); + int set_title(char *new_title); + int flip_vertical(); + int pixelmovement(int distance); + + int pixel; // distance from top of track window + int data_type; + int record; + int play; + int automate; + int draw; + char title[1024]; + + PatchBay *patches; + MWindow *mwindow; + + RecordPatchOld *recordpatch; + PlayPatchOld *playpatch; + TitlePatchOld *title_text; + AutoPatchOld *autopatch; + DrawPatchOld *drawpatch; + Module* get_module(); // return module of corresponding patch +}; + +class PlayPatchOld : public BC_Toggle +{ +public: + PlayPatchOld(MWindow *mwindow, Patch *patch, int x, int y); + int handle_event(); + int cursor_moved_over(); + int button_release(); + PatchBay *patches; + Patch *patch; +}; + +class RecordPatchOld : public BC_Toggle +{ +public: + RecordPatchOld(MWindow *mwindow, Patch *patch, int x, int y); + int handle_event(); + int cursor_moved_over(); + int button_release(); + Patch *patch; + PatchBay *patches; +}; + +class TitlePatchOld : public BC_TextBox +{ +public: + TitlePatchOld(MWindow *mwindow, Patch *patch, char *text, int x, int y); + int handle_event(); + Patch *patch; + PatchBay *patches; + Module *module; +}; + +class AutoPatchOld : public BC_Toggle +{ +public: + AutoPatchOld(MWindow *mwindow, Patch *patch, int x, int y); + int handle_event(); + int cursor_moved_over(); + int button_release(); + PatchBay *patches; + Patch *patch; +}; + +class DrawPatchOld : public BC_Toggle +{ +public: + DrawPatchOld(MWindow *mwindow, Patch *patch, int x, int y); + int handle_event(); + int cursor_moved_over(); + PatchBay *patches; + Patch *patch; +}; + +#endif