add usb_direct for shuttle, revised shuttle again, titler tweak, transportque design...
[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 TrackPopupFindAsset : public BC_MenuItem
134 {
135 public:
136         TrackPopupFindAsset(MWindow *mwindow, TrackPopup *popup);
137         int handle_event();
138         MWindow *mwindow;
139         TrackPopup *popup;
140 };
141
142 class TrackPopupUserTitle : public BC_MenuItem
143 {
144 public:
145         TrackPopupUserTitle(MWindow *mwindow, TrackPopup *popup);
146         ~TrackPopupUserTitle();
147
148         int handle_event();
149
150         MWindow *mwindow;
151         TrackPopup *popup;
152         TrackUserTitleDialogThread *dialog_thread;
153 };
154
155 class TrackPopupUserTitleText : public BC_TextBox
156 {
157 public:
158         TrackPopupUserTitleText(TrackPopupUserTitleWindow *window,
159                 MWindow *mwindow, int x, int y, const char *text);
160         ~TrackPopupUserTitleText();
161         int handle_event();
162
163         MWindow *mwindow;
164         TrackPopupUserTitleWindow *window;
165 };
166
167 class TrackPopupUserTitleWindow : public BC_Window
168 {
169 public:
170         TrackPopupUserTitleWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
171         ~TrackPopupUserTitleWindow();
172
173         void create_objects();
174         void handle_close_event(int result);
175
176         TrackPopupUserTitleText *title_text;
177         MWindow *mwindow;
178         TrackPopup *popup;
179         char new_text[BCTEXTLEN];
180 };
181
182 class TrackUserTitleDialogThread : public BC_DialogThread
183 {
184 public:
185         TrackUserTitleDialogThread(TrackPopupUserTitle *edit_title);
186         ~TrackUserTitleDialogThread();
187
188         void handle_close_event(int result);
189         void handle_done_event(int result);
190         BC_Window* new_gui();
191         void start(int wx, int wy);
192
193         int wx, wy;
194         TrackPopupUserTitle *edit_title;
195         TrackPopupUserTitleWindow *window;
196 };
197
198
199 class TrackPopupTitleColor : public BC_MenuItem
200 {
201 public:
202         TrackPopupTitleColor(MWindow *mwindow, TrackPopup *popup);
203         ~TrackPopupTitleColor();
204
205         int handle_event();
206
207         MWindow *mwindow;
208         TrackPopup *popup;
209         TrackTitleColorPicker *color_picker;
210 };
211
212 class TrackTitleColorDefault : public BC_GenericButton
213 {
214 public:
215         TrackTitleColorDefault(TrackTitleColorPicker *color_picker, int x, int y);
216         int handle_event();
217
218         TrackTitleColorPicker *color_picker;
219 };
220
221 class TrackTitleColorPicker : public ColorPicker
222 {
223 public:
224         TrackTitleColorPicker(TrackPopup *popup, int color);
225         ~TrackTitleColorPicker();
226         void create_objects(ColorWindow *gui);
227         int handle_new_color(int color, int alpha);
228         void handle_done_event(int result);
229
230         TrackPopup *popup;
231         int color;
232 };
233
234
235 class TrackPopupShow : public BC_MenuItem
236 {
237 public:
238         TrackPopupShow(MWindow *mwindow, TrackPopup *popup);
239         ~TrackPopupShow();
240
241         int handle_event();
242
243         MWindow *mwindow;
244         TrackPopup *popup;
245         TrackShowDialogThread *dialog_thread;
246 };
247
248 class TrackShowDialogThread : public BC_DialogThread
249 {
250 public:
251         TrackShowDialogThread(TrackPopupShow *edit_show);
252         ~TrackShowDialogThread();
253         BC_Window* new_gui();
254         void start(int wx, int wy);
255         void handle_close_event(int result);
256
257         int wx, wy;
258         TrackPopupShow *edit_show;
259         TrackPopupShowWindow *window;
260 };
261
262 class TrackPopupShowText : public BC_TextBox
263 {
264 public:
265         TrackPopupShowText(TrackPopupShowWindow *window,
266                 MWindow *mwindow, int x, int y, const char *text);
267         ~TrackPopupShowText();
268
269         TrackPopupShowWindow *window;
270         MWindow *mwindow;
271 };
272
273 class TrackPopupShowWindow : public BC_Window
274 {
275 public:
276         TrackPopupShowWindow(MWindow *mwindow, TrackPopup *popup, int wx, int wy);
277         ~TrackPopupShowWindow();
278
279         void create_objects();
280
281         TrackPopupShowText *show_text;
282         MWindow *mwindow;
283         TrackPopup *popup;
284 };
285
286 #endif