no longer need ffmpeg patch0 which was for Termux
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / appearanceprefs.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 APPEARANCEPREFS_H
23 #define APPEARANCEPREFS_H
24
25 #include "appearanceprefs.inc"
26 #include "browsebutton.h"
27 #include "colorpicker.h"
28 #include "deleteallindexes.inc"
29 #include "mwindow.inc"
30 #include "preferencesthread.h"
31 #include "shbtnprefs.inc"
32
33
34 class AppearancePrefs : public PreferencesDialog
35 {
36 public:
37         AppearancePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
38         ~AppearancePrefs();
39
40         void create_objects();
41
42         int update(int new_value);
43         TimeFormatHMS *hms;
44         TimeFormatHMSF *hmsf;
45         TimeFormatTimecode *timecode;
46         TimeFormatSamples *samples;
47         TimeFormatHex *hex;
48         TimeFormatFrames *frames;
49         TimeFormatFeet *feet;
50         TimeFormatSeconds *seconds;
51         ViewLayoutScale *layout_scale;
52         ViewThumbnails *thumbnails;
53         ViewThumbnailSize *thumbnail_size;
54         ViewViconSize *vicon_size;
55         ViewViconColorMode *vicon_color_mode;
56         YuvColorSpace *yuv_color_space;
57         YuvColorRange *yuv_color_range;
58         Composer_BG_Color *cwdw_bg_color;
59 };
60
61
62 class TimeFormatHMS : public BC_Radial
63 {
64 public:
65         TimeFormatHMS(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
66         int handle_event();
67         PreferencesWindow *pwindow;
68         AppearancePrefs *tfwindow;
69 };
70
71 class TimeFormatHMSF : public BC_Radial
72 {
73 public:
74         TimeFormatHMSF(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
75         int handle_event();
76         PreferencesWindow *pwindow;
77         AppearancePrefs *tfwindow;
78 };
79
80 class TimeFormatTimecode : public BC_Radial
81 {
82 public:
83         TimeFormatTimecode(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
84         int handle_event();
85         PreferencesWindow *pwindow;
86         AppearancePrefs *tfwindow;
87 };
88
89 class TimeFormatSamples : public BC_Radial
90 {
91 public:
92         TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
93         int handle_event();
94         PreferencesWindow *pwindow;
95         AppearancePrefs *tfwindow;
96 };
97
98 class TimeFormatFrames : public BC_Radial
99 {
100 public:
101         TimeFormatFrames(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
102         int handle_event();
103         PreferencesWindow *pwindow;
104         AppearancePrefs *tfwindow;
105 };
106
107 class TimeFormatHex : public BC_Radial
108 {
109 public:
110         TimeFormatHex(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
111         int handle_event();
112         PreferencesWindow *pwindow;
113         AppearancePrefs *tfwindow;
114 };
115
116 class TimeFormatFeet : public BC_Radial
117 {
118 public:
119         TimeFormatFeet(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
120         int handle_event();
121         PreferencesWindow *pwindow;
122         AppearancePrefs *tfwindow;
123 };
124
125 class TimeFormatSeconds : public BC_Radial
126 {
127 public:
128         TimeFormatSeconds(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
129         int handle_event();
130         PreferencesWindow *pwindow;
131         AppearancePrefs *tfwindow;
132 };
133
134 class TimeFormatFeetSetting : public BC_TextBox
135 {
136 public:
137         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
138         int handle_event();
139         PreferencesWindow *pwindow;
140 };
141
142
143
144 class ViewTheme : public BC_PopupMenu
145 {
146 public:
147         ViewTheme(int x, int y, PreferencesWindow *pwindow);
148         ~ViewTheme();
149
150         void create_objects();
151         int handle_event();
152
153         PreferencesWindow *pwindow;
154 };
155
156 class ViewThemeItem : public BC_MenuItem
157 {
158 public:
159         ViewThemeItem(ViewTheme *popup, const char *text);
160         int handle_event();
161         ViewTheme *popup;
162 };
163
164 class ViewPluginIcons : public BC_PopupMenu
165 {
166 public:
167         ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
168         ~ViewPluginIcons();
169
170         void create_objects();
171         int handle_event();
172
173         PreferencesWindow *pwindow;
174 };
175
176 class ViewPluginIconItem : public BC_MenuItem
177 {
178 public:
179         ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
180         int handle_event();
181         ViewPluginIcons *popup;
182 };
183
184 class LayoutLocale : public BC_PopupMenu
185 {
186         static const char *locale_list[];
187 public:
188         LayoutLocale(int x, int y, PreferencesWindow *pwindow);
189         ~LayoutLocale();
190
191         void create_objects();
192         int handle_event();
193
194         PreferencesWindow *pwindow;
195 };
196
197 class LayoutLocaleItem : public BC_MenuItem
198 {
199 public:
200         LayoutLocaleItem(LayoutLocale *popup, const char *text);
201         int handle_event();
202         LayoutLocale *popup;
203 };
204
205 class ViewLayoutScale : public BC_TumbleTextBox
206 {
207 public:
208         ViewLayoutScale(PreferencesWindow *pwindow,
209                 AppearancePrefs *aprefs, int x, int y);
210         int handle_event();
211         AppearancePrefs *aprefs;
212         PreferencesWindow *pwindow;
213 };
214
215 class ViewThumbnails : public BC_CheckBox
216 {
217 public:
218         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
219         int handle_event();
220         PreferencesWindow *pwindow;
221 };
222
223 class ViewThumbnailSize : public BC_TumbleTextBox
224 {
225 public:
226         ViewThumbnailSize(PreferencesWindow *pwindow,
227                 AppearancePrefs *aprefs, int x, int y);
228         int handle_event();
229         AppearancePrefs *aprefs;
230         PreferencesWindow *pwindow;
231 };
232
233 class ViewViconSize : public BC_TumbleTextBox
234 {
235 public:
236         ViewViconSize(PreferencesWindow *pwindow,
237                 AppearancePrefs *aprefs, int x, int y);
238         int handle_event();
239         AppearancePrefs *aprefs;
240         PreferencesWindow *pwindow;
241 };
242
243 class ViewViconColorMode : public BC_PopupMenu
244 {
245 #define MAX_VICON_COLOR_MODE 3
246         static const char *vicon_color_modes[MAX_VICON_COLOR_MODE];
247 public:
248         ViewViconColorMode(PreferencesWindow *pwindow, int x, int y);
249         ~ViewViconColorMode();
250
251         void create_objects();
252         int handle_event();
253
254         PreferencesWindow *pwindow;
255 };
256
257 class ViewViconColorModeItem : public BC_MenuItem
258 {
259 public:
260         ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id);
261         int handle_event();
262         ViewViconColorMode *popup;
263         int id;
264 };
265
266 class UseTipWindow : public BC_CheckBox
267 {
268 public:
269         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
270         int handle_event();
271         PreferencesWindow *pwindow;
272 };
273
274 class UseWarnIndecies : public BC_CheckBox
275 {
276 public:
277         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
278         int handle_event();
279         PreferencesWindow *pwindow;
280 };
281
282 class UseUnsafeGUI : public BC_CheckBox
283 {
284 public:
285         UseUnsafeGUI(PreferencesWindow *pwindow, int x, int y);
286         int handle_event();
287         PreferencesWindow *pwindow;
288 };
289
290 class OngoingBackups: public BC_CheckBox
291 {
292 public:
293         OngoingBackups(PreferencesWindow *pwindow, int x, int y);
294         int handle_event();
295         PreferencesWindow *pwindow;
296 };
297
298 class BD_WarnRoot : public BC_CheckBox
299 {
300 public:
301         BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
302         int handle_event();
303         PreferencesWindow *pwindow;
304 };
305
306 class UseWarnFileRef : public BC_CheckBox
307 {
308 public:
309         UseWarnFileRef(PreferencesWindow *pwindow, int x, int y);
310         int handle_event();
311         PreferencesWindow *pwindow;
312 };
313
314 class PopupMenuBtnup : public BC_CheckBox
315 {
316 public:
317         PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
318         int handle_event();
319         PreferencesWindow *pwindow;
320 };
321
322 class GrabFocusPolicy : public BC_CheckBox
323 {
324 public:
325         GrabFocusPolicy(PreferencesWindow *pwindow, int x, int y);
326         int handle_event();
327         PreferencesWindow *pwindow;
328 };
329
330 class ActivateFocusPolicy : public BC_CheckBox
331 {
332 public:
333         ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
334         int handle_event();
335         PreferencesWindow *pwindow;
336 };
337
338 class DeactivateFocusPolicy : public BC_CheckBox
339 {
340 public:
341         DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
342         int handle_event();
343         PreferencesWindow *pwindow;
344 };
345
346 class AutoRotate: public BC_CheckBox
347 {
348 public:
349         AutoRotate(PreferencesWindow *pwindow, int x, int y);
350         int handle_event();
351         PreferencesWindow *pwindow;
352 };
353
354 class ForwardRenderDisplacement : public BC_CheckBox
355 {
356 public:
357         ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y);
358         int handle_event();
359         PreferencesWindow *pwindow;
360 };
361
362 class AutocolorAssets : public BC_CheckBox
363 {
364 public:
365         AutocolorAssets(PreferencesWindow *pwindow, int x, int y);
366         int handle_event();
367         PreferencesWindow *pwindow;
368 };
369
370 class HighlightInverseColor : public BC_TextBox
371 {
372 public:
373         HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex);
374         int handle_event();
375         PreferencesWindow *pwindow;
376 };
377
378 class YuvColorSpace : public BC_PopupMenu
379 {
380 public:
381 #define MAX_COLOR_SPACE  5
382         static const char *color_space[MAX_COLOR_SPACE];
383         YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
384         ~YuvColorSpace();
385
386         void create_objects();
387         int handle_event();
388
389         PreferencesWindow *pwindow;
390 };
391
392 class YuvColorSpaceItem : public BC_MenuItem
393 {
394 public:
395         YuvColorSpaceItem(YuvColorSpace *popup, const char *text, int id);
396         int handle_event();
397         YuvColorSpace *popup;
398         int id;
399 };
400
401 class YuvColorRange : public BC_PopupMenu
402 {
403 public:
404 #define MAX_COLOR_RANGE 2
405         static const char *color_range[MAX_COLOR_RANGE];
406         YuvColorRange(int x, int y, PreferencesWindow *pwindow);
407         ~YuvColorRange();
408
409         void create_objects();
410         int handle_event();
411
412         PreferencesWindow *pwindow;
413 };
414
415 class YuvColorRangeItem : public BC_MenuItem
416 {
417 public:
418         YuvColorRangeItem(YuvColorRange *popup, const char *text, int id);
419         int handle_event();
420         YuvColorRange *popup;
421         int id;
422 };
423
424 class PerpetualSession : public BC_CheckBox
425 {
426 public:
427         PerpetualSession(int x, int y, PreferencesWindow *pwindow);
428         int handle_event();
429         PreferencesWindow *pwindow;
430 };
431
432 class CtrlToggle : public BC_CheckBox
433 {
434 public:
435         CtrlToggle(int x, int y, PreferencesWindow *pwindow);
436         int handle_event();
437         PreferencesWindow *pwindow;
438 };
439
440 class RectifyAudioToggle : public BC_CheckBox
441 {
442 public:
443         RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow);
444         int handle_event();
445         PreferencesWindow *pwindow;
446 };
447
448 class Composer_BG_Color : public ColorBoxButton
449 {
450 public:
451         Composer_BG_Color(PreferencesWindow *pwindow,
452                 int x, int y, int w, int h, int color);
453         ~Composer_BG_Color();
454         void handle_done_event(int result);
455         int handle_new_color(int color, int alpha);
456
457         PreferencesWindow *pwindow;
458 };
459
460 #endif