r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / new.h
blobc118babb049f00d12a4d7fa010b0619fbc90bd79
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 "defaults.inc"
10 #include "mwindow.inc"
11 #include "thread.h"
13 class NewThread;
14 class NewWindow;
16 class New : public BC_MenuItem
18 public:
19 New(MWindow *mwindow);
20 int create_objects();
22 int handle_event();
23 int run_script(FileXML *script);
24 int create_new_project();
26 MWindow *mwindow;
27 NewThread *thread;
28 EDL *new_edl;
30 private:
31 void create_new_edl();
32 FileXML *script;
35 class NewThread : public Thread
37 public:
38 NewThread(MWindow *mwindow, New *new_project);
39 ~NewThread();
41 void run();
43 int load_defaults();
44 int save_defaults();
45 int update_aspect();
46 int auto_aspect;
47 int auto_sizes;
48 NewWindow *nwindow;
49 MWindow *mwindow;
50 New *new_project;
53 class NewPresetsPulldown;
54 class NewPresetItem;
55 class NewPresetsText;
57 class NewWindow : public BC_Window
59 public:
60 NewWindow(MWindow *mwindow, NewThread *new_thread);
61 ~NewWindow();
63 void create_presets(int &x, int &y);
64 int create_objects();
65 int update();
66 // Match the EDL configuration to a preset for displaying in the preset box.
67 int get_preset(EDL *edl);
68 // Get the text for the preset returned by get_preset
69 char* get_preset_text();
71 MWindow *mwindow;
72 NewThread *new_thread;
73 EDL *new_edl;
74 BC_TextBox *atracks;
75 BC_TextBox *achannels;
76 BC_TextBox *sample_rate;
77 BC_TextBox *vtracks;
78 BC_TextBox *vchannels;
79 BC_TextBox *frame_rate;
80 BC_TextBox *aspect_w_text, *aspect_h_text;
81 // BC_TextBox *canvas_w_text, *canvas_h_text;
82 BC_TextBox *output_w_text, *output_h_text;
83 NewPresetsPulldown *presets;
84 NewPresetsText *presets_text;
85 ArrayList<NewPresetItem*> preset_items;
91 class NewPresetsText : public BC_TextBox
93 public:
94 NewPresetsText(MWindow *mwindow, NewWindow *window, int x, int y);
95 int handle_event();
96 MWindow *mwindow;
97 NewWindow *window;
100 class NewPresetsPulldown : public BC_ListBox
102 public:
103 NewPresetsPulldown(MWindow *mwindow, NewWindow *window, int x, int y);
104 int handle_event();
105 MWindow *mwindow;
106 NewWindow *window;
109 class NewPresetItem : public BC_ListBoxItem
111 public:
112 NewPresetItem(MWindow *mwindow, NewWindow *window, char *text);
113 ~NewPresetItem();
115 MWindow *mwindow;
116 NewWindow *window;
117 EDL *edl;
124 class NewATracks : public BC_TextBox
126 public:
127 NewATracks(NewWindow *nwindow, char *text, int x, int y);
128 int handle_event();
129 NewWindow *nwindow;
132 class NewATracksTumbler : public BC_Tumbler
134 public:
135 NewATracksTumbler(NewWindow *nwindow, int x, int y);
136 int handle_up_event();
137 int handle_down_event();
138 NewWindow *nwindow;
141 class NewAChannels : public BC_TextBox
143 public:
144 NewAChannels(NewWindow *nwindow, char *text, int x, int y);
145 int handle_event();
146 NewWindow *nwindow;
149 class NewAChannelsTumbler : public BC_Tumbler
151 public:
152 NewAChannelsTumbler(NewWindow *nwindow, int x, int y);
153 int handle_up_event();
154 int handle_down_event();
155 NewWindow *nwindow;
158 class NewSampleRate : public BC_TextBox
160 public:
161 NewSampleRate(NewWindow *nwindow, char *text, int x, int y);
162 int handle_event();
163 NewWindow *nwindow;
167 class SampleRatePulldown : public BC_ListBox
169 public:
170 SampleRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
171 int handle_event();
172 MWindow *mwindow;
173 BC_TextBox *output;
183 class NewVTracks : public BC_TextBox
185 public:
186 NewVTracks(NewWindow *nwindow, char *text, int x, int y);
187 int handle_event();
188 NewWindow *nwindow;
191 class NewVTracksTumbler : public BC_Tumbler
193 public:
194 NewVTracksTumbler(NewWindow *nwindow, int x, int y);
195 int handle_up_event();
196 int handle_down_event();
197 NewWindow *nwindow;
200 class NewVChannels : public BC_TextBox
202 public:
203 NewVChannels(NewWindow *nwindow, char *text, int x, int y);
204 int handle_event();
205 NewWindow *nwindow;
208 class NewVChannelsTumbler : public BC_Tumbler
210 public:
211 NewVChannelsTumbler(NewWindow *nwindow, int x, int y);
212 int handle_up_event();
213 int handle_down_event();
214 NewWindow *nwindow;
217 class NewFrameRate : public BC_TextBox
219 public:
220 NewFrameRate(NewWindow *nwindow, char *text, int x, int y);
221 int handle_event();
222 NewWindow *nwindow;
225 class FrameRatePulldown : public BC_ListBox
227 public:
228 FrameRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
229 int handle_event();
230 MWindow *mwindow;
231 BC_TextBox *output;
234 class NewTrackW : public BC_TextBox
236 public:
237 NewTrackW(NewWindow *nwindow, int x, int y);
238 int handle_event();
239 NewWindow *nwindow;
242 class NewTrackH : public BC_TextBox
244 public:
245 NewTrackH(NewWindow *nwindow, int x, int y);
246 int handle_event();
247 NewWindow *nwindow;
250 class FrameSizePulldown : public BC_ListBox
252 public:
253 FrameSizePulldown(MWindow *mwindow,
254 BC_TextBox *output_w,
255 BC_TextBox *output_h,
256 int x,
257 int y);
258 int handle_event();
259 MWindow *mwindow;
260 BC_TextBox *output_w;
261 BC_TextBox *output_h;
264 class NewOutputW : public BC_TextBox
266 public:
267 NewOutputW(NewWindow *nwindow, int x, int y);
268 int handle_event();
269 NewWindow *nwindow;
272 class NewOutputH : public BC_TextBox
274 public:
275 NewOutputH(NewWindow *nwindow, int x, int y);
276 int handle_event();
277 NewWindow *nwindow;
280 class NewAspectAuto : public BC_CheckBox
282 public:
283 NewAspectAuto(NewWindow *nwindow, int x, int y);
284 ~NewAspectAuto();
285 int handle_event();
286 NewWindow *nwindow;
289 class NewAspectW : public BC_TextBox
291 public:
292 NewAspectW(NewWindow *nwindow, char *text, int x, int y);
293 int handle_event();
294 NewWindow *nwindow;
297 class NewAspectH : public BC_TextBox
299 public:
300 NewAspectH(NewWindow *nwindow, char *text, int x, int y);
301 int handle_event();
302 NewWindow *nwindow;
305 class AspectPulldown : public BC_ListBox
307 public:
308 AspectPulldown(MWindow *mwindow,
309 BC_TextBox *output_w,
310 BC_TextBox *output_h,
311 int x,
312 int y);
313 int handle_event();
314 MWindow *mwindow;
315 BC_TextBox *output_w;
316 BC_TextBox *output_h;
319 class ColormodelItem : public BC_ListBoxItem
321 public:
322 ColormodelItem(char *text, int value);
323 int value;
326 class ColormodelPulldown : public BC_ListBox
328 public:
329 ColormodelPulldown(MWindow *mwindow,
330 BC_TextBox *output_text,
331 int *output_value,
332 int x,
333 int y);
334 int handle_event();
335 char* colormodel_to_text();
336 MWindow *mwindow;
337 BC_TextBox *output_text;
338 int *output_value;
343 class NewCloneToggle : public BC_Toggle
345 public:
346 NewCloneToggle(MWindow *mwindow, NewWindow *nwindow, int x, int y);
347 int handle_event();
348 MWindow *mwindow;
349 NewWindow *nwindow;
352 #endif