asset menu size fixups, new picons+prefs, more timecode del, stretch scrollbars,...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / interfaceprefs.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 INTERFACEPREFS_H
23 #define INTERFACEPREFS_H
24
25 class InterfacePrefs;
26 class IndexPathText;
27 class IndexSize;
28 class IndexCount;
29 class TimeFormatHMS;
30 class TimeFormatHMSF;
31 class TimeFormatSamples;
32 class TimeFormatFrames;
33 class TimeFormatHex;
34 class TimeFormatFeet;
35 class TimeFormatSeconds;
36 class TimeFormatFeetSetting;
37 class MeterMinDB;
38 class MeterMaxDB;
39 class MeterVUDB;
40 class MeterVUInt;
41 class ViewBehaviourText;
42 class ViewBehaviourItem;
43 class ViewTheme;
44 class ViewThemeItem;
45 class ViewPluginIcons;
46 class ViewPluginIconItem;
47 class ViewThumbnails;
48 class UseTipWindow;
49 class UseWarnIndecies;
50 class UseWarnVersion;
51 class BD_WarnRoot;
52 class ScanCommercials;
53 class AndroidRemote;
54 class PopupMenuBtnup;
55 class ActivateFocusPolicy;
56 class DeactivateFocusPolicy;
57 class AndroidPIN;
58 class AndroidPort;
59 class ShBtnPrefs;
60 class StillImageUseDuration;
61 class StillImageDuration;
62 class KeyframeReticle;
63 class HairlineItem;
64 class IndexFFMPEGMarkerFiles;
65
66 #include "browsebutton.h"
67 #include "deleteallindexes.inc"
68 #include "mwindow.inc"
69 #include "preferencesthread.h"
70 #include "shbtnprefs.inc"
71
72
73 class InterfacePrefs : public PreferencesDialog
74 {
75 public:
76         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
77         ~InterfacePrefs();
78
79         void create_objects();
80 // must delete each derived class
81         int update(int new_value);
82         const char* behavior_to_text(int mode);
83         int start_shbtn_dialog();
84
85         BrowseButton *ipath;
86         IndexSize *isize;
87         IndexCount *icount;
88         IndexPathText *ipathtext;
89         DeleteAllIndexes *deleteall;
90         IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
91
92         TimeFormatHMS *hms;
93         TimeFormatHMSF *hmsf;
94         TimeFormatSamples *samples;
95         TimeFormatHex *hex;
96         TimeFormatFrames *frames;
97         TimeFormatFeet *feet;
98         TimeFormatSeconds *seconds;
99
100         MeterMinDB *min_db;
101         MeterMaxDB *max_db;
102         MeterVUDB *vu_db;
103 //      MeterVUInt *vu_int;
104         ViewBehaviourText *button1, *button2, *button3;
105         ViewThumbnails *thumbnails;
106         ShBtnEditDialog *shbtn_dialog;
107         KeyframeReticle *keyframe_reticle;
108 };
109
110
111 class IndexPathText : public BC_TextBox
112 {
113 public:
114         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
115         ~IndexPathText();
116         int handle_event();
117         PreferencesWindow *pwindow;
118 };
119
120 class IndexSize : public BC_TextBox
121 {
122 public:
123         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
124         int handle_event();
125         PreferencesWindow *pwindow;
126 };
127
128
129 class IndexCount : public BC_TextBox
130 {
131 public:
132         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
133         int handle_event();
134         PreferencesWindow *pwindow;
135 };
136
137 class TimeFormatHMS : public BC_Radial
138 {
139 public:
140         TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
141         int handle_event();
142         PreferencesWindow *pwindow;
143         InterfacePrefs *tfwindow;
144 };
145
146 class TimeFormatHMSF : public BC_Radial
147 {
148 public:
149         TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
150         int handle_event();
151         PreferencesWindow *pwindow;
152         InterfacePrefs *tfwindow;
153 };
154
155 class TimeFormatSamples : public BC_Radial
156 {
157 public:
158         TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
159         int handle_event();
160         PreferencesWindow *pwindow;
161         InterfacePrefs *tfwindow;
162 };
163
164 class TimeFormatFrames : public BC_Radial
165 {
166 public:
167         TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
168         int handle_event();
169         PreferencesWindow *pwindow;
170         InterfacePrefs *tfwindow;
171 };
172
173 class TimeFormatHex : public BC_Radial
174 {
175 public:
176         TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
177         int handle_event();
178         PreferencesWindow *pwindow;
179         InterfacePrefs *tfwindow;
180 };
181
182 class TimeFormatFeet : public BC_Radial
183 {
184 public:
185         TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
186         int handle_event();
187         PreferencesWindow *pwindow;
188         InterfacePrefs *tfwindow;
189 };
190
191 class TimeFormatSeconds : public BC_Radial
192 {
193 public:
194         TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
195         int handle_event();
196         PreferencesWindow *pwindow;
197         InterfacePrefs *tfwindow;
198 };
199
200 class TimeFormatFeetSetting : public BC_TextBox
201 {
202 public:
203         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
204         int handle_event();
205         PreferencesWindow *pwindow;
206 };
207
208
209
210 class MeterMinDB : public BC_TextBox
211 {
212 public:
213         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
214         int handle_event();
215         PreferencesWindow *pwindow;
216 };
217
218
219 class MeterMaxDB : public BC_TextBox
220 {
221 public:
222         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
223         int handle_event();
224         PreferencesWindow *pwindow;
225 };
226
227 class MeterVUDB : public BC_Radial
228 {
229 public:
230         MeterVUDB(PreferencesWindow *pwindow, char *text, int y);
231         int handle_event();
232 //      MeterVUInt *vu_int;
233         PreferencesWindow *pwindow;
234 };
235
236 class MeterVUInt : public BC_Radial
237 {
238 public:
239         MeterVUInt(PreferencesWindow *pwindow, char *text, int y);
240         int handle_event();
241         MeterVUDB *vu_db;
242         PreferencesWindow *pwindow;
243 };
244
245 class ViewBehaviourText : public BC_PopupMenu
246 {
247 public:
248         ViewBehaviourText(int x,
249                 int y,
250                 const char *text,
251                 PreferencesWindow *pwindow,
252                 int *output);
253         ~ViewBehaviourText();
254
255         int handle_event();  // user copies text to value here
256         void create_objects();         // add initial items
257         InterfacePrefs *tfwindow;
258         int *output;
259 };
260
261 class ViewBehaviourItem : public BC_MenuItem
262 {
263 public:
264         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
265         ~ViewBehaviourItem();
266
267         int handle_event();
268         ViewBehaviourText *popup;
269         int behaviour;
270 };
271
272 class ViewTheme : public BC_PopupMenu
273 {
274 public:
275         ViewTheme(int x, int y, PreferencesWindow *pwindow);
276         ~ViewTheme();
277
278         void create_objects();
279         int handle_event();
280
281         PreferencesWindow *pwindow;
282 };
283
284 class ViewThemeItem : public BC_MenuItem
285 {
286 public:
287         ViewThemeItem(ViewTheme *popup, const char *text);
288         int handle_event();
289         ViewTheme *popup;
290 };
291
292 class ViewPluginIcons : public BC_PopupMenu
293 {
294 public:
295         ViewPluginIcons(int x, int y, PreferencesWindow *pwindow);
296         ~ViewPluginIcons();
297
298         void create_objects();
299         int handle_event();
300
301         PreferencesWindow *pwindow;
302 };
303
304 class ViewPluginIconItem : public BC_MenuItem
305 {
306 public:
307         ViewPluginIconItem(ViewPluginIcons *popup, const char *text);
308         int handle_event();
309         ViewPluginIcons *popup;
310 };
311
312 class ViewThumbnails : public BC_CheckBox
313 {
314 public:
315         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
316         int handle_event();
317         PreferencesWindow *pwindow;
318 };
319
320 class UseTipWindow : public BC_CheckBox
321 {
322 public:
323         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
324         int handle_event();
325         PreferencesWindow *pwindow;
326 };
327
328 class UseWarnIndecies : public BC_CheckBox
329 {
330 public:
331         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
332         int handle_event();
333         PreferencesWindow *pwindow;
334 };
335
336 class UseWarnVersion : public BC_CheckBox
337 {
338 public:
339         UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
340         int handle_event();
341         PreferencesWindow *pwindow;
342 };
343
344 class BD_WarnRoot : public BC_CheckBox
345 {
346 public:
347         BD_WarnRoot(PreferencesWindow *pwindow, int x, int y);
348         int handle_event();
349         PreferencesWindow *pwindow;
350 };
351
352 class ScanCommercials : public BC_CheckBox
353 {
354 public:
355         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
356         int handle_event();
357         PreferencesWindow *pwindow;
358 };
359
360 class AndroidRemote : public BC_CheckBox
361 {
362 public:
363         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
364         int handle_event();
365         PreferencesWindow *pwindow;
366 };
367
368 class PopupMenuBtnup : public BC_CheckBox
369 {
370 public:
371         PopupMenuBtnup(PreferencesWindow *pwindow, int x, int y);
372         int handle_event();
373         PreferencesWindow *pwindow;
374 };
375
376 class ActivateFocusPolicy : public BC_CheckBox
377 {
378 public:
379         ActivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
380         int handle_event();
381         PreferencesWindow *pwindow;
382 };
383
384 class DeactivateFocusPolicy : public BC_CheckBox
385 {
386 public:
387         DeactivateFocusPolicy(PreferencesWindow *pwindow, int x, int y);
388         int handle_event();
389         PreferencesWindow *pwindow;
390 };
391
392 class AndroidPIN : public BC_TextBox
393 {
394 public:
395         PreferencesWindow *pwindow;
396         int handle_event();
397         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
398 };
399
400 class AndroidPort : public BC_TextBox
401 {
402 public:
403         PreferencesWindow *pwindow;
404         int handle_event();
405         AndroidPort(PreferencesWindow *pwindow, int x, int y);
406 };
407
408 class ShBtnPrefs : public BC_GenericButton
409 {
410 public:
411         PreferencesWindow *pwindow;
412         InterfacePrefs *iface_prefs;
413
414         int handle_event();
415         ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y);
416 };
417 class StillImageUseDuration : public BC_CheckBox
418 {
419 public:
420         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
421         int handle_event();
422         PreferencesWindow *pwindow;
423 };
424
425 class StillImageDuration : public BC_TextBox
426 {
427 public:
428         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
429         int handle_event();
430         PreferencesWindow *pwindow;
431 };
432
433 class KeyframeReticle : public BC_PopupMenu
434 {
435 public:
436         KeyframeReticle(int x, int y, int *output);
437         ~KeyframeReticle();
438
439         const char* hairline_to_string(int type);
440         void create_objects();
441         int *output;
442 };
443
444 class HairlineItem : public BC_MenuItem
445 {
446 public:
447         HairlineItem(KeyframeReticle *popup, int hairline);
448         ~HairlineItem();
449
450         KeyframeReticle *popup;
451         int handle_event();
452         int hairline;
453 };
454
455 class IndexFFMPEGMarkerFiles : public BC_CheckBox
456 {
457 public:
458         IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
459         ~IndexFFMPEGMarkerFiles();
460
461         int handle_event();
462
463         InterfacePrefs *iface_prefs;
464 };
465
466
467 #endif