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