e96aca1b4d6e7eec29b3974cbbbf8a5b97e01421
[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 ViewLayoutScale : public BC_TumbleTextBox
185 {
186 public:
187         ViewLayoutScale(PreferencesWindow *pwindow,
188                 AppearancePrefs *aprefs, int x, int y);
189         int handle_event();
190         AppearancePrefs *aprefs;
191         PreferencesWindow *pwindow;
192 };
193
194 class ViewThumbnails : public BC_CheckBox
195 {
196 public:
197         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
198         int handle_event();
199         PreferencesWindow *pwindow;
200 };
201
202 class ViewThumbnailSize : public BC_TumbleTextBox
203 {
204 public:
205         ViewThumbnailSize(PreferencesWindow *pwindow,
206                 AppearancePrefs *aprefs, int x, int y);
207         int handle_event();
208         AppearancePrefs *aprefs;
209         PreferencesWindow *pwindow;
210 };
211
212 class ViewViconSize : public BC_TumbleTextBox
213 {
214 public:
215         ViewViconSize(PreferencesWindow *pwindow,
216                 AppearancePrefs *aprefs, int x, int y);
217         int handle_event();
218         AppearancePrefs *aprefs;
219         PreferencesWindow *pwindow;
220 };
221
222 class ViewViconColorMode : public BC_PopupMenu
223 {
224         static const char *vicon_color_modes[3];
225 public:
226         ViewViconColorMode(PreferencesWindow *pwindow, int x, int y);
227         ~ViewViconColorMode();
228
229         void create_objects();
230         int handle_event();
231
232         PreferencesWindow *pwindow;
233 };
234
235 class ViewViconColorModeItem : public BC_MenuItem
236 {
237 public:
238         ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id);
239         int handle_event();
240         ViewViconColorMode *popup;
241         int id;
242 };
243
244 class UseTipWindow : public BC_CheckBox
245 {
246 public:
247         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
248         int handle_event();
249         PreferencesWindow *pwindow;
250 };
251
252 class UseWarnIndecies : public BC_CheckBox
253 {
254 public:
255         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
256         int handle_event();
257         PreferencesWindow *pwindow;
258 };
259
260 class UseWarnVersion : public BC_CheckBox
261 {
262 public:
263         UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
264         int handle_event();
265         PreferencesWindow *pwindow;
266 };
267
268 class BD_WarnRoot : public BC_CheckBox
269 {
270 public:
271         BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
272         int handle_event();
273         PreferencesWindow *pwindow;
274 };
275
276 class UseWarnFileRef : public BC_CheckBox
277 {
278 public:
279         UseWarnFileRef(PreferencesWindow *pwindow, int x, int y);
280         int handle_event();
281         PreferencesWindow *pwindow;
282 };
283
284 class PopupMenuBtnup : public BC_CheckBox
285 {
286 public:
287         PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
288         int handle_event();
289         PreferencesWindow *pwindow;
290 };
291
292 class GrabFocusPolicy : public BC_CheckBox
293 {
294 public:
295         GrabFocusPolicy(PreferencesWindow *pwindow, int x, int y);
296         int handle_event();
297         PreferencesWindow *pwindow;
298 };
299
300 class ActivateFocusPolicy : public BC_CheckBox
301 {
302 public:
303         ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
304         int handle_event();
305         PreferencesWindow *pwindow;
306 };
307
308 class DeactivateFocusPolicy : public BC_CheckBox
309 {
310 public:
311         DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
312         int handle_event();
313         PreferencesWindow *pwindow;
314 };
315
316 class AutoRotate: public BC_CheckBox
317 {
318 public:
319         AutoRotate(PreferencesWindow *pwindow, int x, int y);
320         int handle_event();
321         PreferencesWindow *pwindow;
322 };
323
324 class ForwardRenderDisplacement : public BC_CheckBox
325 {
326 public:
327         ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y);
328         int handle_event();
329         PreferencesWindow *pwindow;
330 };
331
332 class AutocolorAssets : public BC_CheckBox
333 {
334 public:
335         AutocolorAssets(PreferencesWindow *pwindow, int x, int y);
336         int handle_event();
337         PreferencesWindow *pwindow;
338 };
339
340 class HighlightInverseColor : public BC_TextBox
341 {
342 public:
343         HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex);
344         int handle_event();
345         PreferencesWindow *pwindow;
346 };
347
348 class YuvColorSpace : public BC_PopupMenu
349 {
350 public:
351         static const char *color_space[3];
352         YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
353         ~YuvColorSpace();
354
355         void create_objects();
356         int handle_event();
357
358         PreferencesWindow *pwindow;
359 };
360
361 class YuvColorSpaceItem : public BC_MenuItem
362 {
363 public:
364         YuvColorSpaceItem(YuvColorSpace *popup, const char *text, int id);
365         int handle_event();
366         YuvColorSpace *popup;
367         int id;
368 };
369
370 class YuvColorRange : public BC_PopupMenu
371 {
372 public:
373         static const char *color_range[2];
374         YuvColorRange(int x, int y, PreferencesWindow *pwindow);
375         ~YuvColorRange();
376
377         void create_objects();
378         int handle_event();
379
380         PreferencesWindow *pwindow;
381 };
382
383 class YuvColorRangeItem : public BC_MenuItem
384 {
385 public:
386         YuvColorRangeItem(YuvColorRange *popup, const char *text, int id);
387         int handle_event();
388         YuvColorRange *popup;
389         int id;
390 };
391
392 class PerpetualSession : public BC_CheckBox
393 {
394 public:
395         PerpetualSession(int x, int y, PreferencesWindow *pwindow);
396         int handle_event();
397         PreferencesWindow *pwindow;
398 };
399
400 class CtrlToggle : public BC_CheckBox
401 {
402 public:
403         CtrlToggle(int x, int y, PreferencesWindow *pwindow);
404         int handle_event();
405         PreferencesWindow *pwindow;
406 };
407
408 class RectifyAudioToggle : public BC_CheckBox
409 {
410 public:
411         RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow);
412         int handle_event();
413         PreferencesWindow *pwindow;
414 };
415
416 class Composer_BG_Color : public ColorBoxButton
417 {
418 public:
419         Composer_BG_Color(PreferencesWindow *pwindow,
420                 int x, int y, int w, int h, int color, int alpha);
421         ~Composer_BG_Color();
422         void handle_done_event(int result);
423         int handle_new_color(int color, int alpha);
424
425         PreferencesWindow *pwindow;
426 };
427
428 #endif