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