add snapshot, igor exts, cleanup
[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 #include "browsebutton.h"
26 #include "deleteallindexes.inc"
27 #include "interfaceprefs.inc"
28 #include "mwindow.inc"
29 #include "preferencesthread.h"
30 #include "probeprefs.inc"
31 #include "shbtnprefs.inc"
32
33
34 class InterfacePrefs : public PreferencesDialog
35 {
36 public:
37         InterfacePrefs(MWindow *mwindow, PreferencesWindow *pwindow);
38         ~InterfacePrefs();
39
40         void create_objects();
41 // must delete each derived class
42         int update(int new_value);
43         const char* behavior_to_text(int mode);
44         int start_shbtn_dialog();
45         void start_probe_dialog();
46
47         BrowseButton *ipath;
48         IndexSize *isize;
49         IndexCount *icount;
50         IndexPathText *ipathtext;
51         DeleteAllIndexes *deleteall;
52         IndexFFMPEGMarkerFiles *ffmpeg_marker_files;
53
54         ViewBehaviourText *button1, *button2, *button3;
55         MeterMinDB *min_db;
56         MeterMaxDB *max_db;
57
58         ShBtnEditDialog *shbtn_dialog;
59         KeyframeReticle *keyframe_reticle;
60         PrefsYUV420P_DVDlace *yuv420p_dvdlace;
61         FileProbeDialog *file_probe_dialog;
62         PrefsFileProbes *file_probes;
63         PrefsTrapSigSEGV *trap_segv;
64         PrefsTrapSigINTR *trap_intr;
65         SnapshotPathText *snapshot_path;
66 };
67
68
69 class IndexPathText : public BC_TextBox
70 {
71 public:
72         IndexPathText(int x, int y, PreferencesWindow *pwindow, char *text);
73         ~IndexPathText();
74         int handle_event();
75         PreferencesWindow *pwindow;
76 };
77
78 class IndexSize : public BC_TextBox
79 {
80 public:
81         IndexSize(int x, int y, PreferencesWindow *pwindow, char *text);
82         int handle_event();
83         PreferencesWindow *pwindow;
84 };
85
86
87 class IndexCount : public BC_TextBox
88 {
89 public:
90         IndexCount(int x, int y, PreferencesWindow *pwindow, char *text);
91         int handle_event();
92         PreferencesWindow *pwindow;
93 };
94
95
96 class ViewBehaviourText : public BC_PopupMenu
97 {
98 public:
99         ViewBehaviourText(int x, int y, const char *text,
100                 PreferencesWindow *pwindow, int *output);
101         ~ViewBehaviourText();
102
103         int handle_event();  // user copies text to value here
104         void create_objects();         // add initial items
105         InterfacePrefs *tfwindow;
106         int *output;
107 };
108
109 class ViewBehaviourItem : public BC_MenuItem
110 {
111 public:
112         ViewBehaviourItem(ViewBehaviourText *popup, char *text, int behaviour);
113         ~ViewBehaviourItem();
114
115         int handle_event();
116         ViewBehaviourText *popup;
117         int behaviour;
118 };
119
120
121 class MeterMinDB : public BC_TextBox
122 {
123 public:
124         MeterMinDB(PreferencesWindow *pwindow, char *text, int x, int y);
125         int handle_event();
126         PreferencesWindow *pwindow;
127 };
128
129
130 class MeterMaxDB : public BC_TextBox
131 {
132 public:
133         MeterMaxDB(PreferencesWindow *pwindow, char *text, int x, int y);
134         int handle_event();
135         PreferencesWindow *pwindow;
136 };
137
138 class ScanCommercials : public BC_CheckBox
139 {
140 public:
141         ScanCommercials(PreferencesWindow *pwindow, int x, int y);
142         int handle_event();
143         PreferencesWindow *pwindow;
144 };
145
146 class AndroidRemote : public BC_CheckBox
147 {
148 public:
149         AndroidRemote(PreferencesWindow *pwindow, int x, int y);
150         int handle_event();
151         PreferencesWindow *pwindow;
152 };
153
154 class AndroidPIN : public BC_TextBox
155 {
156 public:
157         PreferencesWindow *pwindow;
158         int handle_event();
159         AndroidPIN(PreferencesWindow *pwindow, int x, int y);
160 };
161
162 class AndroidPort : public BC_TextBox
163 {
164 public:
165         PreferencesWindow *pwindow;
166         int handle_event();
167         AndroidPort(PreferencesWindow *pwindow, int x, int y);
168 };
169
170 class ShBtnPrefs : public BC_GenericButton
171 {
172 public:
173         PreferencesWindow *pwindow;
174         InterfacePrefs *iface_prefs;
175
176         int handle_event();
177         ShBtnPrefs(PreferencesWindow *pwindow,
178                 InterfacePrefs *iface_prefs, int x, int y);
179 };
180 class StillImageUseDuration : public BC_CheckBox
181 {
182 public:
183         StillImageUseDuration(PreferencesWindow *pwindow, int value, int x, int y);
184         int handle_event();
185         PreferencesWindow *pwindow;
186 };
187
188 class StillImageDuration : public BC_TextBox
189 {
190 public:
191         StillImageDuration(PreferencesWindow *pwindow, int x, int y);
192         int handle_event();
193         PreferencesWindow *pwindow;
194 };
195
196 class KeyframeReticle : public BC_PopupMenu
197 {
198 public:
199         KeyframeReticle(PreferencesWindow *pwindow,
200                 InterfacePrefs *iface_prefs, int x, int y, int *output);
201         ~KeyframeReticle();
202
203         const char *hairline_to_string(int type);
204         void create_objects();
205
206         PreferencesWindow *pwindow;
207         InterfacePrefs *iface_prefs;
208         int *output;
209 };
210
211 class HairlineItem : public BC_MenuItem
212 {
213 public:
214         HairlineItem(KeyframeReticle *popup, int hairline);
215         ~HairlineItem();
216
217         KeyframeReticle *popup;
218         int handle_event();
219         int hairline;
220 };
221
222 class IndexFFMPEGMarkerFiles : public BC_CheckBox
223 {
224 public:
225         IndexFFMPEGMarkerFiles(InterfacePrefs *iface_prefs, int x, int y);
226         ~IndexFFMPEGMarkerFiles();
227
228         int handle_event();
229
230         InterfacePrefs *iface_prefs;
231 };
232
233
234 class PrefsTrapSigSEGV : public BC_CheckBox
235 {
236 public:
237         PrefsTrapSigSEGV(InterfacePrefs *subwindow, int x, int y);
238         ~PrefsTrapSigSEGV();
239         int handle_event();
240
241         InterfacePrefs *subwindow;
242 };
243
244 class PrefsTrapSigINTR : public BC_CheckBox
245 {
246 public:
247         PrefsTrapSigINTR(InterfacePrefs *subwindow, int x, int y);
248         ~PrefsTrapSigINTR();
249         int handle_event();
250
251         InterfacePrefs *subwindow;
252 };
253
254
255 class PrefsFileProbes : public BC_GenericButton
256 {
257 public:
258         PreferencesWindow *pwindow;
259         InterfacePrefs *subwindow;
260
261         int handle_event();
262         PrefsFileProbes(PreferencesWindow *pwindow, InterfacePrefs *subwindow, int x, int y);
263 };
264
265
266 class PrefsYUV420P_DVDlace : public BC_CheckBox
267 {
268 public:
269         PrefsYUV420P_DVDlace(PreferencesWindow *pwindow,
270                 InterfacePrefs *subwindow, int x, int y);
271         int handle_event();
272
273         InterfacePrefs *subwindow;
274         PreferencesWindow *pwindow;
275 };
276
277 class SnapshotPathText : public BC_TextBox
278 {
279 public:
280         SnapshotPathText(PreferencesWindow *pwindow,
281                 InterfacePrefs *subwindow, int x, int y, int w);
282         ~SnapshotPathText();
283
284         int handle_event();
285         PreferencesWindow *pwindow;
286         InterfacePrefs *subwindow;
287 };
288
289 #endif