fixes for full timeline updates, replace nums with syms for update interface
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / performanceprefs.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef PERFORMANCEPREFS_H
23 #define PERFORMANCEPREFS_H
24
25
26 #include "formattools.inc"
27 #include "mwindow.inc"
28 #include "performanceprefs.inc"
29 #include "preferencesthread.h"
30 #include "probeprefs.inc"
31
32
33 class PerformancePrefs : public PreferencesDialog
34 {
35 public:
36         PerformancePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
37         ~PerformancePrefs();
38
39         void create_objects();
40
41         void generate_node_list();
42         void update_node_list();
43         void update_rates();
44         void start_probe_dialog();
45
46         int hot_node;
47
48         CICacheSize *cache_size;
49
50         enum
51         {
52                 ENABLED_COLUMN,
53                 HOSTNAME_COLUMN,
54                 PORT_COLUMN,
55                 RATE_COLUMN,
56                 TOTAL_COLUMNS
57         };
58
59         ArrayList<BC_ListBoxItem*> nodes[TOTAL_COLUMNS];
60         PrefsRenderFarmEditNode *edit_node;
61         PrefsRenderFarmPort *edit_port;
62         PrefsRenderFarmNodes *node_list;
63         PrefsRenderFarmWatchdog *renderfarm_watchdog;
64         FormatTools *brender_tools;
65         BC_Title *master_rate;
66 };
67
68
69 class PrefsUseBRender : public BC_CheckBox
70 {
71 public:
72         PrefsUseBRender(PreferencesWindow *pwindow,
73                 int x, int y);
74         int handle_event();
75         PreferencesWindow *pwindow;
76 };
77
78 class PrefsBRenderFragment : public BC_TumbleTextBox
79 {
80 public:
81         PrefsBRenderFragment(PreferencesWindow *pwindow,
82                 PerformancePrefs *subwindow,
83                 int x, int y);
84         int handle_event();
85         PreferencesWindow *pwindow;
86 };
87
88 class PrefsRenderPreroll : public BC_TumbleTextBox
89 {
90 public:
91         PrefsRenderPreroll(PreferencesWindow *pwindow,
92                 PerformancePrefs *subwindow,
93                 int x,
94                 int y);
95         ~PrefsRenderPreroll();
96
97         int handle_event();
98
99         PreferencesWindow *pwindow;
100 };
101
102 class PrefsBRenderPreroll : public BC_TumbleTextBox
103 {
104 public:
105         PrefsBRenderPreroll(PreferencesWindow *pwindow,
106                 PerformancePrefs *subwindow,
107                 int x,
108                 int y);
109         int handle_event();
110         PreferencesWindow *pwindow;
111 };
112
113 class PrefsForceUniprocessor : public BC_CheckBox
114 {
115 public:
116         PrefsForceUniprocessor(PreferencesWindow *pwindow, int x, int y);
117         ~PrefsForceUniprocessor();
118         int handle_event();
119
120         PreferencesWindow *pwindow;
121 };
122
123 class PrefsFFMPEGMarkerIndecies : public BC_CheckBox
124 {
125 public:
126         PrefsFFMPEGMarkerIndecies(PerformancePrefs *perf_prefs, int x, int y);
127         ~PrefsFFMPEGMarkerIndecies();
128
129         int handle_event();
130
131         PerformancePrefs *perf_prefs;
132 };
133
134 class PrefsRenderFarm : public BC_CheckBox
135 {
136 public:
137         PrefsRenderFarm(PreferencesWindow *pwindow, int x, int y);
138         ~PrefsRenderFarm();
139
140         int handle_event();
141
142         PreferencesWindow *pwindow;
143 };
144
145 class PrefsRenderFarmConsolidate : public BC_CheckBox
146 {
147 public:
148         PrefsRenderFarmConsolidate(PreferencesWindow *pwindow, int x, int y);
149         ~PrefsRenderFarmConsolidate();
150
151         int handle_event();
152
153         PreferencesWindow *pwindow;
154 };
155
156
157 class PrefsRenderFarmPort : public BC_TumbleTextBox
158 {
159 public:
160         PrefsRenderFarmPort(PreferencesWindow *pwindow,
161                 PerformancePrefs *subwindow,
162                 int x, int y);
163         ~PrefsRenderFarmPort();
164
165         int handle_event();
166
167         PreferencesWindow *pwindow;
168 };
169
170 class PrefsProjectSMP : public BC_TumbleTextBox
171 {
172 public:
173         PrefsProjectSMP(PreferencesWindow *pwindow,
174                 PerformancePrefs *subwindow, int x, int y);
175         ~PrefsProjectSMP();
176
177         int handle_event();
178         PreferencesWindow *pwindow;
179 };
180
181 class PrefsRenderFarmJobs : public BC_TumbleTextBox
182 {
183 public:
184         PrefsRenderFarmJobs(PreferencesWindow *pwindow,
185                 PerformancePrefs *subwindow,
186                 int x, int y);
187         ~PrefsRenderFarmJobs();
188
189         int handle_event();
190
191         PreferencesWindow *pwindow;
192 };
193
194 class PrefsRenderFarmMountpoint : public BC_TextBox
195 {
196 public:
197         PrefsRenderFarmMountpoint(PreferencesWindow *pwindow,
198                 PerformancePrefs *subwindow,
199                 int x, int y);
200         ~PrefsRenderFarmMountpoint();
201
202         int handle_event();
203
204         PreferencesWindow *pwindow;
205         PerformancePrefs *subwindow;
206 };
207
208 class PrefsRenderFarmVFS : public BC_CheckBox
209 {
210 public:
211         PrefsRenderFarmVFS(PreferencesWindow *pwindow,
212                 PerformancePrefs *subwindow,
213                 int x,
214                 int y);
215         int handle_event();
216         PreferencesWindow *pwindow;
217         PerformancePrefs *subwindow;
218 };
219
220 class PrefsRenderFarmNodes : public BC_ListBox
221 {
222 public:
223         PrefsRenderFarmNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
224         ~PrefsRenderFarmNodes();
225
226         int handle_event();
227         int selection_changed();
228         int column_resize_event();
229         void update_list();
230
231         const char *titles[PerformancePrefs::TOTAL_COLUMNS];
232         int widths[PerformancePrefs::TOTAL_COLUMNS];
233
234         PreferencesWindow *pwindow;
235         PerformancePrefs *subwindow;
236 };
237
238 class PrefsRenderFarmEditNode : public BC_TextBox
239 {
240 public:
241         PrefsRenderFarmEditNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
242         ~PrefsRenderFarmEditNode();
243
244         int handle_event();
245
246         PerformancePrefs *subwindow;
247         PreferencesWindow *pwindow;
248 };
249
250 class PrefsRenderFarmNewNode : public BC_GenericButton
251 {
252 public:
253         PrefsRenderFarmNewNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
254         ~PrefsRenderFarmNewNode();
255
256         int handle_event();
257
258
259         PerformancePrefs *subwindow;
260         PreferencesWindow *pwindow;
261 };
262
263 class PrefsRenderFarmReplaceNode : public BC_GenericButton
264 {
265 public:
266         PrefsRenderFarmReplaceNode(PreferencesWindow *pwindow,
267                 PerformancePrefs *subwindow,
268                 int x,
269                 int y);
270         ~PrefsRenderFarmReplaceNode();
271
272         int handle_event();
273
274
275         PerformancePrefs *subwindow;
276         PreferencesWindow *pwindow;
277 };
278
279 class PrefsRenderFarmDelNode : public BC_GenericButton
280 {
281 public:
282         PrefsRenderFarmDelNode(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
283         ~PrefsRenderFarmDelNode();
284
285         int handle_event();
286
287         PerformancePrefs *subwindow;
288         PreferencesWindow *pwindow;
289 };
290
291 class PrefsRenderFarmSortNodes : public BC_GenericButton
292 {
293 public:
294         PrefsRenderFarmSortNodes(PreferencesWindow *pwindow, PerformancePrefs *subwindow, int x, int y);
295         ~PrefsRenderFarmSortNodes();
296
297         int handle_event();
298
299         PerformancePrefs *subwindow;
300         PreferencesWindow *pwindow;
301 };
302
303 class PrefsRenderFarmReset : public BC_GenericButton
304 {
305 public:
306         PrefsRenderFarmReset(PreferencesWindow *pwindow,
307                 PerformancePrefs *subwindow, int x, int y);
308
309         int handle_event();
310
311         PerformancePrefs *subwindow;
312         PreferencesWindow *pwindow;
313 };
314
315 class PrefsRenderFarmWatchdog : public BC_TumbleTextBox
316 {
317 public:
318         PrefsRenderFarmWatchdog(PreferencesWindow *pwindow,
319                 PerformancePrefs *subwindow, int x, int y);
320
321         int handle_event();
322
323         PerformancePrefs *subwindow;
324         PreferencesWindow *pwindow;
325 };
326
327
328 class CICacheSize : public BC_TumbleTextBox
329 {
330 public:
331         CICacheSize(int x, int y,
332                 PreferencesWindow *pwindow,
333                 PerformancePrefs *subwindow);
334
335         int handle_event();
336
337         PreferencesWindow *pwindow;
338 };
339
340
341 #endif