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
);
35 void copy_from(BatchRenderJob
*src
);
36 void load(FileXML
*file
);
37 void save(FileXML
*file
);
40 // Source EDL to render
41 char edl_path
[BCTEXTLEN
];
42 // Destination file for output
46 // Amount of time elapsed in last render operation
48 Preferences
*preferences
;
58 class BatchRenderThread
: public BC_DialogThread
61 BatchRenderThread(MWindow
*mwindow
);
63 void handle_close_event(int result
);
67 void calculate_dest_paths(ArrayList
<char*> *paths
,
68 Preferences
*preferences
,
69 ArrayList
<PluginServer
*> *plugindb
);
71 // Load batch rendering jobs
72 void load_jobs(char *path
, Preferences
*preferences
);
73 // Not applicable to western civilizations
74 void save_jobs(char *path
);
75 void load_defaults(BC_Hash
*defaults
);
76 void save_defaults(BC_Hash
*defaults
);
77 // Create path for persistent storage functions
78 char* create_path(char *string
);
81 // Conditionally returns the job or the default job based on current_job
82 BatchRenderJob
* get_current_job();
83 Asset_GC
get_current_asset();
84 char* get_current_edl();
85 // For command line usage
86 void start_rendering(char *config_path
, char *batch_path
);
88 void start_rendering();
89 void stop_rendering();
90 // Highlight the currently rendering job.
91 void update_active(int number
);
92 void update_done(int number
, int create_list
, double elapsed_time
);
93 void move_batch(int src
, int dst
);
98 BatchRenderJob
*default_job
;
99 ArrayList
<BatchRenderJob
*> jobs
;
101 int column_width
[BATCHRENDER_COLUMNS
];
104 // job being rendered
118 class BatchRenderEDLPath
: public BC_TextBox
121 BatchRenderEDLPath(BatchRenderThread
*thread
,
127 BatchRenderThread
*thread
;
131 class BatchRenderNew
: public BC_GenericButton
134 BatchRenderNew(BatchRenderThread
*thread
,
138 BatchRenderThread
*thread
;
141 class BatchRenderDelete
: public BC_GenericButton
144 BatchRenderDelete(BatchRenderThread
*thread
,
148 BatchRenderThread
*thread
;
153 class BatchRenderSaveList
: public BC_GenericButton
, public Thread
156 BatchRenderSaveList(BatchRenderThread
*thread
,
159 ~BatchRenderSaveList();
161 BatchRenderThread
*thread
;
164 virtual int keypress_event();
168 class BatchRenderLoadList
: public BC_GenericButton
, public Thread
171 BatchRenderLoadList(BatchRenderThread
*thread
,
174 ~BatchRenderLoadList();
176 BatchRenderThread
*thread
;
179 virtual int keypress_event();
185 class BatchRenderList
: public BC_ListBox
188 BatchRenderList(BatchRenderThread
*thread
,
194 int selection_changed();
195 int column_resize_event();
196 int drag_start_event();
197 int drag_motion_event();
198 int drag_stop_event();
200 BatchRenderThread
*thread
;
202 class BatchRenderStart
: public BC_GenericButton
205 BatchRenderStart(BatchRenderThread
*thread
,
209 BatchRenderThread
*thread
;
212 class BatchRenderStop
: public BC_GenericButton
215 BatchRenderStop(BatchRenderThread
*thread
,
219 BatchRenderThread
*thread
;
222 class BatchRenderCancel
: public BC_GenericButton
225 BatchRenderCancel(BatchRenderThread
*thread
,
229 int keypress_event();
230 BatchRenderThread
*thread
;
234 class BatchFormat
: public FormatTools
237 BatchFormat(MWindow
*mwindow
,
249 class BatchRenderGUI
: public BC_Window
252 BatchRenderGUI(MWindow
*mwindow
,
253 BatchRenderThread
*thread
,
260 void create_objects();
261 int resize_event(int w
, int h
);
262 int translation_event();
264 void create_list(int update_widget
);
267 ArrayList
<BC_ListBoxItem
*> list_columns
[BATCHRENDER_COLUMNS
];
270 BatchRenderThread
*thread
;
271 BC_Title
*output_path_title
;
272 BatchFormat
*format_tools
;
273 BrowseButton
*edl_path_browse
;
274 BatchRenderEDLPath
*edl_path_text
;
275 BC_Title
*edl_path_title
;
276 // BC_Title *status_title;
277 // BC_Title *status_text;
278 // BC_ProgressBar *progress_bar;
279 BC_Title
*list_title
;
280 BatchRenderNew
*new_batch
;
281 BatchRenderDelete
*delete_batch
;
282 BatchRenderSaveList
*savelist_batch
;
283 BatchRenderLoadList
*loadlist_batch
;
284 BatchRenderList
*batch_list
;
285 BatchRenderStart
*start_button
;
286 BatchRenderStop
*stop_button
;
287 BatchRenderCancel
*cancel_button
;
298 // c-file-style: "linux"