prevent popup deactivation while button_down
[goodguy/history.git] / cinelerra-5.0 / cinelerra / interfaceprefs.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008-2015 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 ViewThumbnails;
41
42 #include "browsebutton.h"
43 #include "deleteallindexes.inc"
44 #include "mwindow.inc"
45 #include "preferencesthread.h"
46 #include "shbtnprefs.inc"
47
48
49 class InterfacePrefs : public PreferencesDialog
50 {
51 public:
52         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
53         ~InterfacePrefs();
54
55         void create_objects();
56 // must delete each derived class
57         int update(int new_value);
58         const char* behavior_to_text(int mode);
59         int start_shbtn_dialog();
60
61         BrowseButton *ipath;
62         IndexSize *isize;
63         IndexCount *icount;
64         IndexPathText *ipathtext;
65         DeleteAllIndexes *deleteall;
66
67         TimeFormatHMS *hms;
68         TimeFormatHMSF *hmsf;
69         TimeFormatSamples *samples;
70         TimeFormatHex *hex;
71         TimeFormatFrames *frames;
72         TimeFormatFeet *feet;
73         TimeFormatSeconds *seconds;
74
75         MeterMinDB *min_db;
76         MeterMaxDB *max_db;
77         MeterVUDB *vu_db;
78 //      MeterVUInt *vu_int;
79         ViewBehaviourText *button1, *button2, *button3;
80         ViewThumbnails *thumbnails;
81         ShBtnEditDialog *shbtn_dialog;
82 };
83
84
85 class IndexPathText : public BC_TextBox
86 {
87 public:
88         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
89         ~IndexPathText();
90         int handle_event();
91         PreferencesWindow *pwindow;
92 };
93
94 class IndexSize : public BC_TextBox
95 {
96 public:
97         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
98         int handle_event();
99         PreferencesWindow *pwindow;
100 };
101
102
103 class IndexCount : public BC_TextBox
104 {
105 public:
106         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
107         int handle_event();
108         PreferencesWindow *pwindow;
109 };
110
111 class TimeFormatHMS : public BC_Radial
112 {
113 public:
114         TimeFormatHMS(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
115         int handle_event();
116         PreferencesWindow *pwindow;
117         InterfacePrefs *tfwindow;
118 };
119
120 class TimeFormatHMSF : public BC_Radial
121 {
122 public:
123         TimeFormatHMSF(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
124         int handle_event();
125         PreferencesWindow *pwindow;
126         InterfacePrefs *tfwindow;
127 };
128
129 class TimeFormatSamples : public BC_Radial
130 {
131 public:
132         TimeFormatSamples(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
133         int handle_event();
134         PreferencesWindow *pwindow;
135         InterfacePrefs *tfwindow;
136 };
137
138 class TimeFormatFrames : public BC_Radial
139 {
140 public:
141         TimeFormatFrames(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
142         int handle_event();
143         PreferencesWindow *pwindow;
144         InterfacePrefs *tfwindow;
145 };
146
147 class TimeFormatHex : public BC_Radial
148 {
149 public:
150         TimeFormatHex(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
151         int handle_event();
152         PreferencesWindow *pwindow;
153         InterfacePrefs *tfwindow;
154 };
155
156 class TimeFormatFeet : public BC_Radial
157 {
158 public:
159         TimeFormatFeet(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
160         int handle_event();
161         PreferencesWindow *pwindow;
162         InterfacePrefs *tfwindow;
163 };
164
165 class TimeFormatSeconds : public BC_Radial
166 {
167 public:
168         TimeFormatSeconds(PreferencesWindow *pwindow, InterfacePrefs *tfwindow, int value, int x, int y);
169         int handle_event();
170         PreferencesWindow *pwindow;
171         InterfacePrefs *tfwindow;
172 };
173
174 class TimeFormatFeetSetting : public BC_TextBox
175 {
176 public:
177         TimeFormatFeetSetting(PreferencesWindow *pwindow, int x, int y, char *string);
178         int handle_event();
179         PreferencesWindow *pwindow;
180 };
181
182
183
184 class MeterMinDB : public BC_TextBox
185 {
186 public:
187         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
188         int handle_event();
189         PreferencesWindow *pwindow;
190 };
191
192
193 class MeterMaxDB : public BC_TextBox
194 {
195 public:
196         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
197         int handle_event();
198         PreferencesWindow *pwindow;
199 };
200
201 class MeterVUDB : public BC_Radial
202 {
203 public:
204         MeterVUDB(PreferencesWindow *pwindow, char *text, int y);
205         int handle_event();
206 //      MeterVUInt *vu_int;
207         PreferencesWindow *pwindow;
208 };
209
210 class MeterVUInt : public BC_Radial
211 {
212 public:
213         MeterVUInt(PreferencesWindow *pwindow, char *text, int y);
214         int handle_event();
215         MeterVUDB *vu_db;
216         PreferencesWindow *pwindow;
217 };
218
219 class ViewBehaviourText : public BC_PopupMenu
220 {
221 public:
222         ViewBehaviourText(int x, 
223                 int y, 
224                 const char *text, 
225                 PreferencesWindow *pwindow, 
226                 int *output);
227         ~ViewBehaviourText();
228
229         int handle_event();  // user copies text to value here
230         void create_objects();         // add initial items
231         InterfacePrefs *tfwindow;
232         int *output;
233 };
234
235 class ViewBehaviourItem : public BC_MenuItem
236 {
237 public:
238         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
239         ~ViewBehaviourItem();
240
241         int handle_event();
242         ViewBehaviourText *popup;
243         int behaviour;
244 };
245
246 class ViewTheme : public BC_PopupMenu
247 {
248 public:
249         ViewTheme(int x, int y, PreferencesWindow *pwindow);
250         ~ViewTheme();
251         
252         void create_objects();
253         int handle_event();
254         
255         PreferencesWindow *pwindow;
256 };
257
258 class ViewThumbnails : public BC_CheckBox
259 {
260 public:
261         ViewThumbnails(int x, int y, PreferencesWindow *pwindow);
262         int handle_event();
263         PreferencesWindow *pwindow;
264 };
265
266 class ViewThemeItem : public BC_MenuItem
267 {
268 public:
269         ViewThemeItem(ViewTheme *popup, char *text);
270         int handle_event();
271         ViewTheme *popup;
272 };
273
274 class UseTipWindow : public BC_CheckBox
275 {
276 public:
277         UseTipWindow(PreferencesWindow *pwindow, int x, int y);
278         int handle_event();
279         PreferencesWindow *pwindow;
280 };
281
282 class UseWarnIndecies : public BC_CheckBox
283 {
284 public:
285         UseWarnIndecies(PreferencesWindow *pwindow, int x, int y);
286         int handle_event();
287         PreferencesWindow *pwindow;
288 };
289
290 class ScanCommercials : public BC_CheckBox
291 {
292 public:
293         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
294         int handle_event();
295         PreferencesWindow *pwindow;
296 };
297
298 class AndroidRemote : public BC_CheckBox
299 {
300 public:
301         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
302         int handle_event();
303         PreferencesWindow *pwindow;
304 };
305
306 class AndroidPIN : public BC_TextBox
307 {
308 public:
309         PreferencesWindow *pwindow;
310         int handle_event();
311         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
312 };
313
314 class AndroidPort : public BC_TextBox
315 {
316 public:
317         PreferencesWindow *pwindow;
318         int handle_event();
319         AndroidPort(PreferencesWindow *pwindow, int x, int y);
320 };
321
322 class ShBtnPrefs : public BC_GenericButton
323 {
324 public:
325         PreferencesWindow *pwindow;
326         InterfacePrefs *iface_prefs;
327
328         int handle_event();
329         ShBtnPrefs(PreferencesWindow *pwindow, InterfacePrefs *iface_prefs, int x, int y);
330 };
331
332 #endif