rework svg plugin, fast flash flush, init resize pixmaps, test edl version
[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 IndexSize;
26 class IndexCount;
27 class IndexPathText;
28 class TimeFormatHMS;
29 class TimeFormatHMSF;
30 class TimeFormatSamples;
31 class TimeFormatFrames;
32 class TimeFormatHex;
33 class TimeFormatFeet;
34 class TimeFormatSeconds;
35 class MeterMinDB;
36 class MeterMaxDB;
37 class MeterVUDB;
38 class MeterVUInt;
39 class ViewBehaviourText;
40 class ViewTheme;
41 class ViewThumbnails;
42 class ViewThemeItem;
43 class UseTipWindow;
44 class StillImageUseDuration;
45 class StillImageDuration;
46 class KeyframeReticle;
47
48 #include "browsebutton.h"
49 #include "deleteallindexes.inc"
50 #include "mwindow.inc"
51 #include "preferencesthread.h"
52 #include "shbtnprefs.inc"
53
54
55 class InterfacePrefs : public PreferencesDialog
56 {
57 public:
58         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
59         ~InterfacePrefs();
60
61         void create_objects();
62 // must delete each derived class
63         int update(int new_value);
64         const char* behavior_to_text(int mode);
65         int start_shbtn_dialog();
66
67         BrowseButton *ipath;
68         IndexSize *isize;
69         IndexCount *icount;
70         IndexPathText *ipathtext;
71         DeleteAllIndexes *deleteall;
72
73         TimeFormatHMS *hms;
74         TimeFormatHMSF *hmsf;
75         TimeFormatSamples *samples;
76         TimeFormatHex *hex;
77         TimeFormatFrames *frames;
78         TimeFormatFeet *feet;
79         TimeFormatSeconds *seconds;
80
81         MeterMinDB *min_db;
82         MeterMaxDB *max_db;
83         MeterVUDB *vu_db;
84 //      MeterVUInt *vu_int;
85         ViewBehaviourText *button1, *button2, *button3;
86         ViewThumbnails *thumbnails;
87         ShBtnEditDialog *shbtn_dialog;
88         KeyframeReticle *keyframe_reticle;
89 };
90
91
92 class IndexPathText : public BC_TextBox
93 {
94 public:
95         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
96         ~IndexPathText();
97         int handle_event();
98         PreferencesWindow *pwindow;
99 };
100
101 class IndexSize : public BC_TextBox
102 {
103 public:
104         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
105         int handle_event();
106         PreferencesWindow *pwindow;
107 };
108
109
110 class IndexCount : public BC_TextBox
111 {
112 public:
113         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
114         int handle_event();
115         PreferencesWindow *pwindow;
116 };
117
118 class TimeFormatHMS : public BC_Radial
119 {
120 public:
121         TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
122         int handle_event();
123         PreferencesWindow *pwindow;
124         InterfacePrefs *tfwindow;
125 };
126
127 class TimeFormatHMSF : public BC_Radial
128 {
129 public:
130         TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
131         int handle_event();
132         PreferencesWindow *pwindow;
133         InterfacePrefs *tfwindow;
134 };
135
136 class TimeFormatSamples : public BC_Radial
137 {
138 public:
139         TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
140         int handle_event();
141         PreferencesWindow *pwindow;
142         InterfacePrefs *tfwindow;
143 };
144
145 class TimeFormatFrames : public BC_Radial
146 {
147 public:
148         TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
149         int handle_event();
150         PreferencesWindow *pwindow;
151         InterfacePrefs *tfwindow;
152 };
153
154 class TimeFormatHex : public BC_Radial
155 {
156 public:
157         TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
158         int handle_event();
159         PreferencesWindow *pwindow;
160         InterfacePrefs *tfwindow;
161 };
162
163 class TimeFormatFeet : public BC_Radial
164 {
165 public:
166         TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
167         int handle_event();
168         PreferencesWindow *pwindow;
169         InterfacePrefs *tfwindow;
170 };
171
172 class TimeFormatSeconds : public BC_Radial
173 {
174 public:
175         TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
176         int handle_event();
177         PreferencesWindow *pwindow;
178         InterfacePrefs *tfwindow;
179 };
180
181 class TimeFormatFeetSetting : public BC_TextBox
182 {
183 public:
184         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
185         int handle_event();
186         PreferencesWindow *pwindow;
187 };
188
189
190
191 class MeterMinDB : public BC_TextBox
192 {
193 public:
194         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
195         int handle_event();
196         PreferencesWindow *pwindow;
197 };
198
199
200 class MeterMaxDB : public BC_TextBox
201 {
202 public:
203         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
204         int handle_event();
205         PreferencesWindow *pwindow;
206 };
207
208 class MeterVUDB : public BC_Radial
209 {
210 public:
211         MeterVUDB(PreferencesWindow *pwindow, char *text, int y);
212         int handle_event();
213 //      MeterVUInt *vu_int;
214         PreferencesWindow *pwindow;
215 };
216
217 class MeterVUInt : public BC_Radial
218 {
219 public:
220         MeterVUInt(PreferencesWindow *pwindow, char *text, int y);
221         int handle_event();
222         MeterVUDB *vu_db;
223         PreferencesWindow *pwindow;
224 };
225
226 class ViewBehaviourText : public BC_PopupMenu
227 {
228 public:
229         ViewBehaviourText(int x,
230                 int y,
231                 const char *text,
232                 PreferencesWindow *pwindow,
233                 int *output);
234         ~ViewBehaviourText();
235
236         int handle_event();  // user copies text to value here
237         void create_objects();         // add initial items
238         InterfacePrefs *tfwindow;
239         int *output;
240 };
241
242 class ViewBehaviourItem : public BC_MenuItem
243 {
244 public:
245         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
246         ~ViewBehaviourItem();
247
248         int handle_event();
249         ViewBehaviourText *popup;
250         int behaviour;
251 };
252
253 class ViewTheme : public BC_PopupMenu
254 {
255 public:
256         ViewTheme(int x, int y, PreferencesWindow *pwindow);
257         ~ViewTheme();
258
259         void create_objects();
260         int handle_event();
261
262         PreferencesWindow *pwindow;
263 };
264
265 class ViewThumbnails : public BC_CheckBox
266 {
267 public:
268         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
269         int handle_event();
270         PreferencesWindow *pwindow;
271 };
272
273 class ViewThemeItem : public BC_MenuItem
274 {
275 public:
276         ViewThemeItem(ViewTheme *popup, char *text);
277         int handle_event();
278         ViewTheme *popup;
279 };
280
281 class UseTipWindow : public BC_CheckBox
282 {
283 public:
284         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
285         int handle_event();
286         PreferencesWindow *pwindow;
287 };
288
289 class UseWarnIndecies : public BC_CheckBox
290 {
291 public:
292         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
293         int handle_event();
294         PreferencesWindow *pwindow;
295 };
296
297 class UseWarnVersion : public BC_CheckBox
298 {
299 public:
300         UseWarnVersion(PreferencesWindow *pwindow, int x, int y);
301         int handle_event();
302         PreferencesWindow *pwindow;
303 };
304
305 class ScanCommercials : public BC_CheckBox
306 {
307 public:
308         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
309         int handle_event();
310         PreferencesWindow *pwindow;
311 };
312
313 class AndroidRemote : public BC_CheckBox
314 {
315 public:
316         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
317         int handle_event();
318         PreferencesWindow *pwindow;
319 };
320
321 class AndroidPIN : public BC_TextBox
322 {
323 public:
324         PreferencesWindow *pwindow;
325         int handle_event();
326         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
327 };
328
329 class AndroidPort : public BC_TextBox
330 {
331 public:
332         PreferencesWindow *pwindow;
333         int handle_event();
334         AndroidPort(PreferencesWindow *pwindow, int x, int y);
335 };
336
337 class ShBtnPrefs : public BC_GenericButton
338 {
339 public:
340         PreferencesWindow *pwindow;
341         InterfacePrefs *iface_prefs;
342
343         int handle_event();
344         ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y);
345 };
346 class StillImageUseDuration : public BC_CheckBox
347 {
348 public:
349         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
350         int handle_event();
351         PreferencesWindow *pwindow;
352 };
353
354 class StillImageDuration : public BC_TextBox
355 {
356 public:
357         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
358         int handle_event();
359         PreferencesWindow *pwindow;
360 };
361
362 class KeyframeReticle : public BC_PopupMenu
363 {
364 public:
365         KeyframeReticle(int x, int y, int *output);
366         ~KeyframeReticle();
367
368         const char* hairline_to_string(int type);
369         void create_objects();
370         int *output;
371 };
372
373 class HairlineItem : public BC_MenuItem
374 {
375 public:
376         HairlineItem(KeyframeReticle *popup, int hairline);
377         ~HairlineItem();
378
379         KeyframeReticle *popup;
380         int handle_event();
381         int hairline;
382 };
383
384 #endif