6 #include "batchrender.inc"
8 #include "browsebutton.inc"
10 #include "formattools.h"
11 #include "mwindow.inc"
12 #include "preferences.inc"
13 #include "timeentry.h"
15 #define BATCHRENDER_COLUMNS 4
20 class BatchRenderMenuItem
: public BC_MenuItem
23 BatchRenderMenuItem(MWindow
*mwindow
);
33 BatchRenderJob(Preferences
*preferences
);
36 void copy_from(BatchRenderJob
*src
);
37 void load(FileXML
*file
);
38 void save(FileXML
*file
);
41 // Source EDL to render
42 char edl_path
[BCTEXTLEN
];
43 // Destination file for output
47 // Amount of time elapsed in last render operation
49 Preferences
*preferences
;
59 class BatchRenderThread
: public BC_DialogThread
62 BatchRenderThread(MWindow
*mwindow
);
64 void handle_close_event(int result
);
68 void calculate_dest_paths(ArrayList
<char*> *paths
,
69 Preferences
*preferences
,
70 ArrayList
<PluginServer
*> *plugindb
);
72 // Load batch rendering jobs
73 void load_jobs(char *path
, Preferences
*preferences
);
74 // Not applicable to western civilizations
75 void save_jobs(char *path
);
76 void load_defaults(Defaults
*defaults
);
77 void save_defaults(Defaults
*defaults
);
78 // Create path for persistent storage functions
79 char* create_path(char *string
);
82 // Conditionally returns the job or the default job based on current_job
83 BatchRenderJob
* get_current_job();
84 Asset
* get_current_asset();
85 char* get_current_edl();
86 // For command line usage
87 void start_rendering(char *config_path
, char *batch_path
);
89 void start_rendering();
90 void stop_rendering();
91 // Highlight the currently rendering job.
92 void update_active(int number
);
93 void update_done(int number
, int create_list
, double elapsed_time
);
94 void move_batch(int src
, int dst
);
99 BatchRenderJob
*default_job
;
100 ArrayList
<BatchRenderJob
*> jobs
;
102 int column_width
[BATCHRENDER_COLUMNS
];
105 // job being rendered
119 class BatchRenderEDLPath
: public BC_TextBox
122 BatchRenderEDLPath(BatchRenderThread
*thread
,
128 BatchRenderThread
*thread
;
132 class BatchRenderNew
: public BC_GenericButton
135 BatchRenderNew(BatchRenderThread
*thread
,
139 BatchRenderThread
*thread
;
142 class BatchRenderDelete
: public BC_GenericButton
145 BatchRenderDelete(BatchRenderThread
*thread
,
149 BatchRenderThread
*thread
;
152 class BatchRenderList
: public BC_ListBox
155 BatchRenderList(BatchRenderThread
*thread
,
161 int selection_changed();
162 int column_resize_event();
163 int drag_start_event();
164 int drag_motion_event();
165 int drag_stop_event();
167 BatchRenderThread
*thread
;
169 class BatchRenderStart
: public BC_GenericButton
172 BatchRenderStart(BatchRenderThread
*thread
,
176 BatchRenderThread
*thread
;
179 class BatchRenderStop
: public BC_GenericButton
182 BatchRenderStop(BatchRenderThread
*thread
,
186 BatchRenderThread
*thread
;
189 class BatchRenderCancel
: public BC_GenericButton
192 BatchRenderCancel(BatchRenderThread
*thread
,
196 int keypress_event();
197 BatchRenderThread
*thread
;
201 class BatchFormat
: public FormatTools
204 BatchFormat(MWindow
*mwindow
,
216 class BatchRenderGUI
: public BC_Window
219 BatchRenderGUI(MWindow
*mwindow
,
220 BatchRenderThread
*thread
,
227 void create_objects();
228 int resize_event(int w
, int h
);
229 int translation_event();
231 void create_list(int update_widget
);
234 ArrayList
<BC_ListBoxItem
*> list_columns
[BATCHRENDER_COLUMNS
];
237 BatchRenderThread
*thread
;
238 BC_Title
*output_path_title
;
239 BatchFormat
*format_tools
;
240 BrowseButton
*edl_path_browse
;
241 BatchRenderEDLPath
*edl_path_text
;
242 BC_Title
*edl_path_title
;
243 // BC_Title *status_title;
244 // BC_Title *status_text;
245 // BC_ProgressBar *progress_bar;
246 BC_Title
*list_title
;
247 BatchRenderNew
*new_batch
;
248 BatchRenderDelete
*delete_batch
;
249 BatchRenderList
*batch_list
;
250 BatchRenderStart
*start_button
;
251 BatchRenderStop
*stop_button
;
252 BatchRenderCancel
*cancel_button
;