5bde37be400496afceb760aee7137a71288a4dce
[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         static const char *vicon_color_modes[3];
246 public:
247         ViewViconColorMode(PreferencesWindow *pwindow, int x, int y);
248         ~ViewViconColorMode();
249
250         void create_objects();
251         int handle_event();
252
253         PreferencesWindow *pwindow;
254 };
255
256 class ViewViconColorModeItem : public BC_MenuItem
257 {
258 public:
259         ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id);
260         int handle_event();
261         ViewViconColorMode *popup;
262         int id;
263 };
264
265 class UseTipWindow : public BC_CheckBox
266 {
267 public:
268         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
269         int handle_event();
270         PreferencesWindow *pwindow;
271 };
272
273 class UseWarnIndecies : public BC_CheckBox
274 {
275 public:
276         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
277         int handle_event();
278         PreferencesWindow *pwindow;
279 };
280
281 class UseUnsafeGUI : public BC_CheckBox
282 {
283 public:
284         UseUnsafeGUI(PreferencesWindow *pwindow, int x, int y);
285         int handle_event();
286         PreferencesWindow *pwindow;
287 };
288
289 class BD_WarnRoot : public BC_CheckBox
290 {
291 public:
292         BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
293         int handle_event();
294         PreferencesWindow *pwindow;
295 };
296
297 class UseWarnFileRef : public BC_CheckBox
298 {
299 public:
300         UseWarnFileRef(PreferencesWindow *pwindow, int x, int y);
301         int handle_event();
302         PreferencesWindow *pwindow;
303 };
304
305 class PopupMenuBtnup : public BC_CheckBox
306 {
307 public:
308         PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
309         int handle_event();
310         PreferencesWindow *pwindow;
311 };
312
313 class GrabFocusPolicy : public BC_CheckBox
314 {
315 public:
316         GrabFocusPolicy(PreferencesWindow *pwindow, int x, int y);
317         int handle_event();
318         PreferencesWindow *pwindow;
319 };
320
321 class ActivateFocusPolicy : public BC_CheckBox
322 {
323 public:
324         ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
325         int handle_event();
326         PreferencesWindow *pwindow;
327 };
328
329 class DeactivateFocusPolicy : public BC_CheckBox
330 {
331 public:
332         DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
333         int handle_event();
334         PreferencesWindow *pwindow;
335 };
336
337 class AutoRotate: public BC_CheckBox
338 {
339 public:
340         AutoRotate(PreferencesWindow *pwindow, int x, int y);
341         int handle_event();
342         PreferencesWindow *pwindow;
343 };
344
345 class ForwardRenderDisplacement : public BC_CheckBox
346 {
347 public:
348         ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y);
349         int handle_event();
350         PreferencesWindow *pwindow;
351 };
352
353 class AutocolorAssets : public BC_CheckBox
354 {
355 public:
356         AutocolorAssets(PreferencesWindow *pwindow, int x, int y);
357         int handle_event();
358         PreferencesWindow *pwindow;
359 };
360
361 class HighlightInverseColor : public BC_TextBox
362 {
363 public:
364         HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex);
365         int handle_event();
366         PreferencesWindow *pwindow;
367 };
368
369 class YuvColorSpace : public BC_PopupMenu
370 {
371 public:
372         static const char *color_space[3];
373         YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
374         ~YuvColorSpace();
375
376         void create_objects();
377         int handle_event();
378
379         PreferencesWindow *pwindow;
380 };
381
382 class YuvColorSpaceItem : public BC_MenuItem
383 {
384 public:
385         YuvColorSpaceItem(YuvColorSpace *popup, const char *text, int id);
386         int handle_event();
387         YuvColorSpace *popup;
388         int id;
389 };
390
391 class YuvColorRange : public BC_PopupMenu
392 {
393 public:
394         static const char *color_range[2];
395         YuvColorRange(int x, int y, PreferencesWindow *pwindow);
396         ~YuvColorRange();
397
398         void create_objects();
399         int handle_event();
400
401         PreferencesWindow *pwindow;
402 };
403
404 class YuvColorRangeItem : public BC_MenuItem
405 {
406 public:
407         YuvColorRangeItem(YuvColorRange *popup, const char *text, int id);
408         int handle_event();
409         YuvColorRange *popup;
410         int id;
411 };
412
413 class PerpetualSession : public BC_CheckBox
414 {
415 public:
416         PerpetualSession(int x, int y, PreferencesWindow *pwindow);
417         int handle_event();
418         PreferencesWindow *pwindow;
419 };
420
421 class CtrlToggle : public BC_CheckBox
422 {
423 public:
424         CtrlToggle(int x, int y, PreferencesWindow *pwindow);
425         int handle_event();
426         PreferencesWindow *pwindow;
427 };
428
429 class RectifyAudioToggle : public BC_CheckBox
430 {
431 public:
432         RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow);
433         int handle_event();
434         PreferencesWindow *pwindow;
435 };
436
437 class Composer_BG_Color : public ColorBoxButton
438 {
439 public:
440         Composer_BG_Color(PreferencesWindow *pwindow,
441                 int x, int y, int w, int h, int color);
442         ~Composer_BG_Color();
443         void handle_done_event(int result);
444         int handle_new_color(int color, int alpha);
445
446         PreferencesWindow *pwindow;
447 };
448
449 #endif