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(BC_Hash
*defaults
);
77 void save_defaults(BC_Hash
*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
;
154 class BatchRenderSaveList
: public BC_GenericButton
, public Thread
157 BatchRenderSaveList(BatchRenderThread
*thread
,
160 ~BatchRenderSaveList();
162 BatchRenderThread
*thread
;
165 virtual int keypress_event();
169 class BatchRenderLoadList
: public BC_GenericButton
, public Thread
172 BatchRenderLoadList(BatchRenderThread
*thread
,
175 ~BatchRenderLoadList();
177 BatchRenderThread
*thread
;
180 virtual int keypress_event();
186 class BatchRenderList
: public BC_ListBox
189 BatchRenderList(BatchRenderThread
*thread
,
195 int selection_changed();
196 int column_resize_event();
197 int drag_start_event();
198 int drag_motion_event();
199 int drag_stop_event();
201 BatchRenderThread
*thread
;
203 class BatchRenderStart
: public BC_GenericButton
206 BatchRenderStart(BatchRenderThread
*thread
,
210 BatchRenderThread
*thread
;
213 class BatchRenderStop
: public BC_GenericButton
216 BatchRenderStop(BatchRenderThread
*thread
,
220 BatchRenderThread
*thread
;
223 class BatchRenderCancel
: public BC_GenericButton
226 BatchRenderCancel(BatchRenderThread
*thread
,
230 int keypress_event();
231 BatchRenderThread
*thread
;
235 class BatchFormat
: public FormatTools
238 BatchFormat(MWindow
*mwindow
,
250 class BatchRenderGUI
: public BC_Window
253 BatchRenderGUI(MWindow
*mwindow
,
254 BatchRenderThread
*thread
,
261 void create_objects();
262 int resize_event(int w
, int h
);
263 int translation_event();
265 void create_list(int update_widget
);
268 ArrayList
<BC_ListBoxItem
*> list_columns
[BATCHRENDER_COLUMNS
];
271 BatchRenderThread
*thread
;
272 BC_Title
*output_path_title
;
273 BatchFormat
*format_tools
;
274 BrowseButton
*edl_path_browse
;
275 BatchRenderEDLPath
*edl_path_text
;
276 BC_Title
*edl_path_title
;
277 // BC_Title *status_title;
278 // BC_Title *status_text;
279 // BC_ProgressBar *progress_bar;
280 BC_Title
*list_title
;
281 BatchRenderNew
*new_batch
;
282 BatchRenderDelete
*delete_batch
;
283 BatchRenderSaveList
*savelist_batch
;
284 BatchRenderLoadList
*loadlist_batch
;
285 BatchRenderList
*batch_list
;
286 BatchRenderStart
*start_button
;
287 BatchRenderStop
*stop_button
;
288 BatchRenderCancel
*cancel_button
;