00001 #ifndef NEW_H
00002 #define NEW_H
00003
00004 #include "assets.inc"
00005 #include "edl.inc"
00006 #include "file.inc"
00007 #include "filexml.inc"
00008 #include "guicast.h"
00009 #include "bchash.inc"
00010 #include "formatpresets.h"
00011 #include "mwindow.inc"
00012 #include "thread.h"
00013
00014 class NewThread;
00015 class NewWindow;
00016 class NewPresets;
00017 class InterlacemodePulldown;
00018
00019 class New : public BC_MenuItem
00020 {
00021 public:
00022 New(MWindow *mwindow);
00023 int create_objects();
00024
00025 int handle_event();
00026 int run_script(FileXML *script);
00027 int create_new_project();
00028
00029 MWindow *mwindow;
00030 NewThread *thread;
00031 EDL *new_edl;
00032
00033 private:
00034 void create_new_edl();
00035 FileXML *script;
00036 };
00037
00038 class NewThread : public Thread
00039 {
00040 public:
00041 NewThread(MWindow *mwindow, New *new_project);
00042 ~NewThread();
00043
00044 void run();
00045
00046 int load_defaults();
00047 int save_defaults();
00048 int update_aspect();
00049 int auto_aspect;
00050 int auto_sizes;
00051 NewWindow *nwindow;
00052 MWindow *mwindow;
00053 New *new_project;
00054 Mutex *window_lock;
00055 };
00056
00057 class NewWindow : public BC_Window
00058 {
00059 public:
00060 NewWindow(MWindow *mwindow, NewThread *new_thread, int x, int y);
00061 ~NewWindow();
00062
00063 int create_objects();
00064 int update();
00065
00066 MWindow *mwindow;
00067 NewThread *new_thread;
00068 EDL *new_edl;
00069 BC_TextBox *atracks;
00070 BC_TextBox *achannels;
00071 BC_TextBox *sample_rate;
00072 BC_TextBox *vtracks;
00073 BC_TextBox *vchannels;
00074 BC_TextBox *frame_rate;
00075 BC_TextBox *aspect_w_text, *aspect_h_text;
00076 BC_TextBox *output_w_text, *output_h_text;
00077 InterlacemodePulldown *interlace_pulldown;
00078 NewPresets *format_presets;
00079 };
00080
00081 class NewPresets : public FormatPresets
00082 {
00083 public:
00084 NewPresets(MWindow *mwindow, NewWindow *gui, int x, int y);
00085 ~NewPresets();
00086 int handle_event();
00087 EDL* get_edl();
00088 };
00089
00090
00091 class NewSwapExtents : public BC_Button
00092 {
00093 public:
00094 NewSwapExtents(MWindow *mwindow, NewWindow *gui, int x, int y);
00095 int handle_event();
00096 MWindow *mwindow;
00097 NewWindow *gui;
00098 };
00099
00100
00101
00102 class NewATracks : public BC_TextBox
00103 {
00104 public:
00105 NewATracks(NewWindow *nwindow, char *text, int x, int y);
00106 int handle_event();
00107 NewWindow *nwindow;
00108 };
00109
00110 class NewATracksTumbler : public BC_Tumbler
00111 {
00112 public:
00113 NewATracksTumbler(NewWindow *nwindow, int x, int y);
00114 int handle_up_event();
00115 int handle_down_event();
00116 NewWindow *nwindow;
00117 };
00118
00119 class NewAChannels : public BC_TextBox
00120 {
00121 public:
00122 NewAChannels(NewWindow *nwindow, char *text, int x, int y);
00123 int handle_event();
00124 NewWindow *nwindow;
00125 };
00126
00127 class NewAChannelsTumbler : public BC_Tumbler
00128 {
00129 public:
00130 NewAChannelsTumbler(NewWindow *nwindow, int x, int y);
00131 int handle_up_event();
00132 int handle_down_event();
00133 NewWindow *nwindow;
00134 };
00135
00136 class NewSampleRate : public BC_TextBox
00137 {
00138 public:
00139 NewSampleRate(NewWindow *nwindow, char *text, int x, int y);
00140 int handle_event();
00141 NewWindow *nwindow;
00142 };
00143
00144
00145 class SampleRatePulldown : public BC_ListBox
00146 {
00147 public:
00148 SampleRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
00149 int handle_event();
00150 MWindow *mwindow;
00151 BC_TextBox *output;
00152 };
00153
00154
00155
00156
00157
00158
00159
00160
00161 class NewVTracks : public BC_TextBox
00162 {
00163 public:
00164 NewVTracks(NewWindow *nwindow, char *text, int x, int y);
00165 int handle_event();
00166 NewWindow *nwindow;
00167 };
00168
00169 class NewVTracksTumbler : public BC_Tumbler
00170 {
00171 public:
00172 NewVTracksTumbler(NewWindow *nwindow, int x, int y);
00173 int handle_up_event();
00174 int handle_down_event();
00175 NewWindow *nwindow;
00176 };
00177
00178 class NewVChannels : public BC_TextBox
00179 {
00180 public:
00181 NewVChannels(NewWindow *nwindow, char *text, int x, int y);
00182 int handle_event();
00183 NewWindow *nwindow;
00184 };
00185
00186 class NewVChannelsTumbler : public BC_Tumbler
00187 {
00188 public:
00189 NewVChannelsTumbler(NewWindow *nwindow, int x, int y);
00190 int handle_up_event();
00191 int handle_down_event();
00192 NewWindow *nwindow;
00193 };
00194
00195 class NewFrameRate : public BC_TextBox
00196 {
00197 public:
00198 NewFrameRate(NewWindow *nwindow, char *text, int x, int y);
00199 int handle_event();
00200 NewWindow *nwindow;
00201 };
00202
00203 class FrameRatePulldown : public BC_ListBox
00204 {
00205 public:
00206 FrameRatePulldown(MWindow *mwindow, BC_TextBox *output, int x, int y);
00207 int handle_event();
00208 MWindow *mwindow;
00209 BC_TextBox *output;
00210 };
00211
00212 class NewTrackW : public BC_TextBox
00213 {
00214 public:
00215 NewTrackW(NewWindow *nwindow, int x, int y);
00216 int handle_event();
00217 NewWindow *nwindow;
00218 };
00219
00220 class NewTrackH : public BC_TextBox
00221 {
00222 public:
00223 NewTrackH(NewWindow *nwindow, int x, int y);
00224 int handle_event();
00225 NewWindow *nwindow;
00226 };
00227
00228 class FrameSizePulldown : public BC_ListBox
00229 {
00230 public:
00231 FrameSizePulldown(MWindow *mwindow,
00232 BC_TextBox *output_w,
00233 BC_TextBox *output_h,
00234 int x,
00235 int y);
00236 int handle_event();
00237 MWindow *mwindow;
00238 BC_TextBox *output_w;
00239 BC_TextBox *output_h;
00240 };
00241
00242 class NewOutputW : public BC_TextBox
00243 {
00244 public:
00245 NewOutputW(NewWindow *nwindow, int x, int y);
00246 int handle_event();
00247 NewWindow *nwindow;
00248 };
00249
00250 class NewOutputH : public BC_TextBox
00251 {
00252 public:
00253 NewOutputH(NewWindow *nwindow, int x, int y);
00254 int handle_event();
00255 NewWindow *nwindow;
00256 };
00257
00258 class NewAspectAuto : public BC_CheckBox
00259 {
00260 public:
00261 NewAspectAuto(NewWindow *nwindow, int x, int y);
00262 ~NewAspectAuto();
00263 int handle_event();
00264 NewWindow *nwindow;
00265 };
00266
00267 class NewAspectW : public BC_TextBox
00268 {
00269 public:
00270 NewAspectW(NewWindow *nwindow, char *text, int x, int y);
00271 int handle_event();
00272 NewWindow *nwindow;
00273 };
00274
00275 class NewAspectH : public BC_TextBox
00276 {
00277 public:
00278 NewAspectH(NewWindow *nwindow, char *text, int x, int y);
00279 int handle_event();
00280 NewWindow *nwindow;
00281 };
00282
00283 class AspectPulldown : public BC_ListBox
00284 {
00285 public:
00286 AspectPulldown(MWindow *mwindow,
00287 BC_TextBox *output_w,
00288 BC_TextBox *output_h,
00289 int x,
00290 int y);
00291 int handle_event();
00292 MWindow *mwindow;
00293 BC_TextBox *output_w;
00294 BC_TextBox *output_h;
00295 };
00296
00297 class ColormodelItem : public BC_ListBoxItem
00298 {
00299 public:
00300 ColormodelItem(char *text, int value);
00301 int value;
00302 };
00303
00304 class ColormodelPulldown : public BC_ListBox
00305 {
00306 public:
00307 ColormodelPulldown(MWindow *mwindow,
00308 BC_TextBox *output_text,
00309 int *output_value,
00310 int x,
00311 int y);
00312 int handle_event();
00313 char* colormodel_to_text();
00314 MWindow *mwindow;
00315 BC_TextBox *output_text;
00316 int *output_value;
00317 };
00318
00319 class InterlacemodeItem : public BC_ListBoxItem
00320 {
00321 public:
00322 InterlacemodeItem(char *text, int value);
00323 int value;
00324 };
00325
00326 class InterlacemodePulldown : public BC_ListBox
00327 {
00328 public:
00329 InterlacemodePulldown(MWindow *mwindow,
00330 BC_TextBox *output_text,
00331 int *output_value,
00332 ArrayList<BC_ListBoxItem*> *data,
00333 int x,
00334 int y);
00335 int handle_event();
00336 char* interlacemode_to_text();
00337 int update(int value);
00338 MWindow *mwindow;
00339 BC_TextBox *output_text;
00340 int *output_value;
00341 private:
00342 char string[BCTEXTLEN];
00343 };
00344
00345 class InterlacefixmethodItem : public BC_ListBoxItem
00346 {
00347 public:
00348 InterlacefixmethodItem(char *text, int value);
00349 int value;
00350 };
00351
00352 class InterlacefixmethodPulldown : public BC_ListBox
00353 {
00354 public:
00355 InterlacefixmethodPulldown(MWindow *mwindow,
00356 BC_TextBox *output_text,
00357 int *output_value,
00358 ArrayList<BC_ListBoxItem*> *data,
00359 int x,
00360 int y);
00361 int handle_event();
00362 char* interlacefixmethod_to_text();
00363 MWindow *mwindow;
00364 BC_TextBox *output_text;
00365 int *output_value;
00366 private:
00367 char string[BCTEXTLEN];
00368 };
00369
00370
00371 #endif