r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / batchrender.h
blob358eddd01c9051cce25dae6672addad2005f9baf
1 #ifndef BATCHRENDER_H
2 #define BATCHRENDER_H
4 #include "arraylist.h"
5 #include "asset.inc"
6 #include "batchrender.inc"
7 #include "bcdialog.h"
8 #include "browsebutton.inc"
9 #include "formattools.h"
10 #include "mwindow.inc"
11 #include "timeentry.h"
13 #define BATCHRENDER_COLUMNS 4
18 class BatchRenderMenuItem : public BC_MenuItem
20 public:
21 BatchRenderMenuItem(MWindow *mwindow);
22 int handle_event();
23 MWindow *mwindow;
28 class BatchRenderJob
30 public:
31 BatchRenderJob(MWindow *mwindow);
32 ~BatchRenderJob();
34 void copy_from(BatchRenderJob *src);
35 void load(FileXML *file);
36 void save(FileXML *file);
37 void fix_strategy();
39 // Source EDL to render
40 char edl_path[BCTEXTLEN];
41 // Destination file for output
42 Asset *asset;
43 int strategy;
44 int enabled;
45 // Amount of time elapsed in last render operation
46 double elapsed;
47 MWindow *mwindow;
57 class BatchRenderThread : public BC_DialogThread
59 public:
60 BatchRenderThread(MWindow *mwindow);
61 void handle_close_event(int result);
62 BC_Window* new_gui();
64 // Load batch rendering jobs
65 void load_jobs();
66 // Not applicable to western civilizations
67 void save_jobs();
68 void load_defaults();
69 void save_defaults();
70 // Create path for persistent storage functions
71 char* create_path(char *string);
72 void new_job();
73 void delete_job();
74 // Conditionally returns the job or the default job based on current_job
75 BatchRenderJob* get_current_job();
76 Asset* get_current_asset();
77 char* get_current_edl();
78 void start_rendering();
79 void stop_rendering();
80 // Highlight the currently rendering job.
81 void update_active(int number);
82 void update_done(int number, int create_list, double elapsed_time);
83 void move_batch(int src, int dst);
85 MWindow *mwindow;
86 double current_start;
87 double current_end;
88 BatchRenderJob *default_job;
89 ArrayList<BatchRenderJob*> jobs;
90 BatchRenderGUI *gui;
91 int column_width[BATCHRENDER_COLUMNS];
92 // job being edited
93 int current_job;
94 // job being rendered
95 int rendering_job;
96 int is_rendering;
108 class BatchRenderEDLPath : public BC_TextBox
110 public:
111 BatchRenderEDLPath(BatchRenderThread *thread,
112 int x,
113 int y,
114 int w,
115 char *text);
116 int handle_event();
117 BatchRenderThread *thread;
121 class BatchRenderNew : public BC_GenericButton
123 public:
124 BatchRenderNew(BatchRenderThread *thread,
125 int x,
126 int y);
127 int handle_event();
128 BatchRenderThread *thread;
131 class BatchRenderDelete : public BC_GenericButton
133 public:
134 BatchRenderDelete(BatchRenderThread *thread,
135 int x,
136 int y);
137 int handle_event();
138 BatchRenderThread *thread;
141 class BatchRenderList : public BC_ListBox
143 public:
144 BatchRenderList(BatchRenderThread *thread,
145 int x,
146 int y,
147 int w,
148 int h);
149 int handle_event();
150 int selection_changed();
151 int column_resize_event();
152 int drag_start_event();
153 int drag_motion_event();
154 int drag_stop_event();
155 int dragging_item;
156 BatchRenderThread *thread;
158 class BatchRenderStart : public BC_Button
160 public:
161 BatchRenderStart(BatchRenderThread *thread,
162 int x,
163 int y);
164 int handle_event();
165 BatchRenderThread *thread;
168 class BatchRenderStop : public BC_Button
170 public:
171 BatchRenderStop(BatchRenderThread *thread,
172 int x,
173 int y);
174 int handle_event();
175 BatchRenderThread *thread;
178 class BatchRenderCancel : public BC_Button
180 public:
181 BatchRenderCancel(BatchRenderThread *thread,
182 int x,
183 int y);
184 int handle_event();
185 int keypress_event();
186 BatchRenderThread *thread;
190 class BatchFormat : public FormatTools
192 public:
193 BatchFormat(MWindow *mwindow,
194 BatchRenderGUI *gui,
195 Asset *asset);
196 ~BatchFormat();
198 int handle_event();
200 BatchRenderGUI *gui;
201 MWindow *mwindow;
205 class BatchRenderGUI : public BC_Window
207 public:
208 BatchRenderGUI(MWindow *mwindow,
209 BatchRenderThread *thread,
210 int x,
211 int y,
212 int w,
213 int h);
214 ~BatchRenderGUI();
216 void create_objects();
217 int resize_event(int w, int h);
218 int translation_event();
219 int close_event();
220 void create_list(int update_widget);
221 void change_job();
223 ArrayList<BC_ListBoxItem*> list_columns[BATCHRENDER_COLUMNS];
225 MWindow *mwindow;
226 BatchRenderThread *thread;
227 BC_Title *output_path_title;
228 BatchFormat *format_tools;
229 BrowseButton *edl_path_browse;
230 BatchRenderEDLPath *edl_path_text;
231 BC_Title *edl_path_title;
232 // BC_Title *status_title;
233 // BC_Title *status_text;
234 // BC_ProgressBar *progress_bar;
235 BC_Title *list_title;
236 BatchRenderNew *new_batch;
237 BatchRenderDelete *delete_batch;
238 BatchRenderList *batch_list;
239 BatchRenderStart *start_button;
240 BatchRenderStop *stop_button;
241 BatchRenderCancel *cancel_button;
248 #endif