remove whitespace at eol
[goodguy/history.git] / cinelerra-5.1 / plugins / shapewipe / shapewipe.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
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.
10  *
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.
15  *
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
19  *
20  */
21
22 #ifndef SHAPEWIPE_H
23 #define SHAPEWIPE_H
24
25 class ShapeWipeMain;
26 class ShapeWipeWindow;
27
28 #include "overlayframe.inc"
29 #include "pluginvclient.h"
30 #include "vframe.inc"
31
32 class ShapeWipeW2B : public BC_Radial
33 {
34 public:
35         ShapeWipeW2B(ShapeWipeMain *plugin,
36                 ShapeWipeWindow *window,
37                 int x,
38                 int y);
39         int handle_event();
40         ShapeWipeMain *plugin;
41         ShapeWipeWindow *window;
42 };
43
44 class ShapeWipeB2W : public BC_Radial
45 {
46 public:
47         ShapeWipeB2W(ShapeWipeMain *plugin,
48                 ShapeWipeWindow *window,
49                 int x,
50                 int y);
51         int handle_event();
52         ShapeWipeMain *plugin;
53         ShapeWipeWindow *window;
54 };
55
56
57 class ShapeWipeTumble : public BC_Tumbler
58 {
59 public:
60         ShapeWipeTumble(ShapeWipeMain *client,
61                 ShapeWipeWindow *window,
62                 int x,
63                 int y);
64
65         int handle_up_event();
66         int handle_down_event();
67
68         ShapeWipeMain *client;
69         ShapeWipeWindow *window;
70 };
71
72 class ShapeWipeShape : public BC_PopupTextBox
73 {
74 public:
75         ShapeWipeShape(ShapeWipeMain *client,
76                 ShapeWipeWindow *window,
77                 int x,
78                 int y,
79                 int text_w,
80                 int list_h);
81         int handle_event();
82         ShapeWipeMain *client;
83         ShapeWipeWindow *window;
84 };
85
86 class ShapeWipeAntiAlias : public BC_CheckBox
87 {
88 public:
89         ShapeWipeAntiAlias(ShapeWipeMain *plugin,
90                 ShapeWipeWindow *window,
91                 int x,
92                 int y);
93         int handle_event();
94         ShapeWipeMain *plugin;
95         ShapeWipeWindow *window;
96 };
97
98
99 class ShapeWipePreserveAspectRatio : public BC_CheckBox
100 {
101 public:
102         ShapeWipePreserveAspectRatio(ShapeWipeMain *plugin,
103                 ShapeWipeWindow *window,
104                 int x,
105                 int y);
106         int handle_event();
107         ShapeWipeMain *plugin;
108         ShapeWipeWindow *window;
109 };
110
111
112 class ShapeWipeWindow : public PluginClientWindow
113 {
114 public:
115         ShapeWipeWindow(ShapeWipeMain *plugin);
116         ~ShapeWipeWindow();
117         void create_objects();
118         void next_shape();
119         void prev_shape();
120
121         ShapeWipeMain *plugin;
122         ShapeWipeW2B *left;
123         ShapeWipeB2W *right;
124 //      ShapeWipeFilename *filename_widget;
125         ShapeWipeTumble *shape_tumbler;
126         ShapeWipeShape *shape_text;
127         ArrayList<BC_ListBoxItem*> shapes;
128 };
129
130 class ShapeWipeMain : public PluginVClient
131 {
132 public:
133         ShapeWipeMain(PluginServer *server);
134         ~ShapeWipeMain();
135
136 // required for all realtime plugins
137         int load_configuration();
138         int process_realtime(VFrame *incoming, VFrame *outgoing);
139         void save_data(KeyFrame *keyframe);
140         void read_data(KeyFrame *keyframe);
141         PluginClientWindow* new_window();
142         int uses_gui();
143         int is_transition();
144         const char* plugin_title();
145         int read_pattern_image(int new_frame_width, int new_frame_height);
146         void reset_pattern_image();
147         void init_shapes();
148
149         ArrayList<char*> shape_paths;
150         ArrayList<char*> shape_titles;
151
152         int shapes_initialized;
153         int direction;
154         char filename[BCTEXTLEN];
155         char last_read_filename[BCTEXTLEN];
156         char shape_name[BCTEXTLEN];
157         char current_name[BCTEXTLEN];
158         unsigned char **pattern_image;
159         unsigned char min_value;
160         unsigned char max_value;
161         int frame_width;
162         int frame_height;
163         int antialias;
164         int preserve_aspect;
165         int last_preserve_aspect;
166 };
167
168 #endif