r870: Merge 2.1:
[cinelerra_cv.git] / cinelerra / new.h
blob2f98a4680cd94bce4ed801eacd79925c495127db
1 #ifndef NEW_H
2 #define NEW_H
4 #include "assets.inc"
5 #include "edl.inc"
6 #include "file.inc"
7 #include "filexml.inc"
8 #include "guicast.h"
9 #include "bchash.inc"
10 #include "formatpresets.h"
11 #include "mwindow.inc"
12 #include "thread.h"
14 class NewThread;
15 class NewWindow;
16 class NewPresets;
18 class New : public BC_MenuItem
20 public:
21 New(MWindow *mwindow);
22 int create_objects();
24 int handle_event();
25 int run_script(FileXML *script);
26 int create_new_project();
28 MWindow *mwindow;
29 NewThread *thread;
30 EDL *new_edl;
32 private:
33 void create_new_edl();
34 FileXML *script;
37 class NewThread : public Thread
39 public:
40 NewThread(MWindow *mwindow, New *new_project);
41 ~NewThread();
43 void run();
45 int load_defaults();
46 int save_defaults();
47 int update_aspect();
48 int auto_aspect;
49 int auto_sizes;
50 NewWindow *nwindow;
51 MWindow *mwindow;
52 New *new_project;
53 Mutex *window_lock;
56 class NewWindow : public BC_Window
58 public:
59 NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y);
60 ~NewWindow();
62 int create_objects();
63 int update();
65 MWindow *mwindow;
66 NewThread *new_thread;
67 EDL *new_edl;
68 BC_TextBox *atracks;
69 BC_TextBox *achannels;
70 BC_TextBox *sample_rate;
71 BC_TextBox *vtracks;
72 BC_TextBox *vchannels;
73 BC_TextBox *frame_rate;
74 BC_TextBox *aspect_w_text, *aspect_h_text;
75 BC_TextBox *output_w_text, *output_h_text;
76 NewPresets *format_presets;
79 class NewPresets : public FormatPresets
81 public:
82 NewPresets(MWindow *mwindow, NewWindow *gui, int x, int y);
83 ~NewPresets();
84 int handle_event();
85 EDL* get_edl();
89 class NewSwapExtents : public BC_Button
91 public:
92 NewSwapExtents(MWindow *mwindow, NewWindow *gui, int x, int y);
93 int handle_event();
94 MWindow *mwindow;
95 NewWindow *gui;
100 class NewATracks : public BC_TextBox
102 public:
103 NewATracks(NewWindow *nwindow, char *text, int x, int y);
104 int handle_event();
105 NewWindow *nwindow;
108 class NewATracksTumbler : public BC_Tumbler
110 public:
111 NewATracksTumbler(NewWindow *nwindow, int x, int y);
112 int handle_up_event();
113 int handle_down_event();
114 NewWindow *nwindow;
117 class NewAChannels : public BC_TextBox
119 public:
120 NewAChannels(NewWindow *nwindow, char *text, int x, int y);
121 int handle_event();
122 NewWindow *nwindow;
125 class NewAChannelsTumbler : public BC_Tumbler
127 public:
128 NewAChannelsTumbler(NewWindow *nwindow, int x, int y);
129 int handle_up_event();
130 int handle_down_event();
131 NewWindow *nwindow;
134 class NewSampleRate : public BC_TextBox
136 public:
137 NewSampleRate(NewWindow *nwindow, char *text, int x, int y);
138 int handle_event();
139 NewWindow *nwindow;
143 class SampleRatePulldown : public BC_ListBox
145 public:
146 SampleRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
147 int handle_event();
148 MWindow *mwindow;
149 BC_TextBox *output;
159 class NewVTracks : public BC_TextBox
161 public:
162 NewVTracks(NewWindow *nwindow, char *text, int x, int y);
163 int handle_event();
164 NewWindow *nwindow;
167 class NewVTracksTumbler : public BC_Tumbler
169 public:
170 NewVTracksTumbler(NewWindow *nwindow, int x, int y);
171 int handle_up_event();
172 int handle_down_event();
173 NewWindow *nwindow;
176 class NewVChannels : public BC_TextBox
178 public:
179 NewVChannels(NewWindow *nwindow, char *text, int x, int y);
180 int handle_event();
181 NewWindow *nwindow;
184 class NewVChannelsTumbler : public BC_Tumbler
186 public:
187 NewVChannelsTumbler(NewWindow *nwindow, int x, int y);
188 int handle_up_event();
189 int handle_down_event();
190 NewWindow *nwindow;
193 class NewFrameRate : public BC_TextBox
195 public:
196 NewFrameRate(NewWindow *nwindow, char *text, int x, int y);
197 int handle_event();
198 NewWindow *nwindow;
201 class FrameRatePulldown : public BC_ListBox
203 public:
204 FrameRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
205 int handle_event();
206 MWindow *mwindow;
207 BC_TextBox *output;
210 class NewTrackW : public BC_TextBox
212 public:
213 NewTrackW(NewWindow *nwindow, int x, int y);
214 int handle_event();
215 NewWindow *nwindow;
218 class NewTrackH : public BC_TextBox
220 public:
221 NewTrackH(NewWindow *nwindow, int x, int y);
222 int handle_event();
223 NewWindow *nwindow;
226 class FrameSizePulldown : public BC_ListBox
228 public:
229 FrameSizePulldown(MWindow *mwindow,
230 BC_TextBox *output_w,
231 BC_TextBox *output_h,
232 int x,
233 int y);
234 int handle_event();
235 MWindow *mwindow;
236 BC_TextBox *output_w;
237 BC_TextBox *output_h;
240 class NewOutputW : public BC_TextBox
242 public:
243 NewOutputW(NewWindow *nwindow, int x, int y);
244 int handle_event();
245 NewWindow *nwindow;
248 class NewOutputH : public BC_TextBox
250 public:
251 NewOutputH(NewWindow *nwindow, int x, int y);
252 int handle_event();
253 NewWindow *nwindow;
256 class NewAspectAuto : public BC_CheckBox
258 public:
259 NewAspectAuto(NewWindow *nwindow, int x, int y);
260 ~NewAspectAuto();
261 int handle_event();
262 NewWindow *nwindow;
265 class NewAspectW : public BC_TextBox
267 public:
268 NewAspectW(NewWindow *nwindow, char *text, int x, int y);
269 int handle_event();
270 NewWindow *nwindow;
273 class NewAspectH : public BC_TextBox
275 public:
276 NewAspectH(NewWindow *nwindow, char *text, int x, int y);
277 int handle_event();
278 NewWindow *nwindow;
281 class AspectPulldown : public BC_ListBox
283 public:
284 AspectPulldown(MWindow *mwindow,
285 BC_TextBox *output_w,
286 BC_TextBox *output_h,
287 int x,
288 int y);
289 int handle_event();
290 MWindow *mwindow;
291 BC_TextBox *output_w;
292 BC_TextBox *output_h;
295 class ColormodelItem : public BC_ListBoxItem
297 public:
298 ColormodelItem(char *text, int value);
299 int value;
302 class ColormodelPulldown : public BC_ListBox
304 public:
305 ColormodelPulldown(MWindow *mwindow,
306 BC_TextBox *output_text,
307 int *output_value,
308 int x,
309 int y);
310 int handle_event();
311 char* colormodel_to_text();
312 MWindow *mwindow;
313 BC_TextBox *output_text;
314 int *output_value;
317 class InterlacemodeItem : public BC_ListBoxItem
319 public:
320 InterlacemodeItem(char *text, int value);
321 int value;
324 class InterlacemodePulldown : public BC_ListBox
326 public:
327 InterlacemodePulldown(MWindow *mwindow,
328 BC_TextBox *output_text,
329 int *output_value,
330 ArrayList<BC_ListBoxItem*> *data,
331 int x,
332 int y);
333 int handle_event();
334 char* interlacemode_to_text();
335 MWindow *mwindow;
336 BC_TextBox *output_text;
337 int *output_value;
338 private:
339 char string[BCTEXTLEN];
342 class InterlacefixmethodItem : public BC_ListBoxItem
344 public:
345 InterlacefixmethodItem(char *text, int value);
346 int value;
349 class InterlacefixmethodPulldown : public BC_ListBox
351 public:
352 InterlacefixmethodPulldown(MWindow *mwindow,
353 BC_TextBox *output_text,
354 int *output_value,
355 ArrayList<BC_ListBoxItem*> *data,
356 int x,
357 int y);
358 int handle_event();
359 char* interlacefixmethod_to_text();
360 MWindow *mwindow;
361 BC_TextBox *output_text;
362 int *output_value;
363 private:
364 char string[BCTEXTLEN];
368 #endif