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