no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / trackpopup.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 __TRACKPOPUP_H__
23 #define __TRACKPOPUP_H__
24
25 #include "guicast.h"
26 #include "colorpicker.h"
27 #include "mwindow.inc"
28 #include "mwindowgui.inc"
29 #include "plugindialog.inc"
30 #include "resizetrackthread.inc"
31 #include "track.inc"
32 #include "trackpopup.inc"
33
34
35 class TrackPopup : public BC_PopupMenu
36 {
37 public:
38         TrackPopup(MWindow *mwindow, MWindowGUI *gui);
39         ~TrackPopup();
40
41         void create_objects();
42         int activate_menu(Track *track, Edit *edit,
43                 PluginSet *pluginset, Plugin *plugin, double position);
44
45         MWindow *mwindow;
46         MWindowGUI *gui;
47         TrackPopupResize *resize_option;
48         TrackPopupMatchSize *matchsize_option;
49
50         Track *track;
51         Edit *edit;
52         Plugin *plugin;
53         PluginSet *pluginset;
54         double position;
55 };
56
57 class TrackPopupMatchSize : public BC_MenuItem
58 {
59 public:
60         TrackPopupMatchSize(MWindow *mwindow, TrackPopup *popup);
61         ~TrackPopupMatchSize();
62         int handle_event();
63         MWindow *mwindow;
64         TrackPopup *popup;
65 };
66
67 class TrackPopupResize : public BC_MenuItem
68 {
69 public:
70         TrackPopupResize(MWindow *mwindow, TrackPopup *popup);
71         ~TrackPopupResize();
72         int handle_event();
73         MWindow *mwindow;
74         TrackPopup *popup;
75         ResizeTrackThread *dialog_thread;
76 };
77
78 class TrackPopupDeleteTrack : public BC_MenuItem
79 {
80 public:
81         TrackPopupDeleteTrack(MWindow *mwindow, TrackPopup *popup);
82         int handle_event();
83         MWindow *mwindow;
84         TrackPopup *popup;
85 };
86
87 class TrackPopupAddTrack : public BC_MenuItem
88 {
89 public:
90         TrackPopupAddTrack(MWindow *mwindow, TrackPopup *popup);
91         int handle_event();
92         MWindow *mwindow;
93         TrackPopup *popup;
94 };
95
96 class TrackAttachEffect : public BC_MenuItem
97 {
98 public:
99         TrackAttachEffect(MWindow *mwindow, TrackPopup *popup);
100         ~TrackAttachEffect();
101
102         int handle_event();
103
104         MWindow *mwindow;
105         TrackPopup *popup;
106         PluginDialogThread *dialog_thread;
107 };
108
109 class TrackMoveUp : public BC_MenuItem
110 {
111 public:
112         TrackMoveUp(MWindow *mwindow, TrackPopup *popup);
113         ~TrackMoveUp();
114
115         int handle_event();
116
117         MWindow *mwindow;
118         TrackPopup *popup;
119 };
120
121 class TrackMoveDown : public BC_MenuItem
122 {
123 public:
124         TrackMoveDown(MWindow *mwindow, TrackPopup *popup);
125         ~TrackMoveDown();
126
127         int handle_event();
128
129         MWindow *mwindow;
130         TrackPopup *popup;
131 };
132
133 class TrackRollUp : public BC_MenuItem
134 {
135 public:
136         TrackRollUp(MWindow *mwindow, TrackPopup *popup);
137         ~TrackRollUp();
138
139         int handle_event();
140
141         MWindow *mwindow;
142         TrackPopup *popup;
143 };
144
145 class TrackRollDown : public BC_MenuItem
146 {
147 public:
148         TrackRollDown(MWindow *mwindow, TrackPopup *popup);
149         ~TrackRollDown();
150
151         int handle_event();
152
153         MWindow *mwindow;
154         TrackPopup *popup;
155 };
156
157 class TrackPopupFindAsset : public BC_MenuItem
158 {
159 public:
160         TrackPopupFindAsset(MWindow *mwindow, TrackPopup *popup);
161         int handle_event();
162         MWindow *mwindow;
163         TrackPopup *popup;
164 };
165
166 class TrackPopupUserTitle : public BC_MenuItem
167 {
168 public:
169         TrackPopupUserTitle(MWindow *mwindow, TrackPopup *popup);
170         ~TrackPopupUserTitle();
171
172         int handle_event();
173
174         MWindow *mwindow;
175         TrackPopup *popup;
176         TrackUserTitleDialogThread *dialog_thread;
177 };
178
179 class TrackPopupUserTitleText : public BC_TextBox
180 {
181 public:
182         TrackPopupUserTitleText(TrackPopupUserTitleWindow *window,
183                 MWindow *mwindow, int x, int y, const char *text);
184         ~TrackPopupUserTitleText();
185         int handle_event();
186
187         MWindow *mwindow;
188         TrackPopupUserTitleWindow *window;
189 };
190
191 class TrackPopupUserTitleWindow : public BC_Window
192 {
193 public:
194         TrackPopupUserTitleWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
195         ~TrackPopupUserTitleWindow();
196
197         void create_objects();
198         void handle_close_event(int result);
199
200         TrackPopupUserTitleText *title_text;
201         MWindow *mwindow;
202         TrackPopup *popup;
203         char new_text[BCTEXTLEN];
204 };
205
206 class TrackUserTitleDialogThread : public BC_DialogThread
207 {
208 public:
209         TrackUserTitleDialogThread(TrackPopupUserTitle *edit_title);
210         ~TrackUserTitleDialogThread();
211
212         void handle_close_event(int result);
213         void handle_done_event(int result);
214         BC_Window* new_gui();
215         void start(int wx, int wy);
216
217         int wx, wy;
218         TrackPopupUserTitle *edit_title;
219         TrackPopupUserTitleWindow *window;
220 };
221
222
223 class TrackPopupTitleColor : public BC_MenuItem
224 {
225 public:
226         TrackPopupTitleColor(MWindow *mwindow, TrackPopup *popup);
227         ~TrackPopupTitleColor();
228
229         int handle_event();
230
231         MWindow *mwindow;
232         TrackPopup *popup;
233         TrackTitleColorPicker *color_picker;
234 };
235
236 class TrackTitleColorDefault : public BC_GenericButton
237 {
238 public:
239         TrackTitleColorDefault(TrackTitleColorPicker *color_picker, int x, int y);
240         int handle_event();
241
242         TrackTitleColorPicker *color_picker;
243 };
244
245 class TrackTitleColorPicker : public ColorPicker
246 {
247 public:
248         TrackTitleColorPicker(TrackPopup *popup, int color);
249         ~TrackTitleColorPicker();
250         void create_objects(ColorWindow *gui);
251         int handle_new_color(int color, int alpha);
252         void handle_done_event(int result);
253
254         TrackPopup *popup;
255         int color;
256 };
257
258
259 class TrackPopupShow : public BC_MenuItem
260 {
261 public:
262         TrackPopupShow(MWindow *mwindow, TrackPopup *popup);
263         ~TrackPopupShow();
264
265         int handle_event();
266
267         MWindow *mwindow;
268         TrackPopup *popup;
269         TrackShowDialogThread *dialog_thread;
270 };
271
272 class TrackShowDialogThread : public BC_DialogThread
273 {
274 public:
275         TrackShowDialogThread(TrackPopupShow *edit_show);
276         ~TrackShowDialogThread();
277         BC_Window* new_gui();
278         void start(int wx, int wy);
279         void handle_close_event(int result);
280
281         int wx, wy;
282         TrackPopupShow *edit_show;
283         TrackPopupShowWindow *window;
284 };
285
286 class TrackPopupShowText : public BC_TextBox
287 {
288 public:
289         TrackPopupShowText(TrackPopupShowWindow *window,
290                 MWindow *mwindow, int x, int y, const char *text);
291         ~TrackPopupShowText();
292
293         TrackPopupShowWindow *window;
294         MWindow *mwindow;
295 };
296
297 class TrackPopupShowWindow : public BC_Window
298 {
299 public:
300         TrackPopupShowWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
301         ~TrackPopupShowWindow();
302
303         void create_objects();
304
305         TrackPopupShowText *show_text;
306         MWindow *mwindow;
307         TrackPopup *popup;
308 };
309
310 #endif