add haupauge-1657 dual usb capture support, add deinterlace to recordmonitor, asset...
[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         TimeFormatSamples *samples;
46         TimeFormatHex *hex;
47         TimeFormatFrames *frames;
48         TimeFormatFeet *feet;
49         TimeFormatSeconds *seconds;
50         ViewLayoutScale *layout_scale;
51         ViewThumbnails *thumbnails;
52         ViewThumbnailSize *thumbnail_size;
53         ViewViconSize *vicon_size;
54         ViewViconColorMode *vicon_color_mode;
55         YuvColorSpace *yuv_color_space;
56         YuvColorRange *yuv_color_range;
57         Composer_BG_Color *cwdw_bg_color;
58 };
59
60
61 class TimeFormatHMS : public BC_Radial
62 {
63 public:
64         TimeFormatHMS(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
65         int handle_event();
66         PreferencesWindow *pwindow;
67         AppearancePrefs *tfwindow;
68 };
69
70 class TimeFormatHMSF : public BC_Radial
71 {
72 public:
73         TimeFormatHMSF(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
74         int handle_event();
75         PreferencesWindow *pwindow;
76         AppearancePrefs *tfwindow;
77 };
78
79 class TimeFormatSamples : public BC_Radial
80 {
81 public:
82         TimeFormatSamples(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
83         int handle_event();
84         PreferencesWindow *pwindow;
85         AppearancePrefs *tfwindow;
86 };
87
88 class TimeFormatFrames : public BC_Radial
89 {
90 public:
91         TimeFormatFrames(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
92         int handle_event();
93         PreferencesWindow *pwindow;
94         AppearancePrefs *tfwindow;
95 };
96
97 class TimeFormatHex : public BC_Radial
98 {
99 public:
100         TimeFormatHex(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
101         int handle_event();
102         PreferencesWindow *pwindow;
103         AppearancePrefs *tfwindow;
104 };
105
106 class TimeFormatFeet : public BC_Radial
107 {
108 public:
109         TimeFormatFeet(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
110         int handle_event();
111         PreferencesWindow *pwindow;
112         AppearancePrefs *tfwindow;
113 };
114
115 class TimeFormatSeconds : public BC_Radial
116 {
117 public:
118         TimeFormatSeconds(PreferencesWindow *pwindow, AppearancePrefs *tfwindow, int value, int x, int y);
119         int handle_event();
120         PreferencesWindow *pwindow;
121         AppearancePrefs *tfwindow;
122 };
123
124 class TimeFormatFeetSetting : public BC_TextBox
125 {
126 public:
127         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
128         int handle_event();
129         PreferencesWindow *pwindow;
130 };
131
132
133
134 class ViewTheme : public BC_PopupMenu
135 {
136 public:
137         ViewTheme(int x, int y, PreferencesWindow *pwindow);
138         ~ViewTheme();
139
140         void create_objects();
141         int handle_event();
142
143         PreferencesWindow *pwindow;
144 };
145
146 class ViewThemeItem : public BC_MenuItem
147 {
148 public:
149         ViewThemeItem(ViewTheme *popup, const char *text);
150         int handle_event();
151         ViewTheme *popup;
152 };
153
154 class ViewPluginIcons : public BC_PopupMenu
155 {
156 public:
157         ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
158         ~ViewPluginIcons();
159
160         void create_objects();
161         int handle_event();
162
163         PreferencesWindow *pwindow;
164 };
165
166 class ViewPluginIconItem : public BC_MenuItem
167 {
168 public:
169         ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
170         int handle_event();
171         ViewPluginIcons *popup;
172 };
173
174 class ViewLayoutScale : public BC_TumbleTextBox
175 {
176 public:
177         ViewLayoutScale(PreferencesWindow *pwindow,
178                 AppearancePrefs *aprefs, int x, int y);
179         int handle_event();
180         AppearancePrefs *aprefs;
181         PreferencesWindow *pwindow;
182 };
183
184 class ViewThumbnails : public BC_CheckBox
185 {
186 public:
187         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
188         int handle_event();
189         PreferencesWindow *pwindow;
190 };
191
192 class ViewThumbnailSize : public BC_TumbleTextBox
193 {
194 public:
195         ViewThumbnailSize(PreferencesWindow *pwindow,
196                 AppearancePrefs *aprefs, int x, int y);
197         int handle_event();
198         AppearancePrefs *aprefs;
199         PreferencesWindow *pwindow;
200 };
201
202 class ViewViconSize : public BC_TumbleTextBox
203 {
204 public:
205         ViewViconSize(PreferencesWindow *pwindow,
206                 AppearancePrefs *aprefs, int x, int y);
207         int handle_event();
208         AppearancePrefs *aprefs;
209         PreferencesWindow *pwindow;
210 };
211
212 class ViewViconColorMode : public BC_PopupMenu
213 {
214         static const char *vicon_color_modes[3];
215 public:
216         ViewViconColorMode(PreferencesWindow *pwindow, int x, int y);
217         ~ViewViconColorMode();
218
219         void create_objects();
220         int handle_event();
221
222         PreferencesWindow *pwindow;
223 };
224
225 class ViewViconColorModeItem : public BC_MenuItem
226 {
227 public:
228         ViewViconColorModeItem(ViewViconColorMode *popup, const char *text, int id);
229         int handle_event();
230         ViewViconColorMode *popup;
231         int id;
232 };
233
234 class UseTipWindow : public BC_CheckBox
235 {
236 public:
237         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
238         int handle_event();
239         PreferencesWindow *pwindow;
240 };
241
242 class UseWarnIndecies : public BC_CheckBox
243 {
244 public:
245         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
246         int handle_event();
247         PreferencesWindow *pwindow;
248 };
249
250 class UseWarnVersion : public BC_CheckBox
251 {
252 public:
253         UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
254         int handle_event();
255         PreferencesWindow *pwindow;
256 };
257
258 class BD_WarnRoot : public BC_CheckBox
259 {
260 public:
261         BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
262         int handle_event();
263         PreferencesWindow *pwindow;
264 };
265
266 class PopupMenuBtnup : public BC_CheckBox
267 {
268 public:
269         PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
270         int handle_event();
271         PreferencesWindow *pwindow;
272 };
273
274 class GrabFocusPolicy : public BC_CheckBox
275 {
276 public:
277         GrabFocusPolicy(PreferencesWindow *pwindow, int x, int y);
278         int handle_event();
279         PreferencesWindow *pwindow;
280 };
281
282 class ActivateFocusPolicy : public BC_CheckBox
283 {
284 public:
285         ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
286         int handle_event();
287         PreferencesWindow *pwindow;
288 };
289
290 class DeactivateFocusPolicy : public BC_CheckBox
291 {
292 public:
293         DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
294         int handle_event();
295         PreferencesWindow *pwindow;
296 };
297
298 class ForwardRenderDisplacement : public BC_CheckBox
299 {
300 public:
301         ForwardRenderDisplacement(PreferencesWindow *pwindow, int x, int y);
302         int handle_event();
303         PreferencesWindow *pwindow;
304 };
305
306 class AutocolorAssets : public BC_CheckBox
307 {
308 public:
309         AutocolorAssets(PreferencesWindow *pwindow, int x, int y);
310         int handle_event();
311         PreferencesWindow *pwindow;
312 };
313
314 class HighlightInverseColor : public BC_TextBox
315 {
316 public:
317         HighlightInverseColor(PreferencesWindow *pwindow, int x, int y, const char *hex);
318         int handle_event();
319         PreferencesWindow *pwindow;
320 };
321
322 class YuvColorSpace : public BC_PopupMenu
323 {
324         static const char *color_space[3];
325 public:
326         YuvColorSpace(int x, int y, PreferencesWindow *pwindow);
327         ~YuvColorSpace();
328
329         void create_objects();
330         int handle_event();
331
332         PreferencesWindow *pwindow;
333 };
334
335 class YuvColorSpaceItem : public BC_MenuItem
336 {
337 public:
338         YuvColorSpaceItem(YuvColorSpace *popup, const char *text, int id);
339         int handle_event();
340         YuvColorSpace *popup;
341         int id;
342 };
343
344 class YuvColorRange : public BC_PopupMenu
345 {
346         static const char *color_range[2];
347 public:
348         YuvColorRange(int x, int y, PreferencesWindow *pwindow);
349         ~YuvColorRange();
350
351         void create_objects();
352         int handle_event();
353
354         PreferencesWindow *pwindow;
355 };
356
357 class YuvColorRangeItem : public BC_MenuItem
358 {
359 public:
360         YuvColorRangeItem(YuvColorRange *popup, const char *text, int id);
361         int handle_event();
362         YuvColorRange *popup;
363         int id;
364 };
365
366 class PerpetualSession : public BC_CheckBox
367 {
368 public:
369         PerpetualSession(int x, int y, PreferencesWindow *pwindow);
370         int handle_event();
371         PreferencesWindow *pwindow;
372 };
373
374 class CtrlToggle : public BC_CheckBox
375 {
376 public:
377         CtrlToggle(int x, int y, PreferencesWindow *pwindow);
378         int handle_event();
379         PreferencesWindow *pwindow;
380 };
381
382 class RectifyAudioToggle : public BC_CheckBox
383 {
384 public:
385         RectifyAudioToggle(int x, int y, PreferencesWindow *pwindow);
386         int handle_event();
387         PreferencesWindow *pwindow;
388 };
389
390 class Composer_BG_Color : public ColorBoxButton
391 {
392 public:
393         Composer_BG_Color(PreferencesWindow *pwindow,
394                 int x, int y, int w, int h, int color, int alpha);
395         ~Composer_BG_Color();
396         void handle_done_event(int result);
397         int handle_new_color(int color, int alpha);
398
399         PreferencesWindow *pwindow;
400 };
401
402 #endif