initial commit
[goodguy/history.git] / cinelerra-5.0 / cinelerra / new.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 NEW_H
23 #define NEW_H
24
25 #include "assets.inc"
26 #include "bcdialog.h"
27 #include "edl.inc"
28 #include "file.inc"
29 #include "filexml.inc"
30 #include "guicast.h"
31 #include "bchash.inc"
32 #include "formatpresets.h"
33 #include "mwindow.inc"
34
35 class NewThread;
36 class NewWindow;
37 class NewPresets;
38
39 class New : public BC_MenuItem
40 {
41 public:
42         New(MWindow *mwindow);
43         ~New();
44         void create_objects();
45
46         int handle_event();
47         int run_script(FileXML *script);
48         int create_new_project();
49         void create_new_edl();
50
51         MWindow *mwindow;
52         NewThread *thread;
53         EDL *new_edl;
54
55 private:
56         FileXML *script;
57 };
58
59 class NewThread : public BC_DialogThread
60 {
61 public:
62         NewThread(MWindow *mwindow, New *new_project);
63         ~NewThread();
64         
65         BC_Window* new_gui();
66         void handle_close_event(int result);
67
68         int load_defaults();
69         int save_defaults();
70         int update_aspect();
71         int auto_aspect;
72         int auto_sizes;
73         NewWindow *nwindow;
74         MWindow *mwindow;
75         New *new_project;
76 };
77
78 class NewWindow : public BC_Window
79 {
80 public:
81         NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y);
82         ~NewWindow();
83         
84         void create_objects();
85         int update();
86
87         MWindow *mwindow;
88         NewThread *new_thread;
89         EDL *new_edl;
90         BC_TextBox *atracks;
91         BC_TextBox *achannels;
92         BC_TextBox *sample_rate;
93         BC_TextBox *vtracks;
94         BC_TextBox *vchannels;
95         BC_TextBox *frame_rate;
96         BC_TextBox *aspect_w_text, *aspect_h_text;
97         BC_TextBox *output_w_text, *output_h_text;
98         NewPresets *format_presets;
99 };
100
101 class NewPresets : public FormatPresets
102 {
103 public:
104         NewPresets(MWindow *mwindow, NewWindow *gui, int x, int y);
105         ~NewPresets();
106         int handle_event();
107         EDL* get_edl();
108 };
109
110
111 class NewSwapExtents : public BC_Button
112 {
113 public:
114         NewSwapExtents(MWindow *mwindow, NewWindow *gui, int x, int y);
115         int handle_event();
116         MWindow *mwindow;
117         NewWindow *gui;
118 };
119
120
121
122 class NewATracks : public BC_TextBox
123 {
124 public:
125         NewATracks(NewWindow *nwindow, const char *text, int x, int y);
126         int handle_event();
127         NewWindow *nwindow;
128 };
129
130 class NewATracksTumbler : public BC_Tumbler
131 {
132 public:
133         NewATracksTumbler(NewWindow *nwindow, int x, int y);
134         int handle_up_event();
135         int handle_down_event();
136         NewWindow *nwindow;
137 };
138
139 class NewAChannels : public BC_TextBox
140 {
141 public:
142         NewAChannels(NewWindow *nwindow, const char *text, int x, int y);
143         int handle_event();
144         NewWindow *nwindow;
145 };
146
147 class NewAChannelsTumbler : public BC_Tumbler
148 {
149 public:
150         NewAChannelsTumbler(NewWindow *nwindow, int x, int y);
151         int handle_up_event();
152         int handle_down_event();
153         NewWindow *nwindow;
154 };
155
156 class NewSampleRate : public BC_TextBox
157 {
158 public:
159         NewSampleRate(NewWindow *nwindow, const char *text, int x, int y);
160         int handle_event();
161         NewWindow *nwindow;
162 };
163
164
165 class SampleRatePulldown : public BC_ListBox
166 {
167 public:
168         SampleRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
169         int handle_event();
170         MWindow *mwindow;
171         BC_TextBox *output;
172 };
173
174
175
176
177
178
179
180
181 class NewVTracks : public BC_TextBox
182 {
183 public:
184         NewVTracks(NewWindow *nwindow, const char *text, int x, int y);
185         int handle_event();
186         NewWindow *nwindow;
187 };
188
189 class NewVTracksTumbler : public BC_Tumbler
190 {
191 public:
192         NewVTracksTumbler(NewWindow *nwindow, int x, int y);
193         int handle_up_event();
194         int handle_down_event();
195         NewWindow *nwindow;
196 };
197
198 class NewVChannels : public BC_TextBox
199 {
200 public:
201         NewVChannels(NewWindow *nwindow, const char *text, int x, int y);
202         int handle_event();
203         NewWindow *nwindow;
204 };
205
206 class NewVChannelsTumbler : public BC_Tumbler
207 {
208 public:
209         NewVChannelsTumbler(NewWindow *nwindow, int x, int y);
210         int handle_up_event();
211         int handle_down_event();
212         NewWindow *nwindow;
213 };
214
215 class NewFrameRate : public BC_TextBox
216 {
217 public:
218         NewFrameRate(NewWindow *nwindow, const char *text, int x, int y);
219         int handle_event();
220         NewWindow *nwindow;
221 };
222
223 class FrameRatePulldown : public BC_ListBox
224 {
225 public:
226         FrameRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
227         int handle_event();
228         MWindow *mwindow;
229         BC_TextBox *output;
230 };
231
232 class NewTrackW : public BC_TextBox
233 {
234 public:
235         NewTrackW(NewWindow *nwindow, int x, int y);
236         int handle_event();
237         NewWindow *nwindow;
238 };
239
240 class NewTrackH : public BC_TextBox
241 {
242 public:
243         NewTrackH(NewWindow *nwindow, int x, int y);
244         int handle_event();
245         NewWindow *nwindow;
246 };
247
248 class FrameSizePulldown : public BC_ListBox
249 {
250 public:
251         FrameSizePulldown(Theme *theme, 
252                 BC_TextBox *output_w, 
253                 BC_TextBox *output_h, 
254                 int x, 
255                 int y);
256         int handle_event();
257         Theme *theme;
258         BC_TextBox *output_w;
259         BC_TextBox *output_h;
260 };
261
262 class NewOutputW : public BC_TextBox
263 {
264 public:
265         NewOutputW(NewWindow *nwindow, int x, int y);
266         int handle_event();
267         NewWindow *nwindow;
268 };
269
270 class NewOutputH : public BC_TextBox
271 {
272 public:
273         NewOutputH(NewWindow *nwindow, int x, int y);
274         int handle_event();
275         NewWindow *nwindow;
276 };
277
278 class NewAspectAuto : public BC_CheckBox
279 {
280 public:
281         NewAspectAuto(NewWindow *nwindow, int x, int y);
282         ~NewAspectAuto();
283         int handle_event();
284         NewWindow *nwindow;
285 };
286
287 class NewAspectW : public BC_TextBox
288 {
289 public:
290         NewAspectW(NewWindow *nwindow, const char *text, int x, int y);
291         int handle_event();
292         NewWindow *nwindow;
293 };
294
295 class NewAspectH : public BC_TextBox
296 {
297 public:
298         NewAspectH(NewWindow *nwindow, const char *text, int x, int y);
299         int handle_event();
300         NewWindow *nwindow;
301 };
302
303 class AspectPulldown : public BC_ListBox
304 {
305 public:
306         AspectPulldown(MWindow *mwindow, 
307                 BC_TextBox *output_w, 
308                 BC_TextBox *output_h, 
309                 int x, 
310                 int y);
311         int handle_event();
312         MWindow *mwindow;
313         BC_TextBox *output_w;
314         BC_TextBox *output_h;
315 };
316
317 class ColormodelItem : public BC_ListBoxItem
318 {
319 public:
320         ColormodelItem(const char *text, int value);
321         int value;
322 };
323
324 class ColormodelPulldown : public BC_ListBox
325 {
326 public:
327         ColormodelPulldown(MWindow *mwindow, 
328                 BC_TextBox *output_text, 
329                 int *output_value,
330                 int x, 
331                 int y);
332         int handle_event();
333         const char* colormodel_to_text();
334         MWindow *mwindow;
335         BC_TextBox *output_text;
336         int *output_value;
337 };
338
339
340
341
342 #endif